diff options
author | Martin Kiewitz | 2010-01-01 13:31:02 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-01 13:31:02 +0000 |
commit | 8ee5033bab56606d1cb792ba2b04ec0ce8829a82 (patch) | |
tree | ff99e382040446596965940e3bcd6bde31d722a9 | |
parent | 7cf1d5bd5df915fe0f26182b1c2d696ca8d11a34 (diff) | |
download | scummvm-rg350-8ee5033bab56606d1cb792ba2b04ec0ce8829a82.tar.gz scummvm-rg350-8ee5033bab56606d1cb792ba2b04ec0ce8829a82.tar.bz2 scummvm-rg350-8ee5033bab56606d1cb792ba2b04ec0ce8829a82.zip |
Added setNumLoops() for linear memory streams, enables looping of samples in sci
svn-id: r46821
-rw-r--r-- | sound/audiostream.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 7d3cf935aa..f2bd30b904 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -151,6 +151,16 @@ public: int getRate() const { return _rate; } int32 getTotalPlayTime() const { return _playtime; } + + void setNumLoops(uint numLoops) { + if (numLoops == 1) { + _loopPtr = 0; + _loopEnd = 0; + } else { + _loopPtr = _ptr; + _loopEnd = _end; + } + } }; template<bool stereo, bool is16Bit, bool isUnsigned, bool isLE> |