]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Update some slightly outdated comments in common.h and shairport-sync.conf
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 23 Jul 2023 11:18:52 +0000 (13:18 +0200)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 23 Jul 2023 11:18:52 +0000 (13:18 +0200)
common.h
scripts/shairport-sync.conf

index 0c4d92ec3c3e5020efcb10674fb509cd2666bd08..c8e8915bc82f355646d930a09c410039b168c853 100644 (file)
--- a/common.h
+++ b/common.h
@@ -391,13 +391,12 @@ uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode);
 // dB), return an attenuation depending on a linear interpolation along the range
 double flat_vol2attn(double vol, long max_db, long min_db);
 
-// given a volume (0 to -30) and high and low attenuations in dB*100 (e.g. 0 to -6000 for 0 to -60
-// dB), return an attenuation depending on a logarithmic interpolation along the range.
-// The intention behind this attenuation function is that a given percentage change in volume
-// should result in the same percentage change in perceived loudness. For instance, a doubling
-// (100% increase) of volume level should result in a doubling of perceived loudness.
+// The intention behind dasl_tapered is that a given percentage change in volume should result in the same percentage change in
+// perceived loudness. For instance, doubling the volume level should result in doubling the perceived loudness.
+// With the range of AirPlay volume being from -30 to 0, doubling the volume from -22.5 to -15 results in an increase of 10 dB.
+// Similarly, doubling the volume from -15 to 0 results in an increase of 10 dB.
+// For compatibility with mixers having a restricted attenuation range (e.g. 30 dB), "dasl_tapered" will switch to a flat profile at low AirPlay volumes.
 double dasl_tapered_vol2attn(double vol, long max_db, long min_db);
-
 // given a volume (0 to -30) and high and low attenuations in dB*100 (e.g. 0 to -6000 for 0 to -60
 // dB), return an attenuation depending on the transfer function
 double vol2attn(double vol, long max_db, long min_db);
index 5528712d874cecd4821579f4378ce710f509fe66..3f4c152f565caf4dd433f18f25f86e18e561bb03 100644 (file)
@@ -44,7 +44,11 @@ general =
 //             "flat" makes the volume change at the same rate at all volumes.
 //             "dasl_tapered" is similar to "standard" - it makes the volume change more quickly at lower volumes and slower at higher volumes.
 //                     The intention behind dasl_tapered is that a given percentage change in volume should result in the same percentage change in
-//                     perceived loudness. For instance, a doubling (100% increase) of volume level should result in a doubling of perceived loudness.
+//                     perceived loudness. For instance, doubling the volume level should result in doubling the perceived loudness.
+//                     With the range of AirPlay volume being from -30 to 0, doubling the volume from -22.5 to -15 results in an increase of 10 dB.
+//                     Similarly, doubling the volume from -15 to 0 results in an increase of 10 dB.
+//                     For compatibility with mixers having a restricted attenuation range (e.g. 30 dB), "dasl_tapered" will switch to a flat profile at low AirPlay volumes.
+
 //     volume_control_combined_hardware_priority = "no"; // when extending the volume range by combining the built-in software attenuator with the hardware mixer attenuator, set this to "yes" to reduce volume by using the hardware mixer first, then the built-in software attenuator.
 
 //     default_airplay_volume = -24.0; // this is the suggested volume after a reset or after the high_volume_threshold has been exceed and the high_volume_idle_timeout_in_minutes has passed