diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-01-12 00:24:15 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-01-12 00:24:15 +0000 |
commit | 76b257fd40217013b3107148090c2062f06097e5 (patch) | |
tree | edb08fb3b29d3fc930c7f48c6404dbde421d8a27 /apps | |
parent | 01c484c5d27906f30f7fd9f2cc3f1d9073269c95 (diff) | |
download | rockbox-76b257fd40217013b3107148090c2062f06097e5.tar.gz rockbox-76b257fd40217013b3107148090c2062f06097e5.zip |
New channel configuration setting, allowing fine-grained control of the stereo width. This replaces the 'stereo narrow' and 'stereo wide' modes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5559 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lang/deutsch.lang | 37 | ||||
-rw-r--r-- | apps/lang/english.lang | 31 | ||||
-rw-r--r-- | apps/main.c | 2 | ||||
-rw-r--r-- | apps/settings.c | 22 | ||||
-rw-r--r-- | apps/settings.h | 3 | ||||
-rw-r--r-- | apps/sound_menu.c | 18 |
6 files changed, 74 insertions, 39 deletions
diff --git a/apps/lang/deutsch.lang b/apps/lang/deutsch.lang index 8aa8425c47..1010493231 100644 --- a/apps/lang/deutsch.lang +++ b/apps/lang/deutsch.lang @@ -1261,22 +1261,22 @@ voice: "LCD-Modus" new: "LCD-Modus" id: LANG_CHANNEL_STEREO_NARROW_PLAYER -desc: in sound_settings -eng: "St. Narrow" -voice: "Stereo schmal" -new: "St. schmal" +desc: DEPRECATED +eng: "" +voice: "" +new: id: LANG_CHANNEL_STEREO_NARROW_RECORDER -desc: in sound_settings -eng: "Stereo Narrow" -voice: "Stereo schmal" -new: "Stereo schmal" +desc: DEPRECATED +eng: "" +voice: "" +new: id: LANG_CHANNEL_STEREO_WIDE -desc: in sound_settings -eng: "Stereo Wide" -voice: "Stereo breit" -new: "Stereo breit" +desc: DEPRECATED +eng: "" +voice: "" +new: id: LANG_CHANNEL_KARAOKE desc: in sound_settings @@ -2846,3 +2846,16 @@ eng: "" voice: " " new: +id: LANG_STEREO_WIDTH +desc: in sound_settings +eng: "Stereo width" +voice: "Stereobasisbreite" +new: "Stereobasisbreite" + +id: LANG_CHANNEL_CUSTOM +desc: in sound_settings +eng: "Custom" +voice: "Angepasst" +new: "Angepasst" + + diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 1f2dd4d9e3..4cc95b8383 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -1274,21 +1274,21 @@ voice: "LCD Mode" new: id: LANG_CHANNEL_STEREO_NARROW_PLAYER -desc: in sound_settings -eng: "St. Narrow" -voice: "Stereo Narrow" +desc: DEPRECATED +eng: "" +voice: "" new: id: LANG_CHANNEL_STEREO_NARROW_RECORDER -desc: in sound_settings -eng: "Stereo Narrow" -voice: "Stereo Narrow" +desc: DEPRECATED +eng: "" +voice: "" new: id: LANG_CHANNEL_STEREO_WIDE -desc: in sound_settings -eng: "Stereo Wide" -voice: "Stereo Wide" +desc: DEPRECATED +eng: "" +voice: "" new: id: LANG_CHANNEL_KARAOKE @@ -2860,3 +2860,16 @@ eng: "" voice: " " new: +id: LANG_STEREO_WIDTH +desc: in sound_settings +eng: "Stereo width" +voice: "Stereo width" +new: + +id: LANG_CHANNEL_CUSTOM +desc: in sound_settings +eng: "Custom" +voice: "Custom" +new: + + diff --git a/apps/main.c b/apps/main.c index 964a7c8b4f..cc270ba136 100644 --- a/apps/main.c +++ b/apps/main.c @@ -140,6 +140,7 @@ void init(void) global_settings.loudness, global_settings.avc, global_settings.channel_config, + global_settings.stereo_width, global_settings.mdb_strength, global_settings.mdb_harmonics, global_settings.mdb_center, @@ -272,6 +273,7 @@ void init(void) global_settings.loudness, global_settings.avc, global_settings.channel_config, + global_settings.stereo_width, global_settings.mdb_strength, global_settings.mdb_harmonics, global_settings.mdb_center, diff --git a/apps/settings.c b/apps/settings.c index d4945d4431..ca1b900ef4 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -71,7 +71,7 @@ const char rec_base_directory[] = REC_BASE_DIR; -#define CONFIG_BLOCK_VERSION 18 +#define CONFIG_BLOCK_VERSION 19 #define CONFIG_BLOCK_SIZE 512 #define RTC_BLOCK_SIZE 44 @@ -170,8 +170,9 @@ static const struct bit_entry rtc_bits[] = {3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" }, {1, S_O(superbass), false, "superbass", off_on }, #endif - {3, S_O(channel_config), 6, "channels", - "stereo,stereo narrow,mono,mono left,mono right,karaoke,stereo wide" }, + {3, S_O(channel_config), 0, "channels", + "stereo,mono,custom,mono left,mono right,karaoke" }, + {8, S_O(stereo_width), 100, "stereo width", NULL}, /* playback */ {2, S_O(resume), RESUME_ASK, "resume", "off,ask,ask once,on" }, {1, S_O(playlist_shuffle), false, "shuffle", off_on }, @@ -206,7 +207,7 @@ static const struct bit_entry rtc_bits[] = #endif {1, S_O(show_icons), true, "show icons", off_on }, /* system */ - {4, S_O(poweroff), 10, + {4, S_O(poweroff), 10, "idle poweroff", "off,1,2,3,4,5,6,7,8,9,10,15,30,45,60" }, {18, S_O(runtime), 0, NULL, NULL }, {18, S_O(topruntime), 0, NULL, NULL }, @@ -221,19 +222,20 @@ static const struct bit_entry rtc_bits[] = #endif {12, S_O(battery_capacity), BATTERY_CAPACITY_MIN, "battery capacity", NULL }, /* 1500...3200 for NiMH, 2200...3200 for LiIon, - 1000...2000 for Alkaline */ + 500...1500 for Alkaline */ #ifdef HAVE_CHARGING {1, S_O(car_adapter_mode), false, "car adapter mode", off_on }, #endif - - /* new stuff to be added here */ - /* If values are just added to the end, no need to bump the version. */ + /* tuner */ #ifdef CONFIG_TUNER {1, S_O(fm_force_mono), false, "force fm mono", off_on }, {8, S_O(last_frequency), 0, NULL, NULL }, /* Default: MIN_FREQ */ #endif - /* Current sum of bits: 286 (worst case) */ + /* new stuff to be added here */ + /* If values are just added to the end, no need to bump the version. */ + + /* Current sum of bits: 259 (worst case) */ /* Sum of all bit sizes must not grow beyond 288! */ }; @@ -716,6 +718,7 @@ void sound_settings_apply(void) mpeg_sound_set(SOUND_BALANCE, global_settings.balance); mpeg_sound_set(SOUND_VOLUME, global_settings.volume); mpeg_sound_set(SOUND_CHANNELS, global_settings.channel_config); + mpeg_sound_set(SOUND_STEREO_WIDTH, global_settings.stereo_width); #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness); mpeg_sound_set(SOUND_AVC, global_settings.avc); @@ -1261,6 +1264,7 @@ void settings_reset(void) { global_settings.loudness = mpeg_sound_default(SOUND_LOUDNESS); global_settings.avc = mpeg_sound_default(SOUND_AVC); global_settings.channel_config = mpeg_sound_default(SOUND_CHANNELS); + global_settings.stereo_width = mpeg_sound_default(SOUND_STEREO_WIDTH); global_settings.mdb_strength = mpeg_sound_default(SOUND_MDB_STRENGTH); global_settings.mdb_harmonics = mpeg_sound_default(SOUND_MDB_HARMONICS); global_settings.mdb_center = mpeg_sound_default(SOUND_MDB_CENTER); diff --git a/apps/settings.h b/apps/settings.h index 8d92aa9ad1..88bc71804a 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -129,7 +129,8 @@ struct user_settings int treble; /* treble eq: 0-100 0=low 100=high */ int loudness; /* loudness eq: 0-100 0=off 100=max */ int avc; /* auto volume correct: 0=off, 1=20ms, 2=2s 3=4s 4=8s */ - int channel_config; /* Stereo, Mono, Mono left, Mono right */ + int channel_config; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */ + int stereo_width; /* 0-255% */ int mdb_strength; /* 0-127dB */ int mdb_harmonics; /* 0-100% */ int mdb_center; /* 20-300Hz */ diff --git a/apps/sound_menu.c b/apps/sound_menu.c index de5b8c0a8c..6e5b74bfa3 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c @@ -385,19 +385,20 @@ static bool chanconf(void) { static const struct opt_items names[] = { { STR(LANG_CHANNEL_STEREO) }, -#ifdef HAVE_LCD_CHARCELLS - { STR(LANG_CHANNEL_STEREO_NARROW_PLAYER) }, -#else - { STR(LANG_CHANNEL_STEREO_NARROW_RECORDER) }, -#endif { STR(LANG_CHANNEL_MONO) }, + { STR(LANG_CHANNEL_CUSTOM) }, { STR(LANG_CHANNEL_LEFT) }, { STR(LANG_CHANNEL_RIGHT) }, - { STR(LANG_CHANNEL_KARAOKE) }, - { STR(LANG_CHANNEL_STEREO_WIDE) } + { STR(LANG_CHANNEL_KARAOKE) } }; return set_option(str(LANG_CHANNEL), &global_settings.channel_config, INT, - names, 7, set_chanconf ); + names, 6, set_chanconf ); +} + +static bool stereo_width(void) +{ + return set_sound(str(LANG_STEREO_WIDTH), &global_settings.stereo_width, + SOUND_STEREO_WIDTH); } bool sound_menu(void) @@ -410,6 +411,7 @@ bool sound_menu(void) { ID2P(LANG_TREBLE), treble }, { ID2P(LANG_BALANCE), balance }, { ID2P(LANG_CHANNEL_MENU), chanconf }, + { ID2P(LANG_STEREO_WIDTH), stereo_width }, #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) { ID2P(LANG_LOUDNESS), loudness }, { ID2P(LANG_AUTOVOL), avc }, |