Backport/rewrites wmarquesr pt. 3
This commit is contained in:
parent
23e276376a
commit
be971fc258
|
@ -199,18 +199,19 @@ static void *coreaudio_init(const char *device,
|
||||||
AudioComponent comp;
|
AudioComponent comp;
|
||||||
#endif
|
#endif
|
||||||
#ifndef TARGET_OS_IPHONE
|
#ifndef TARGET_OS_IPHONE
|
||||||
AudioChannelLayout layout = {0};
|
AudioChannelLayout layout = {0};
|
||||||
#endif
|
#endif
|
||||||
AURenderCallbackStruct cb = {0};
|
AURenderCallbackStruct cb = {0};
|
||||||
AudioStreamBasicDescription stream_desc = {0};
|
AudioStreamBasicDescription stream_desc = {0};
|
||||||
static bool session_initialized = false;
|
bool component_unavailable = false;
|
||||||
coreaudio_t *dev = NULL;
|
static bool session_initialized = false;
|
||||||
|
coreaudio_t *dev = NULL;
|
||||||
#ifdef OSX_PPC
|
#ifdef OSX_PPC
|
||||||
ComponentDescription desc = {0};
|
ComponentDescription desc = {0};
|
||||||
#else
|
#else
|
||||||
AudioComponentDescription desc = {0};
|
AudioComponentDescription desc = {0};
|
||||||
#endif
|
#endif
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
(void)session_initialized;
|
(void)session_initialized;
|
||||||
(void)device;
|
(void)device;
|
||||||
|
@ -249,10 +250,12 @@ static void *coreaudio_init(const char *device,
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
#ifdef OSX_PPC
|
#ifdef OSX_PPC
|
||||||
if (OpenAComponent(comp, &dev->dev) != noErr)
|
component_unavailable = (OpenAComponent(comp, &dev->dev) != noErr);
|
||||||
#else
|
#else
|
||||||
if (AudioComponentInstanceNew(comp, &dev->dev) != noErr)
|
component_unavailable = (AudioComponentInstanceNew(comp, &dev->dev) != noErr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (component_unavailable)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
|
|
Loading…
Reference in New Issue