diff options
Diffstat (limited to 'apps/codecs/a52.c')
-rw-r--r-- | apps/codecs/a52.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c index bc711965ec..663e7941ec 100644 --- a/apps/codecs/a52.c +++ b/apps/codecs/a52.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <codecs/liba52/a52.h> | 24 | #include <codecs/liba52/a52.h> |
25 | 25 | ||
26 | #include "playback.h" | 26 | #include "playback.h" |
27 | #include "dsp.h" | ||
27 | #include "lib/codeclib.h" | 28 | #include "lib/codeclib.h" |
28 | 29 | ||
29 | #define BUFFER_SIZE 4096 | 30 | #define BUFFER_SIZE 4096 |
@@ -173,12 +174,26 @@ enum codec_status codec_start(struct codec_api* api) | |||
173 | ci->configure(CODEC_SET_FILEBUF_LIMIT, (int *)(1024*1024*2)); | 174 | ci->configure(CODEC_SET_FILEBUF_LIMIT, (int *)(1024*1024*2)); |
174 | ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128)); | 175 | ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (int *)(1024*128)); |
175 | 176 | ||
177 | ci->configure(DSP_DITHER, (bool *)false); | ||
178 | ci->configure(DSP_SET_STEREO_MODE, (int *)STEREO_INTERLEAVED); | ||
179 | ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(16)); | ||
180 | |||
176 | next_track: | 181 | next_track: |
177 | 182 | ||
178 | if (codec_init(api)) { | 183 | if (codec_init(api)) { |
179 | return CODEC_ERROR; | 184 | return CODEC_ERROR; |
180 | } | 185 | } |
181 | 186 | ||
187 | while (!rb->taginfo_ready) | ||
188 | rb->yield(); | ||
189 | |||
190 | if (rb->id3->frequency != NATIVE_FREQUENCY) { | ||
191 | rb->configure(DSP_SET_FREQUENCY, (long *)(rb->id3->frequency)); | ||
192 | rb->configure(CODEC_DSP_ENABLE, (bool *)true); | ||
193 | } else { | ||
194 | rb->configure(CODEC_DSP_ENABLE, (bool *)false); | ||
195 | } | ||
196 | |||
182 | /* Intialise the A52 decoder and check for success */ | 197 | /* Intialise the A52 decoder and check for success */ |
183 | state = a52_init (0); // Parameter is "accel" | 198 | state = a52_init (0); // Parameter is "accel" |
184 | 199 | ||