diff options
author | Dave Chapman <dave@dchapman.com> | 2005-10-30 22:06:42 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2005-10-30 22:06:42 +0000 |
commit | fca6b63ef7310a36010d843f295e37ec368febf8 (patch) | |
tree | 0b769a61d47581206f32084ee2cddec8f248f25b /apps/codecs | |
parent | 29c7da9e69b1d052049e8fba5e0dafaaf93df12a (diff) | |
download | rockbox-fca6b63ef7310a36010d843f295e37ec368febf8.tar.gz rockbox-fca6b63ef7310a36010d843f295e37ec368febf8.zip |
Fix bug with FLAC and ALAC output being half the correct volume. The DSP_SET_SAMPLE_DEPTH function expects needs clarifying or changing - it seems to expect one less than the number of bits in cases where the depth is greater than the native depth (16 bits).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7692 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/alac.c | 4 | ||||
-rw-r--r-- | apps/codecs/flac.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/alac.c b/apps/codecs/alac.c index c96d1f0405..af2694851f 100644 --- a/apps/codecs/alac.c +++ b/apps/codecs/alac.c @@ -64,8 +64,8 @@ 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, (int *)STEREO_NONINTERLEAVED); - ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(28)); - + ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(ALAC_OUTPUT_DEPTH-1)); + next_track: if (codec_init(api)) { diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c index bbd45ece89..81785132a9 100644 --- a/apps/codecs/flac.c +++ b/apps/codecs/flac.c @@ -240,7 +240,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, (int *)(28)); + ci->configure(DSP_SET_SAMPLE_DEPTH, (int *)(FLAC_OUTPUT_DEPTH-1)); next_track: |