forked from len0rd/rockbox
Added mpeg_sound_numdecimals()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1245 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a3a51eca66
commit
fd42ceba7b
2 changed files with 16 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue