From f0bec023d9ff45cede09274dff12f015f0830a38 Mon Sep 17 00:00:00 2001 From: PurlingNayuki Date: Sat, 21 Dec 2013 21:33:54 +0800 Subject: Implement volume limiter feature Add a "volume limit" parameter to the configuration file. The maximum value of volume setting in sound menu will be limited to the same as volume limit. Also each time when setvol() is excuted, Rockbox will check if the global_settings.volume value larger than global_settings.volume_limit. If larger, take the value of volume_limit instead. The volume_limit argument shares the same maximum and minimum values with volume argument, while taking the maximum volume as its default value. Change-Id: I8ca9bc6ea6e617b48fc346aae5f2a0a1d259ae36 Reviewed-on: http://gerrit.rockbox.org/697 Reviewed-by: Jonathan Gordon --- apps/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apps/settings.h') diff --git a/apps/settings.h b/apps/settings.h index 087ff0cb45..62ae038385 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -828,6 +828,7 @@ struct user_settings #ifdef HAVE_PLAY_FREQ int play_frequency; /* core audio output frequency selection */ #endif + int volume_limit; /* maximum volume limit */ }; /** global variables **/ -- cgit v1.2.3