libobs: Rework checking Mac audio device capabilities
As of commit 2eb5a22, CoreAudio devices that use one device handle for both input and output can no longer be used for audio monitoring. This commit fixes that. Tested with the built-in output, a Magewell XI100DUSB-HDMI which is input only, and a MOTU UltraLite audio interface, which shows as output/input capable.
This commit is contained in:
parent
310c98e641
commit
002696e795
@ -25,16 +25,14 @@ static bool obs_enum_audio_monitoring_device(obs_enum_audio_device_cb cb,
|
||||
|
||||
AudioObjectPropertyAddress addr = {
|
||||
kAudioDevicePropertyStreams,
|
||||
kAudioDevicePropertyScopeInput,
|
||||
kAudioDevicePropertyScopeOutput,
|
||||
kAudioObjectPropertyElementMaster
|
||||
};
|
||||
|
||||
/* check to see if it's a mac input device */
|
||||
if (!allow_inputs) {
|
||||
AudioObjectGetPropertyDataSize(id, &addr, 0, NULL, &size);
|
||||
if (size)
|
||||
return true;
|
||||
}
|
||||
/* Check if the device is capable of audio output. */
|
||||
AudioObjectGetPropertyDataSize(id, &addr, 0, NULL, &size);
|
||||
if (!allow_inputs && !size)
|
||||
return true;
|
||||
|
||||
size = sizeof(CFStringRef);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user