summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-11-22 23:26:39 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-11-22 23:26:39 +0000
commitdedffd3f408f356afba75445011917a92ae1958a (patch)
treed03f2621267628c1fb92bf919d766d6d9acdac37
parent6695226331bbe2fcae69d25e2959970a3771ca49 (diff)
downloadrockbox-dedffd3f408f356afba75445011917a92ae1958a.zip
rockbox-dedffd3f408f356afba75445011917a92ae1958a.tar.gz
rockbox-dedffd3f408f356afba75445011917a92ae1958a.tar.bz2
rockbox-dedffd3f408f356afba75445011917a92ae1958a.tar.xz
Fix bug in libatrac which lead to playback errors and/or distortions with some atrac3 files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28642 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libatrac/atrac3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/codecs/libatrac/atrac3.c b/apps/codecs/libatrac/atrac3.c
index 22e787d..499a9f6 100644
--- a/apps/codecs/libatrac/atrac3.c
+++ b/apps/codecs/libatrac/atrac3.c
@@ -666,7 +666,7 @@ static void applyFixGain (int32_t *pIn, int32_t *pPrev, int32_t *pOut,
if (ONE_16 == gain) {
/* gain1 = 1.0 -> no multiplication needed, just adding */
/* Remark: This path is called >90%. */
- do {
+ while (i<256) {
pOut[i] = pIn[i] + pPrev[i]; i++;
pOut[i] = pIn[i] + pPrev[i]; i++;
pOut[i] = pIn[i] + pPrev[i]; i++;
@@ -675,11 +675,11 @@ static void applyFixGain (int32_t *pIn, int32_t *pPrev, int32_t *pOut,
pOut[i] = pIn[i] + pPrev[i]; i++;
pOut[i] = pIn[i] + pPrev[i]; i++;
pOut[i] = pIn[i] + pPrev[i]; i++;
- } while (i<256);
+ };
} else {
/* gain1 != 1.0 -> we need to do a multiplication */
/* Remark: This path is called seldom. */
- do {
+ while (i<256) {
pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++;
pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++;
pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++;
@@ -688,7 +688,7 @@ static void applyFixGain (int32_t *pIn, int32_t *pPrev, int32_t *pOut,
pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++;
pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++;
pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++;
- } while (i<256);
+ };
}
}