summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-28 12:39:47 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-28 12:39:47 +0000
commitfd42ceba7b2b56c764be2bcddc108f8fcd82571f (patch)
treeab57ba92f46c759ead02290c115bbe7833cd91a6 /firmware
parenta3a51eca66603b379558b81bb93bf69e88d4c074 (diff)
Added mpeg_sound_numdecimals()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1245 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c18
-rw-r--r--firmware/mpeg.h1
2 files changed, 16 insertions, 3 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index f309a78b7d..6aca3c5d89 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -52,6 +52,13 @@ static char *units[] =
"%" /* Treble */
};
+static int numdecimals[] =
+{
+ 1, /* Volume */
+ 2, /* Bass */
+ 1 /* Treble */
+};
+
static int minval[] =
{
0, /* Volume */
@@ -78,6 +85,11 @@ char *mpeg_sound_unit(int setting)
return units[setting];
}
+int mpeg_sound_numdecimals(int setting)
+{
+ return numdecimals[setting];
+}
+
int mpeg_sound_min(int setting)
{
return minval[setting];
@@ -738,15 +750,15 @@ int mpeg_val2phys(int setting, int value)
switch(setting)
{
case SOUND_VOLUME:
- result = value * 2;
+ result = value * 20;
break;
case SOUND_BASS:
- result = value * 2;
+ result = value * 200;
break;
case SOUND_TREBLE:
- result = value * 2;
+ result = value * 20;
break;
}
return result;
diff --git a/firmware/mpeg.h b/firmware/mpeg.h
index 66bad48583..919f857738 100644
--- a/firmware/mpeg.h
+++ b/firmware/mpeg.h
@@ -32,6 +32,7 @@ int mpeg_sound_max(int setting);
int mpeg_sound_default(int setting);
int mpeg_val2phys(int setting, int value);
char *mpeg_sound_unit(int setting);
+int mpeg_sound_numdecimals(int setting);
struct mp3entry* mpeg_current_track(void);
#define SOUND_VOLUME 0