From 8821ec286171a67ae61158551f4884c7c926e330 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 23 Jul 2023 13:18:52 +0200 Subject: [PATCH] Update some slightly outdated comments in common.h and shairport-sync.conf --- common.h | 11 +++++------ scripts/shairport-sync.conf | 6 +++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/common.h b/common.h index 0c4d92ec..c8e8915b 100644 --- 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); diff --git a/scripts/shairport-sync.conf b/scripts/shairport-sync.conf index 5528712d..3f4c152f 100644 --- a/scripts/shairport-sync.conf +++ b/scripts/shairport-sync.conf @@ -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