diff --git a/apps/settings.c b/apps/settings.c index ba29b894d5..5d33ad8f50 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -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; diff --git a/firmware/mpeg.c b/firmware/mpeg.c index a421e5da82..f309a78b7d 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -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[] = { diff --git a/firmware/mpeg.h b/firmware/mpeg.h index c9de7dc12c..66bad48583 100644 --- a/firmware/mpeg.h +++ b/firmware/mpeg.h @@ -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);