diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2012-05-01 03:58:27 -0400 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-05-28 11:34:15 +0200 |
commit | afc96087f8a6282cf732d142a4db7a3d604d39d8 (patch) | |
tree | ccdf78007bb087ab658edaa951f245ad4141bae2 /apps | |
parent | 08f5224b1bf1293ab1d59fdfbf9045561733c38d (diff) | |
download | rockbox-afc96087f8a6282cf732d142a4db7a3d604d39d8.tar.gz rockbox-afc96087f8a6282cf732d142a4db7a3d604d39d8.zip |
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.lang | 34 | ||||
-rw-r--r-- | apps/plugin.c | 2 | ||||
-rw-r--r-- | apps/plugin.h | 2 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_settings.c | 5 | ||||
-rw-r--r-- | apps/settings.c | 2 | ||||
-rw-r--r-- | apps/settings.h | 2 | ||||
-rw-r--r-- | apps/settings_list.c | 6 |
7 files changed, 45 insertions, 8 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index fc575a3764..7366a80030 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -13052,3 +13052,37 @@ | |||
13052 | *: "Western European" | 13052 | *: "Western European" |
13053 | </voice> | 13053 | </voice> |
13054 | </phrase> | 13054 | </phrase> |
13055 | <phrase> | ||
13056 | id: LANG_CROSSFEED_MEIER | ||
13057 | desc: in sound settings | ||
13058 | user: core | ||
13059 | <source> | ||
13060 | *: none | ||
13061 | swcodec: "Simple (Meier)" | ||
13062 | </source> | ||
13063 | <dest> | ||
13064 | *: none | ||
13065 | swcodec: "Simple (Meier)" | ||
13066 | </dest> | ||
13067 | <voice> | ||
13068 | *: none | ||
13069 | swcodec: "Simple" | ||
13070 | </voice> | ||
13071 | </phrase> | ||
13072 | <phrase> | ||
13073 | id: LANG_CROSSFEED_CUSTOM | ||
13074 | desc: in sound settings | ||
13075 | user: core | ||
13076 | <source> | ||
13077 | *: none | ||
13078 | swcodec: "Custom" | ||
13079 | </source> | ||
13080 | <dest> | ||
13081 | *: none | ||
13082 | swcodec: "Custom" | ||
13083 | </dest> | ||
13084 | <voice> | ||
13085 | *: none | ||
13086 | swcodec: "Custom" | ||
13087 | </voice> | ||
13088 | </phrase> | ||
diff --git a/apps/plugin.c b/apps/plugin.c index afb336ebdc..e0e565e504 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -565,7 +565,7 @@ static const struct plugin_api rockbox_api = { | |||
565 | audio_set_output_source, | 565 | audio_set_output_source, |
566 | audio_set_input_source, | 566 | audio_set_input_source, |
567 | #endif | 567 | #endif |
568 | dsp_crossfeed_enable, | 568 | dsp_set_crossfeed_type , |
569 | dsp_eq_enable, | 569 | dsp_eq_enable, |
570 | dsp_dither_enable, | 570 | dsp_dither_enable, |
571 | #ifdef HAVE_PITCHCONTROL | 571 | #ifdef HAVE_PITCHCONTROL |
diff --git a/apps/plugin.h b/apps/plugin.h index b1d3c16979..bb2778164b 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -682,7 +682,7 @@ struct plugin_api { | |||
682 | void (*audio_set_output_source)(int monitor); | 682 | void (*audio_set_output_source)(int monitor); |
683 | void (*audio_set_input_source)(int source, unsigned flags); | 683 | void (*audio_set_input_source)(int source, unsigned flags); |
684 | #endif | 684 | #endif |
685 | void (*dsp_crossfeed_enable)(bool enable); | 685 | void (*dsp_set_crossfeed_type)(int type); |
686 | void (*dsp_eq_enable)(bool enable); | 686 | void (*dsp_eq_enable)(bool enable); |
687 | void (*dsp_dither_enable)(bool enable); | 687 | void (*dsp_dither_enable)(bool enable); |
688 | #ifdef HAVE_PITCHCONTROL | 688 | #ifdef HAVE_PITCHCONTROL |
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 7f92fb7c69..bcef4c66bf 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) | |||
457 | break; | 457 | break; |
458 | 458 | ||
459 | case MPEG_AUDIO_CROSSFEED: | 459 | case MPEG_AUDIO_CROSSFEED: |
460 | rb->dsp_crossfeed_enable((global || settings.crossfeed) ? | 460 | rb->dsp_set_crossfeed_type((global || settings.crossfeed) ? |
461 | rb->global_settings->crossfeed : false); | 461 | rb->global_settings->crossfeed : |
462 | CROSSFEED_TYPE_NONE); | ||
462 | break; | 463 | break; |
463 | 464 | ||
464 | case MPEG_AUDIO_EQUALIZER: | 465 | case MPEG_AUDIO_EQUALIZER: |
diff --git a/apps/settings.c b/apps/settings.c index d777eb1565..3bf9c5bf17 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -979,7 +979,7 @@ void settings_apply(bool read_disk) | |||
979 | audio_set_crossfade(global_settings.crossfade); | 979 | audio_set_crossfade(global_settings.crossfade); |
980 | #endif | 980 | #endif |
981 | replaygain_update(); | 981 | replaygain_update(); |
982 | dsp_crossfeed_enable(global_settings.crossfeed); | 982 | dsp_set_crossfeed_type(global_settings.crossfeed); |
983 | dsp_set_crossfeed_direct_gain(global_settings.crossfeed_direct_gain); | 983 | dsp_set_crossfeed_direct_gain(global_settings.crossfeed_direct_gain); |
984 | dsp_set_crossfeed_cross_params(global_settings.crossfeed_cross_gain, | 984 | dsp_set_crossfeed_cross_params(global_settings.crossfeed_cross_gain, |
985 | global_settings.crossfeed_hf_attenuation, | 985 | global_settings.crossfeed_hf_attenuation, |
diff --git a/apps/settings.h b/apps/settings.h index 55d3344cb2..ef0bae520e 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -325,7 +325,7 @@ struct user_settings | |||
325 | struct replaygain_settings replaygain_settings; | 325 | struct replaygain_settings replaygain_settings; |
326 | 326 | ||
327 | /* Crossfeed */ | 327 | /* Crossfeed */ |
328 | bool crossfeed; /* enable crossfeed */ | 328 | int crossfeed; /* crossfeed type */ |
329 | unsigned int crossfeed_direct_gain; /* dB x 10 */ | 329 | unsigned int crossfeed_direct_gain; /* dB x 10 */ |
330 | unsigned int crossfeed_cross_gain; /* dB x 10 */ | 330 | unsigned int crossfeed_cross_gain; /* dB x 10 */ |
331 | unsigned int crossfeed_hf_attenuation; /* dB x 10 */ | 331 | unsigned int crossfeed_hf_attenuation; /* dB x 10 */ |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 10d00d5c89..accd51dfe1 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -1402,8 +1402,10 @@ const struct settings_list settings[] = { | |||
1402 | #endif | 1402 | #endif |
1403 | 1403 | ||
1404 | /* crossfeed */ | 1404 | /* crossfeed */ |
1405 | OFFON_SETTING(F_SOUNDSETTING, crossfeed, LANG_CROSSFEED, false, | 1405 | CHOICE_SETTING(F_SOUNDSETTING, crossfeed, LANG_CROSSFEED, 0,"crossfeed", |
1406 | "crossfeed", dsp_crossfeed_enable), | 1406 | "off,meier,custom", dsp_set_crossfeed_type, 3, |
1407 | ID2P(LANG_OFF), ID2P(LANG_CROSSFEED_MEIER), | ||
1408 | ID2P(LANG_CROSSFEED_CUSTOM)), | ||
1407 | INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_direct_gain, | 1409 | INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_direct_gain, |
1408 | LANG_CROSSFEED_DIRECT_GAIN, -15, | 1410 | LANG_CROSSFEED_DIRECT_GAIN, -15, |
1409 | "crossfeed direct gain", UNIT_DB, -60, 0, 5, | 1411 | "crossfeed direct gain", UNIT_DB, -60, 0, 5, |