diff options
author | Chris Robinson <[email protected]> | 2012-03-13 13:48:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-03-13 13:48:42 -0700 |
commit | 3b165809ccebc5690f07f04c5be5549cfeb936e8 (patch) | |
tree | fa23b3904463683e07302996e72bc77b45ab75a1 /Alc/backends/coreaudio.c | |
parent | 5c59e6e7040dc74760b3c66a5c771d6227547051 (diff) |
Minor coreaudio fix, and make sure to set the device name
Diffstat (limited to 'Alc/backends/coreaudio.c')
-rw-r--r-- | Alc/backends/coreaudio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c index c0bcede4..1c02930e 100644 --- a/Alc/backends/coreaudio.c +++ b/Alc/backends/coreaudio.c @@ -162,14 +162,12 @@ static ALCenum ca_open_playback(ALCdevice *device, const ALCchar *deviceName) } data = calloc(1, sizeof(*data)); - device->ExtraData = data; err = OpenAComponent(comp, &data->audioUnit); if(err != noErr) { ERR("OpenAComponent failed\n"); free(data); - device->ExtraData = NULL; return ALC_INVALID_VALUE; } @@ -180,10 +178,11 @@ static ALCenum ca_open_playback(ALCdevice *device, const ALCchar *deviceName) ERR("AudioUnitInitialize failed\n"); CloseComponent(data->audioUnit); free(data); - device->ExtraData = NULL; - return ALC_FALSE; + return ALC_INVALID_VALUE; } + device->szDeviceName = strdup(deviceName); + device->ExtraData = data; return ALC_NO_ERROR; } |