Sound (BSD): trim device names

This commit is contained in:
Carter Li
2024-11-10 20:15:42 +08:00
committed by 李通洲
parent 59c666515a
commit f98e6c9d4e
+1
View File
@@ -39,6 +39,7 @@ const char* ffDetectSound(FFlist* devices)
FFSoundDevice* device = ffListAdd(devices);
ffStrbufInitS(&device->identifier, path);
ffStrbufInitF(&device->name, "%s %s", ci.longname, ci.hw_info);
ffStrbufTrimRightSpace(&device->name);
device->volume = mutemask & SOUND_MASK_VOLUME
? 0
: ((uint8_t) volume /*left*/ + (uint8_t) (volume >> 8) /*right*/) / 2;