diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-11-22 23:26:39 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-11-22 23:26:39 +0000 |
commit | dedffd3f408f356afba75445011917a92ae1958a (patch) | |
tree | d03f2621267628c1fb92bf919d766d6d9acdac37 | |
parent | 6695226331bbe2fcae69d25e2959970a3771ca49 (diff) | |
download | rockbox-dedffd3f408f356afba75445011917a92ae1958a.tar.gz rockbox-dedffd3f408f356afba75445011917a92ae1958a.zip |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/codecs/libatrac/atrac3.c b/apps/codecs/libatrac/atrac3.c index 22e787d6e3..499a9f6572 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, | |||
666 | if (ONE_16 == gain) { | 666 | if (ONE_16 == gain) { |
667 | /* gain1 = 1.0 -> no multiplication needed, just adding */ | 667 | /* gain1 = 1.0 -> no multiplication needed, just adding */ |
668 | /* Remark: This path is called >90%. */ | 668 | /* Remark: This path is called >90%. */ |
669 | do { | 669 | while (i<256) { |
670 | pOut[i] = pIn[i] + pPrev[i]; i++; | 670 | pOut[i] = pIn[i] + pPrev[i]; i++; |
671 | pOut[i] = pIn[i] + pPrev[i]; i++; | 671 | pOut[i] = pIn[i] + pPrev[i]; i++; |
672 | pOut[i] = pIn[i] + pPrev[i]; i++; | 672 | pOut[i] = pIn[i] + pPrev[i]; i++; |
@@ -675,11 +675,11 @@ static void applyFixGain (int32_t *pIn, int32_t *pPrev, int32_t *pOut, | |||
675 | pOut[i] = pIn[i] + pPrev[i]; i++; | 675 | pOut[i] = pIn[i] + pPrev[i]; i++; |
676 | pOut[i] = pIn[i] + pPrev[i]; i++; | 676 | pOut[i] = pIn[i] + pPrev[i]; i++; |
677 | pOut[i] = pIn[i] + pPrev[i]; i++; | 677 | pOut[i] = pIn[i] + pPrev[i]; i++; |
678 | } while (i<256); | 678 | }; |
679 | } else { | 679 | } else { |
680 | /* gain1 != 1.0 -> we need to do a multiplication */ | 680 | /* gain1 != 1.0 -> we need to do a multiplication */ |
681 | /* Remark: This path is called seldom. */ | 681 | /* Remark: This path is called seldom. */ |
682 | do { | 682 | while (i<256) { |
683 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; | 683 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; |
684 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; | 684 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; |
685 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; | 685 | 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, | |||
688 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; | 688 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; |
689 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; | 689 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; |
690 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; | 690 | pOut[i] = fixmul16(pIn[i], gain) + pPrev[i]; i++; |
691 | } while (i<256); | 691 | }; |
692 | } | 692 | } |
693 | } | 693 | } |
694 | 694 | ||