From 5b27e2255a8bbb8645f089b8e721343bba5bd396 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 22 Nov 2022 04:10:35 +0000 Subject: Add perceptual volume adjustment The perceived loudness change of a change in volume depends on the listening volume: at high volumes a 1 dB increment is noticeable, but at low volumes a larger increment is needed to get a comparable change in loudness. Perceptual volume adjustment accounts for this fact, and divides the hardware volume range into a number of steps. Each step changes the dB volume by a variable amount, with most of the steps concentrated at higher volumes. This makes it possible to sweep over the entire hardware volume range quickly, without losing the ability to finely adjust the volume at normal listening levels. Use "Volume Adjustment Mode" in the system settings menu to select perceptual volume mode. The number of steps used is controlled by "Number of Volume Steps". (Number of steps has no effect in direct adjustment mode.) It's still possible to set a specific dB volume level from the sound settings menu when perceptual volume is enabled, and perceptual volume does not affect the volume displayed by themes. Change-Id: I6f91fd3f7c5e2d323a914e47b5653033e92b4b3b --- firmware/export/config.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/export/config.h') diff --git a/firmware/export/config.h b/firmware/export/config.h index 2ec0b7878f..0882cad61c 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -1319,6 +1319,10 @@ Lyre prototype 1 */ # define HAVE_SCREENDUMP #endif +#if !defined(BOOTLOADER) && MEMORYSIZE > 2 +# define HAVE_PERCEPTUAL_VOLUME +#endif + /* null audiohw setting macro for when codec header is included for reasons other than audio support */ #define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...) -- cgit v1.2.3