mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
Sound (macOS): ignore input devices
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user