summaryrefslogtreecommitdiff
path: root/library/sound.cpp
Side-by-side diff
Diffstat (limited to 'library/sound.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/sound.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/library/sound.cpp b/library/sound.cpp
index 602fcf0..1ff3b3f 100644
--- a/library/sound.cpp
+++ b/library/sound.cpp
@@ -109,2 +109,3 @@ public:
loopsleft=0;
+ ms = WAVsoundDuration(filename);
}
@@ -116,3 +117,2 @@ public:
- int ms = WAVsoundDuration(filename);
if ( ms )
@@ -125,6 +125,8 @@ public:
if (loopsleft >= 0) {
- if (--loopsleft <= 0)
+ if ( --loopsleft <= 0 ) {
killTimer (e->timerId());
+ loopsleft = 0;
return;
}
+ }
play();
@@ -140,3 +142,5 @@ private:
int loopsleft;
+ int ms;
};
+
#endif
@@ -160,3 +164,2 @@ void Sound::play()
#ifndef QT_NO_SOUND
- d->killTimers();
d->playLoop(1);
@@ -184,2 +187,4 @@ bool Sound::isFinished() const
return d->isFinished();
+#else
+ return true;
#endif