summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-03-14 12:33:49 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-03-14 12:33:49 -0400
commit92a0ab8789c622afecc47f3b399eda8abf26ee9e (patch)
tree065304be27d14d255aceed1cb0c53195fa608683 /firmware
parent714f7a21da43a9e1f3d3467c54df7616da4c680c (diff)
downloadrockbox-92a0ab8789c622afecc47f3b399eda8abf26ee9e.tar.gz
rockbox-92a0ab8789c622afecc47f3b399eda8abf26ee9e.tar.bz2
rockbox-92a0ab8789c622afecc47f3b399eda8abf26ee9e.zip
sound: add sound_numdecimals() to round out the sound setting query API
A necessary prerequisite for fixing FS#13272 Change-Id: Ice288af39a4f08bea376f920d855932bdac69a52
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/sound.h1
-rw-r--r--firmware/sound.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/firmware/export/sound.h b/firmware/export/sound.h
index 9bcb9a8513..2e04cac854 100644
--- a/firmware/export/sound.h
+++ b/firmware/export/sound.h
@@ -31,6 +31,7 @@ int sound_numdecimals(int setting);
int sound_steps(int setting);
int sound_min(int setting);
int sound_max(int setting);
+int sound_num_decimals(int setting);
int sound_current(int setting);
int sound_default(int setting);
sound_set_type* sound_get_fn(int setting);
diff --git a/firmware/sound.c b/firmware/sound.c
index acf198da2e..71bdc25003 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -98,6 +98,11 @@ int sound_default(int setting)
return get_settings_info(setting)->defaultval;
}
+int sound_num_decimals(int setting)
+{
+ return get_settings_info(setting)->numdecimals;
+}
+
sound_set_type * sound_get_fn(int setting)
{
return get_setting_entry(setting)->function;