aboutsummaryrefslogtreecommitdiff
path: root/sound/mixer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r--sound/mixer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index a59768b189..84a3949656 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -274,6 +274,13 @@ void Mixer::playInputStreamLooping(
bool permanent,
bool reverseStereo) {
+ // Just in case the user wants the stream just looped once, we will take care of that with the normal
+ // playInputStream method
+ if (loopCount == 1) {
+ playInputStream(type, handle, input, id, volume, balance, autofreeStream, permanent, reverseStereo);
+ return;
+ }
+
LoopingAudioStream *loopingStream = new LoopingAudioStream(input, loopCount, autofreeStream);
assert(loopingStream);