From 368bf037ddb05d143b0ef7d5ce16ab665a0872ef Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 26 Aug 2014 14:50:14 -0700 Subject: Check the given CoreAudio capture device name --- Alc/backends/coreaudio.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Alc') 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; -- cgit v1.2.3