summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-10-22 11:37:16 +0000
committerDave Chapman <dave@dchapman.com>2005-10-22 11:37:16 +0000
commit533dbbef58c3d2dec01b3d5f82deda35a4318173 (patch)
tree09432648d11cc923e3ade2ad3cdce33592189a1a /apps
parent1a82763d3ada3c668e27a54b64bfb1f74370fe88 (diff)
downloadrockbox-533dbbef58c3d2dec01b3d5f82deda35a4318173.tar.gz
rockbox-533dbbef58c3d2dec01b3d5f82deda35a4318173.tar.bz2
rockbox-533dbbef58c3d2dec01b3d5f82deda35a4318173.zip
Fix downmixing problems in AC3/A52 decoder and small cleanup of unused code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7651 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/a52.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c
index e214cbb635..05b9b2e5ab 100644
--- a/apps/codecs/a52.c
+++ b/apps/codecs/a52.c
@@ -35,10 +35,8 @@ unsigned long frequency;
/* used outside liba52 */
static uint8_t buf[3840] IDATA_ATTR;
-void output_audio(sample_t *samples, int flags)
+void output_audio(sample_t *samples)
{
- flags &= A52_CHANNEL_MASK | A52_LFE;
-
do {
ci->yield();
} while (!ci->pcmbuf_insert_split(&samples[0], &samples[256],
@@ -87,7 +85,7 @@ void a52_decode_data(uint8_t *start, uint8_t *end)
int i;
/* This is the configuration for the downmixing: */
- flags = A52_STEREO | A52_ADJUST_LEVEL | A52_LFE;
+ flags = A52_STEREO | A52_ADJUST_LEVEL;
if (a52_frame(state, buf, &flags, &level, bias))
goto error;
@@ -99,7 +97,7 @@ void a52_decode_data(uint8_t *start, uint8_t *end)
for (i = 0; i < 6; i++) {
if (a52_block(state))
goto error;
- output_audio(a52_samples(state), flags);
+ output_audio(a52_samples(state));
samplesdone += 256;
}
ci->set_elapsed(samplesdone/(frequency/1000));