summaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-08-26 14:50:14 -0700
committerChris Robinson <[email protected]>2014-08-26 14:50:14 -0700
commit368bf037ddb05d143b0ef7d5ce16ab665a0872ef (patch)
treefef3c3fbcd7974f9fc850c798d812e73e54b70ca /Alc/backends
parent99b71278db582eb5a52995b3994f3b620200c951 (diff)
Check the given CoreAudio capture device name
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/coreaudio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/backends/coreaudio.c b/Alc/backends/coreaudio.c
index 10c80d08..59198b84 100644
--- a/Alc/backends/coreaudio.c
+++ b/Alc/backends/coreaudio.c
@@ -383,6 +383,11 @@ static ALCenum ca_open_capture(ALCdevice *device, const ALCchar *deviceName)
ca_data *data;
OSStatus err;
+ if(!deviceName)
+ deviceName = ca_device;
+ else if(strcmp(deviceName, ca_device) != 0)
+ return ALC_INVALID_VALUE;
+
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_HALOutput;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;