diff options
author | Johannes Schickel | 2009-05-24 15:17:42 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-24 15:17:42 +0000 |
commit | b3c6751b9b7fc1401fd5e87a034cdaec92b67b20 (patch) | |
tree | aa00dba58fb88ea2e095b886963370c7290c692b /sound/vag.cpp | |
parent | 7c1eb057146af11793c627327f3fefe309d27fbb (diff) | |
download | scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.tar.gz scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.tar.bz2 scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.zip |
Strip trailing whitespaces in the whole code base.
svn-id: r40867
Diffstat (limited to 'sound/vag.cpp')
-rw-r--r-- | sound/vag.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/vag.cpp b/sound/vag.cpp index 46e6a64233..a08c1c0a72 100644 --- a/sound/vag.cpp +++ b/sound/vag.cpp @@ -22,7 +22,7 @@ * $Id$ * */ - + #include "sound/vag.h" namespace Audio { @@ -48,10 +48,10 @@ double f[5][2] = { { 0.0, 0.0 }, int VagStream::readBuffer(int16 *buffer, const int numSamples) { int32 samplesDecoded = 0; - + if (_samplesRemaining) { byte i = 0; - + for (i = 28 - _samplesRemaining; i < 28 && samplesDecoded < numSamples; i++) { _samples[i] = _samples[i] + _s1 * f[_predictor][0] + _s2 * f[_predictor][1]; _s2 = _s1; @@ -70,17 +70,17 @@ int VagStream::readBuffer(int16 *buffer, const int numSamples) { _samplesRemaining = 0; } - + while (samplesDecoded < numSamples) { byte i = 0; - + _predictor = _stream->readByte(); byte shift = _predictor & 0xf; _predictor >>= 4; - + if (_stream->readByte() == 7) return samplesDecoded; - + for (i = 0; i < 28; i += 2) { byte d = _stream->readByte(); int16 s = (d & 0xf) << 12; @@ -92,7 +92,7 @@ int VagStream::readBuffer(int16 *buffer, const int numSamples) { s |= 0xffff0000; _samples[i + 1] = (double)(s >> shift); } - + for (i = 0; i < 28 && samplesDecoded < numSamples; i++) { _samples[i] = _samples[i] + _s1 * f[_predictor][0] + _s2 * f[_predictor][1]; _s2 = _s1; @@ -101,7 +101,7 @@ int VagStream::readBuffer(int16 *buffer, const int numSamples) { buffer[samplesDecoded] = d; samplesDecoded++; } - + if (i != 27) _samplesRemaining = 28 - i; } |