diff options
author | Thom Johansen <thomj@rockbox.org> | 2006-02-13 19:51:53 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2006-02-13 19:51:53 +0000 |
commit | d1fbd12189da64cfda3226175142f850cb6d1b5c (patch) | |
tree | 26ef750dd9722d75f6735f2595e8921e827d6956 /apps | |
parent | 1375e5771ce93005d6e9c722d9dc05cbd633abf0 (diff) |
Common internal sample format for AC3.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8684 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/a52.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c index ff8fe0afea..0c3f507914 100644 --- a/apps/codecs/a52.c +++ b/apps/codecs/a52.c @@ -81,8 +81,10 @@ void a52_decode_data(uint8_t *start, uint8_t *end) } bufpos = buf + length; } else { - /* The following two defaults are taken from audio_out_oss.c: */ - level_t level = 1 << 26; + /* Unity gain is 1 << 26, and we want to end up on 28 bits + of precision instead of the default 30. + */ + level_t level = 1 << 24; sample_t bias = 0; int i; @@ -142,9 +144,7 @@ enum codec_status codec_start(struct codec_api *api) ci->configure(CODEC_DSP_ENABLE, (bool *)true); ci->configure(DSP_DITHER, (bool *)false); ci->configure(DSP_SET_STEREO_MODE, (long *)STEREO_NONINTERLEAVED); - ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)30); - ci->configure(DSP_SET_CLIP_MAX, (long *)((1 << 30) - 1)); - ci->configure(DSP_SET_CLIP_MIN, (long *)-(1 << 30)); + ci->configure(DSP_SET_SAMPLE_DEPTH, (long *)28); ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*128)); next_track: |