Sound (macOS): detecting volume more aggressively

This commit is contained in:
李通洲 authored and Carter Li committed 2023-05-28 00:17:57 +08:00
1 parent 04da7cebdb
commit d4a7ae8b34
5 files changed
+40 -6

No files matched your search

+7 -4
View File
@@ -11,10 +11,13 @@ static void printDevice(FFinstance* instance, const FFSoundDevice* device, uint8
ffPrintLogoAndKey(instance, FF_SOUND_MODULE_NAME, index, &instance->config.sound.key);
ffStrbufWriteTo(&device->name, stdout);
if(device->volume > 0)
printf(" (%d%%)", device->volume);
else
fputs(" (muted)", stdout);
if(device->volume != FF_SOUND_VOLUME_UNKNOWN)
{
if(device->volume > 0)
printf(" (%d%%)", device->volume);
else
fputs(" (muted)", stdout);
}
if(device->main && index > 0)
fputs(" (*)", stdout);