mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 05:04:17 +01:00
Sound (macOS): ignore input devices
This commit is contained in:
@@ -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