diff options
author | Torbjörn Andersson | 2003-08-02 10:47:35 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-08-02 10:47:35 +0000 |
commit | a4ac513247d1df859037ee7d3709e231186cf6b3 (patch) | |
tree | db66415947d81e565ec18484a7f885fbf2eff777 /sound | |
parent | ec676d1581aa5a863b7b3c7b7e435aa9f0259f74 (diff) | |
download | scummvm-rg350-a4ac513247d1df859037ee7d3709e231186cf6b3.tar.gz scummvm-rg350-a4ac513247d1df859037ee7d3709e231186cf6b3.tar.bz2 scummvm-rg350-a4ac513247d1df859037ee7d3709e231186cf6b3.zip |
I think this fixes bug #780167 ("SIMON1/2: Sound problems"). When
st_rate_flow() had filled the output buffer, rate->icur and rate->ilast
held the same values, which led to some samples being duplicated on the
next call.
svn-id: r9403
Diffstat (limited to 'sound')
-rw-r--r-- | sound/rate.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/rate.cpp b/sound/rate.cpp index 8416b88dc8..fbcf9c2e80 100644 --- a/sound/rate.cpp +++ b/sound/rate.cpp @@ -179,11 +179,13 @@ resume: the_end: *osamp = (obuf - ostart) / 2; - rate->ilast[0] = ilast[0]; - rate->icur[0] = icur[0]; - if (stereo) { - rate->ilast[1] = ilast[1]; - rate->icur[1] = icur[1]; + if (!input.eof()) { + rate->ilast[0] = ilast[0]; + rate->icur[0] = input.read(); + if (stereo) { + rate->ilast[1] = ilast[1]; + rate->icur[1] = input.read(); + } } return (ST_SUCCESS); } |