[Scummvm-cvs-logs] SF.net SVN: scummvm:[49538] scummvm/trunk/engines/sci/sound/music.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Jun 9 15:28:00 CEST 2010


Revision: 49538
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49538&view=rev
Author:   m_kiewitz
Date:     2010-06-09 13:27:59 +0000 (Wed, 09 Jun 2010)

Log Message:
-----------
SCI: fix multiple playing of the same sound in a row (without using looping) - thx to LordHoto for helping me finding this one out - fixes pharkas right at the start (hammering only played once)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sound/music.cpp

Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp	2010-06-09 10:45:54 UTC (rev 49537)
+++ scummvm/trunk/engines/sci/sound/music.cpp	2010-06-09 13:27:59 UTC (rev 49538)
@@ -317,6 +317,8 @@
 			                         pSnd->pLoopStream, -1, pSnd->volume, 0,
 			                         DisposeAfterUse::NO);
 		} else {
+			// Rewind in case we play the same sample multiple times (non-looped) like in pharkas right at the start
+			pSnd->pStreamAud->rewind();
 			_pMixer->playStream(pSnd->soundType, &pSnd->hCurrentAud,
 			                         pSnd->pStreamAud, -1, pSnd->volume, 0,
 			                         DisposeAfterUse::NO);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list