aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2003-08-02 19:17:54 +0000
committerMax Horn2003-08-02 19:17:54 +0000
commitada236a63b0b6dc5f2490526ff70b4278ba82f6b (patch)
treea6d127c43d5d8fe301ffe8b59ab98cfc393a2eac /sound
parent7ec38f5f02ebd44332b34e059d209165fa68fa14 (diff)
downloadscummvm-rg350-ada236a63b0b6dc5f2490526ff70b4278ba82f6b.tar.gz
scummvm-rg350-ada236a63b0b6dc5f2490526ff70b4278ba82f6b.tar.bz2
scummvm-rg350-ada236a63b0b6dc5f2490526ff70b4278ba82f6b.zip
one addition less
svn-id: r9425
Diffstat (limited to 'sound')
-rw-r--r--sound/rate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/rate.cpp b/sound/rate.cpp
index 5498f48202..89a6f4a15e 100644
--- a/sound/rate.cpp
+++ b/sound/rate.cpp
@@ -89,7 +89,7 @@ LinearRateConverter<stereo, reverseStereo>::LinearRateConverter(st_rate_t inrate
}
opos_frac = 0;
- opos = 0;
+ opos = 1;
/* increment */
incr = (inrate << FRAC_BITS) / outrate;
@@ -119,7 +119,7 @@ int LinearRateConverter<stereo, reverseStereo>::flow(AudioInputStream &input, st
while (obuf < oend) {
// read enough input samples so that ipos > opos
- while (ipos <= opos + 1) {
+ while (ipos <= opos) {
// Abort if we reached the end of the input buffer
if (input.eof())
@@ -136,7 +136,7 @@ int LinearRateConverter<stereo, reverseStereo>::flow(AudioInputStream &input, st
// Loop as long as the outpos trails behind, and as long as there is
// still space in the output buffer.
- while (ipos > opos + 1) {
+ while (ipos > opos) {
// interpolate
tmpOut = (st_sample_t)(ilast[0] + (((icur[0] - ilast[0]) * opos_frac + (1UL << (FRAC_BITS-1))) >> FRAC_BITS));