API change for default sound settings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1244 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
667fb7c6e9
commit
a3a51eca66
3 changed files with 17 additions and 3 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "debug.h"
|
||||
#include "button.h"
|
||||
#include "lcd.h"
|
||||
#include "mpeg.h"
|
||||
|
||||
struct user_settings global_settings;
|
||||
|
||||
|
@ -65,10 +66,10 @@ void reset_settings( struct user_settings *settings ) {
|
|||
|
||||
DEBUGF( "reset_settings()\n" );
|
||||
|
||||
settings->volume = DEFAULT_VOLUME_SETTING;
|
||||
settings->volume = mpeg_sound_default(SOUND_VOLUME);
|
||||
settings->balance = DEFAULT_BALANCE_SETTING;
|
||||
settings->bass = DEFAULT_BASS_SETTING;
|
||||
settings->treble = DEFAULT_TREBLE_SETTING;
|
||||
settings->bass = mpeg_sound_default(SOUND_BASS);
|
||||
settings->treble = mpeg_sound_default(SOUND_TREBLE);
|
||||
settings->loudness = DEFAULT_LOUDNESS_SETTING;
|
||||
settings->bass_boost = DEFAULT_BASS_BOOST_SETTING;
|
||||
settings->contrast = DEFAULT_CONTRAST_SETTING;
|
||||
|
|
|
@ -66,6 +66,13 @@ static int maxval[] =
|
|||
50 /* Treble */
|
||||
};
|
||||
|
||||
static int defaultval[] =
|
||||
{
|
||||
70/2, /* Volume */
|
||||
50/2, /* Bass */
|
||||
50/2 /* Treble */
|
||||
};
|
||||
|
||||
char *mpeg_sound_unit(int setting)
|
||||
{
|
||||
return units[setting];
|
||||
|
@ -81,6 +88,11 @@ int mpeg_sound_max(int setting)
|
|||
return maxval[setting];
|
||||
}
|
||||
|
||||
int mpeg_sound_default(int setting)
|
||||
{
|
||||
return defaultval[setting];
|
||||
}
|
||||
|
||||
#ifndef ARCHOS_RECORDER
|
||||
static unsigned int bass_table[] =
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@ void mpeg_prev(void);
|
|||
void mpeg_sound_set(int setting, int value);
|
||||
int mpeg_sound_min(int setting);
|
||||
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);
|
||||
struct mp3entry* mpeg_current_track(void);
|
||||
|
|
Loading…
Reference in a new issue