Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: wish: save different sound settings
From: Justin Heiner (jheiner_at_yahoo.com)
Date: 2002-08-08


I created a beginning patch for what you're talking about. It adds an menu to
the sound_menu.c file called "Load_EQ_Preset". There's a few options at the
moment (Default, Headphones, Flat, Max Bass, Max Treble), and no ability to
save yet (since we haven't implemented SAVE_TO_DISK yet).

It's kind of a neat little feature, but because of the freeze, it'll have to
wait until after 1.2

-Justin

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

? firmware/.deps
Index: apps/sound_menu.c
===================================================================
RCS file: /cvsroot/rockbox/apps/sound_menu.c,v
retrieving revision 1.18
diff -u -r1.18 sound_menu.c
--- apps/sound_menu.c 27 Jul 2002 22:45:29 -0000 1.18
+++ apps/sound_menu.c 8 Aug 2002 02:44:09 -0000
@@ -122,6 +122,56 @@
     set_sound("Treble", &global_settings.treble, SOUND_TREBLE);
 }
 
+static void load_eq_preset(void)
+{
+ char* names[] = {"Default ", "Headphones ", "Flat ", "Bass Only ", "Treble Only"};
+ int eq_preset = 0;
+ set_option("[Load EQ Preset]", &eq_preset, names, 5 );
+ switch(eq_preset)
+ {
+ case 0:
+ {
+ global_settings.bass = 22;
+ global_settings.treble = 22;
+ mpeg_sound_set(SOUND_BASS, global_settings.bass);
+ mpeg_sound_set(SOUND_TREBLE, global_settings.treble);
+ break;
+ }
+ case 1:
+ {
+ global_settings.bass = 27;
+ global_settings.treble = 30;
+ mpeg_sound_set(SOUND_BASS, global_settings.bass);
+ mpeg_sound_set(SOUND_TREBLE, global_settings.treble);
+ break;
+ }
+ case 2:
+ {
+ global_settings.bass = 15;
+ global_settings.treble = 15;
+ mpeg_sound_set(SOUND_BASS, global_settings.bass);
+ mpeg_sound_set(SOUND_TREBLE, global_settings.treble);
+ break;
+ }
+ case 3:
+ {
+ global_settings.bass = 30;
+ global_settings.treble = 0;
+ mpeg_sound_set(SOUND_BASS, global_settings.bass);
+ mpeg_sound_set(SOUND_TREBLE, global_settings.treble);
+ break;
+ }
+ case 4:
+ {
+ global_settings.bass = 0;
+ global_settings.treble = 30;
+ mpeg_sound_set(SOUND_BASS, global_settings.bass);
+ mpeg_sound_set(SOUND_TREBLE, global_settings.treble);
+ break;
+ }
+ }
+}
+
 #ifdef ARCHOS_RECORDER
 static void loudness(void)
 {
@@ -148,6 +198,7 @@
         { "Volume", volume },
         { "Bass", bass },
         { "Treble", treble },
+ { "Load EQ Preset", load_eq_preset },
 #ifdef ARCHOS_RECORDER
         { "Loudness", loudness },
         { "Bass Boost", bass_boost },



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa