diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/wavpack.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/codecs/wavpack.c b/apps/codecs/wavpack.c index 12a05bbe37..e97724a94e 100644 --- a/apps/codecs/wavpack.c +++ b/apps/codecs/wavpack.c | |||
@@ -26,6 +26,9 @@ | |||
26 | 26 | ||
27 | static struct codec_api *ci; | 27 | static struct codec_api *ci; |
28 | 28 | ||
29 | #define FORCE_DSP_USE /* fixes some WavPack bugs; adds about 12% to boost ratio | ||
30 | (when DSP would not have been used) */ | ||
31 | |||
29 | #define BUFFER_SIZE 4096 | 32 | #define BUFFER_SIZE 4096 |
30 | 33 | ||
31 | static long temp_buffer [BUFFER_SIZE] IDATA_ATTR; | 34 | static long temp_buffer [BUFFER_SIZE] IDATA_ATTR; |
@@ -75,6 +78,11 @@ enum codec_status codec_start(struct codec_api* api) | |||
75 | while (!*ci->taginfo_ready && !ci->stop_codec) | 78 | while (!*ci->taginfo_ready && !ci->stop_codec) |
76 | ci->sleep(1); | 79 | ci->sleep(1); |
77 | 80 | ||
81 | #ifdef FORCE_DSP_USE | ||
82 | ci->configure(CODEC_DSP_ENABLE, (bool *)true); | ||
83 | ci->configure(DSP_SET_FREQUENCY, (long *)(ci->id3->frequency)); | ||
84 | codec_set_replaygain(ci->id3); | ||
85 | #else | ||
78 | if (ci->id3->frequency != NATIVE_FREQUENCY || | 86 | if (ci->id3->frequency != NATIVE_FREQUENCY || |
79 | ci->global_settings->replaygain) { | 87 | ci->global_settings->replaygain) { |
80 | ci->configure(CODEC_DSP_ENABLE, (bool *)true); | 88 | ci->configure(CODEC_DSP_ENABLE, (bool *)true); |
@@ -83,7 +91,8 @@ enum codec_status codec_start(struct codec_api* api) | |||
83 | } | 91 | } |
84 | else | 92 | else |
85 | ci->configure(CODEC_DSP_ENABLE, (bool *)false); | 93 | ci->configure(CODEC_DSP_ENABLE, (bool *)false); |
86 | 94 | #endif | |
95 | |||
87 | /* Create a decoder instance */ | 96 | /* Create a decoder instance */ |
88 | wpc = WavpackOpenFileInput (read_callback, error); | 97 | wpc = WavpackOpenFileInput (read_callback, error); |
89 | 98 | ||