--- sound_menu.c.old Thu Aug 8 11:34:00 2002 +++ sound_menu.c Thu Aug 8 11:22:32 2002 @@ -122,6 +122,65 @@ set_sound("Treble", &global_settings.treble, SOUND_TREBLE); } +static void load_eq_preset(void) +{ + char* names[] = {"User ", "Headphones ", "Flat "}; + int eq_preset = 0; + set_option("[Load EQ Preset]", &eq_preset, names, 3 ); + +#ifdef ARCHOS_RECORDER + switch(eq_preset) + { + case 0: /* User */ + { + mpeg_sound_set(SOUND_BASS, global_settings.bass); + mpeg_sound_set(SOUND_TREBLE, global_settings.treble); + mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness); + mpeg_sound_set(SOUND_SUPERBASS, global_settings.bass_boost); + break; + } + case 1: /* Headphones */ + { + mpeg_sound_set(SOUND_BASS, 12+9); + mpeg_sound_set(SOUND_TREBLE, 12+6); + mpeg_sound_set(SOUND_LOUDNESS, 12); + mpeg_sound_set(SOUND_SUPERBASS, 7); + break; + } + case 2: /* Flat */ + { + mpeg_sound_set(SOUND_BASS, 12); + mpeg_sound_set(SOUND_TREBLE, 12); + mpeg_sound_set(SOUND_LOUDNESS, 0); + mpeg_sound_set(SOUND_SUPERBASS, 0); + break; + } + } +#else + switch(eq_preset) + { + case 0: /* User */ + { + mpeg_sound_set(SOUND_BASS, global_settings.bass); + mpeg_sound_set(SOUND_TREBLE, global_settings.treble); + break; + } + case 1: /* Headphones */ + { + mpeg_sound_set(SOUND_BASS, 15+10); + mpeg_sound_set(SOUND_TREBLE, 15+7); + break; + } + case 2: /* Flat */ + { + mpeg_sound_set(SOUND_BASS, 15); + mpeg_sound_set(SOUND_TREBLE, 15); + break; + } + } +#endif /* ARCHOS_RECORDER */ +} + #ifdef ARCHOS_RECORDER static void loudness(void) { @@ -151,8 +210,9 @@ #ifdef ARCHOS_RECORDER { "Loudness", loudness }, { "Bass Boost", bass_boost }, - { "Auto Volume", avc } + { "Auto Volume", avc }, #endif + { "Load EQ Preset", load_eq_preset } }; m=menu_init( items, sizeof items / sizeof(struct menu_items) );