summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2012-05-01 03:58:27 -0400
committerThomas Martitz <kugel@rockbox.org>2012-05-28 11:34:15 +0200
commitafc96087f8a6282cf732d142a4db7a3d604d39d8 (patch)
treeccdf78007bb087ab658edaa951f245ad4141bae2 /apps
parent08f5224b1bf1293ab1d59fdfbf9045561733c38d (diff)
downloadrockbox-afc96087f8a6282cf732d142a4db7a3d604d39d8.zip
rockbox-afc96087f8a6282cf732d142a4db7a3d604d39d8.tar.gz
rockbox-afc96087f8a6282cf732d142a4db7a3d604d39d8.tar.bz2
rockbox-afc96087f8a6282cf732d142a4db7a3d604d39d8.tar.xz
New crossfeed algorithm for Rockbox: "Meier" crossfeed
Emulates the basic "Meier" crossfeed (2 capacitors, 3 resistors) as discussed in http://www.meier-audio.homepage.t-online.de/passivefilter.htm This crossfeed blends a bit of low-pass filtered L signal into the R signal (and vice versa) while adding about 300 us delay to the crossfed-signal. A difference with the crossfeed already present in rockbox, is that this algorithm keeps the total spectrum flat (the one currently in rockbox accentuates low-frequency signals, making it sound a bit muffled). This implementation is quite lightweight, just 3 multiplies per left-right pair of samples. Has a default C implementation and optimized assembly versions for ARM and Coldfire. The crossfeed effect is quite subtle and is noticeable mostly one albums that have very strong left-right separation (e.g. one instrument only on the left, another only on the right). In the user interface, the new crossfeed option appears as "Meier" and is not configureable. The existing crossfeed is renamed to "Custom" as it allows itself to be customised. There is no entry for the user manual yet. Change-Id: Iaa100616fe0fcd7e16f08cdb9a7f41501973eee1
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang34
-rw-r--r--apps/plugin.c2
-rw-r--r--apps/plugin.h2
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c5
-rw-r--r--apps/settings.c2
-rw-r--r--apps/settings.h2
-rw-r--r--apps/settings_list.c6
7 files changed, 45 insertions, 8 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index fc575a3..7366a80 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -13052,3 +13052,37 @@
*: "Western European"
</voice>
</phrase>
+<phrase>
+ id: LANG_CROSSFEED_MEIER
+ desc: in sound settings
+ user: core
+ <source>
+ *: none
+ swcodec: "Simple (Meier)"
+ </source>
+ <dest>
+ *: none
+ swcodec: "Simple (Meier)"
+ </dest>
+ <voice>
+ *: none
+ swcodec: "Simple"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_CROSSFEED_CUSTOM
+ desc: in sound settings
+ user: core
+ <source>
+ *: none
+ swcodec: "Custom"
+ </source>
+ <dest>
+ *: none
+ swcodec: "Custom"
+ </dest>
+ <voice>
+ *: none
+ swcodec: "Custom"
+ </voice>
+</phrase>
diff --git a/apps/plugin.c b/apps/plugin.c
index afb336e..e0e565e 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -565,7 +565,7 @@ static const struct plugin_api rockbox_api = {
audio_set_output_source,
audio_set_input_source,
#endif
- dsp_crossfeed_enable,
+ dsp_set_crossfeed_type ,
dsp_eq_enable,
dsp_dither_enable,
#ifdef HAVE_PITCHCONTROL
diff --git a/apps/plugin.h b/apps/plugin.h
index b1d3c16..bb27781 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -682,7 +682,7 @@ struct plugin_api {
void (*audio_set_output_source)(int monitor);
void (*audio_set_input_source)(int source, unsigned flags);
#endif
- void (*dsp_crossfeed_enable)(bool enable);
+ void (*dsp_set_crossfeed_type)(int type);
void (*dsp_eq_enable)(bool enable);
void (*dsp_dither_enable)(bool enable);
#ifdef HAVE_PITCHCONTROL
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 7f92fb7..bcef4c6 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -457,8 +457,9 @@ static void sync_audio_setting(int setting, bool global)
break;
case MPEG_AUDIO_CROSSFEED:
- rb->dsp_crossfeed_enable((global || settings.crossfeed) ?
- rb->global_settings->crossfeed : false);
+ rb->dsp_set_crossfeed_type((global || settings.crossfeed) ?
+ rb->global_settings->crossfeed :
+ CROSSFEED_TYPE_NONE);
break;
case MPEG_AUDIO_EQUALIZER:
diff --git a/apps/settings.c b/apps/settings.c
index d777eb1..3bf9c5b 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -979,7 +979,7 @@ void settings_apply(bool read_disk)
audio_set_crossfade(global_settings.crossfade);
#endif
replaygain_update();
- dsp_crossfeed_enable(global_settings.crossfeed);
+ dsp_set_crossfeed_type(global_settings.crossfeed);
dsp_set_crossfeed_direct_gain(global_settings.crossfeed_direct_gain);
dsp_set_crossfeed_cross_params(global_settings.crossfeed_cross_gain,
global_settings.crossfeed_hf_attenuation,
diff --git a/apps/settings.h b/apps/settings.h
index 55d3344..ef0bae5 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -325,7 +325,7 @@ struct user_settings
struct replaygain_settings replaygain_settings;
/* Crossfeed */
- bool crossfeed; /* enable crossfeed */
+ int crossfeed; /* crossfeed type */
unsigned int crossfeed_direct_gain; /* dB x 10 */
unsigned int crossfeed_cross_gain; /* dB x 10 */
unsigned int crossfeed_hf_attenuation; /* dB x 10 */
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 10d00d5..accd51d 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1402,8 +1402,10 @@ const struct settings_list settings[] = {
#endif
/* crossfeed */
- OFFON_SETTING(F_SOUNDSETTING, crossfeed, LANG_CROSSFEED, false,
- "crossfeed", dsp_crossfeed_enable),
+ CHOICE_SETTING(F_SOUNDSETTING, crossfeed, LANG_CROSSFEED, 0,"crossfeed",
+ "off,meier,custom", dsp_set_crossfeed_type, 3,
+ ID2P(LANG_OFF), ID2P(LANG_CROSSFEED_MEIER),
+ ID2P(LANG_CROSSFEED_CUSTOM)),
INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_direct_gain,
LANG_CROSSFEED_DIRECT_GAIN, -15,
"crossfeed direct gain", UNIT_DB, -60, 0, 5,