aboutsummaryrefslogtreecommitdiff
path: root/sound/audiostream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/audiostream.cpp')
-rw-r--r--sound/audiostream.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index 04f41ccf5c..5e6b25740f 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -137,6 +137,13 @@ bool LoopingAudioStream::endOfData() const {
return (_loops != 0 && (_completeIterations == _loops));
}
+AudioStream *makeLoopingAudioStream(RewindableAudioStream *stream, uint loops) {
+ if (loops != 1)
+ return new LoopingAudioStream(stream, loops);
+ else
+ return stream;
+}
+
#pragma mark -
#pragma mark --- SubSeekableAudioStream ---
#pragma mark -