Fix APE 16-bit mono output: mono signals need to be scaled for rockbox.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19264 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2008-11-30 01:01:04 +00:00
parent 15671aa476
commit 797ef6585a

View file

@ -134,7 +134,15 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
/* Mono - do nothing unless it's 8-bit audio */
if (ape_ctx->bps == 8) {
/* TODO: Handle 8-bit streams */
} else {
/* Scale to output depth */
while (count--)
{
left = *decoded0;
*(decoded0++) = SCALE(left);
}
}
}
} else { /* Stereo */
if (ape_ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) {