Sound (macOS): detecting volume more aggressively

This commit is contained in:
李通洲
2023-05-26 15:18:59 +08:00
parent 60c1a552bb
commit bb4bf63621
5 changed files with 40 additions and 6 deletions
+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);