diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f04c805a..ffdc06726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Bugfixes: * Fix possible crashes on Windows 7 (Disk, Windows) * Fix possible crashes caused by uninitialized strings (Users, Windows) * Improve support of `--help *-format` and several bugs are found and fixed +* Don't incorrectly print `No active sound devices found` when using a non-controllable sound device (Sound, macOS) # 2.1.0 diff --git a/src/detection/sound/sound_apple.c b/src/detection/sound/sound_apple.c index 092d4479d..1d1962164 100644 --- a/src/detection/sound/sound_apple.c +++ b/src/detection/sound/sound_apple.c @@ -41,6 +41,14 @@ const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */) }, 0, NULL, &dataSize, &name) != kAudioHardwareNoError) continue; + // Ignore input devices + if(AudioObjectGetPropertyDataSize(deviceId, &(AudioObjectPropertyAddress){ + kAudioDevicePropertyStreams, + kAudioObjectPropertyScopeInput, + kAudioObjectPropertyElementMain + }, 0, NULL, &dataSize) == kAudioHardwareNoError && dataSize > 0) + continue; + uint32_t connected; dataSize = sizeof(connected); if(AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress){