QTfrontend/util/SDLInteraction.cpp
changeset 6585 6225b838a630
parent 6524 416fdfb666da
child 6616 f77bb02b669f
--- a/QTfrontend/util/SDLInteraction.cpp	Wed Jan 18 01:07:07 2012 +0100
+++ b/QTfrontend/util/SDLInteraction.cpp	Wed Jan 18 01:10:35 2012 +0100
@@ -193,10 +193,11 @@
     if (!m_soundMap->contains(soundFile))
         m_soundMap->insert(soundFile, Mix_LoadWAV(soundFile.toLocal8Bit().constData()));
 
-    Mix_PlayChannel(-1, m_soundMap->value(soundFile), 0);
+    //FIXME: this is a hack, but works as long as we have few concurrent playing sounds
+    if (Mix_Playing(lastchannel) == false)
+        lastchannel = Mix_PlayChannel(-1, m_soundMap->value(soundFile), 0);
 }
 
-
 void SDLInteraction::setMusicTrack(const QString & musicFile)
 {
     bool wasPlayingMusic = m_isPlayingMusic;