[Scummvm-cvs-logs] SF.net SVN: scummvm: [30255] scummvm/trunk/engines/scumm/imuse_digi/ dimuse_track.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Jan 5 21:43:08 CET 2008
Revision: 30255
http://scummvm.svn.sourceforge.net/scummvm/?rev=30255&view=rev
Author: fingolfin
Date: 2008-01-05 12:43:07 -0800 (Sat, 05 Jan 2008)
Log Message:
-----------
Do not busy wait in IMuseDigital::allocSlot on *any* platform
Modified Paths:
--------------
scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp
Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp 2008-01-05 20:40:27 UTC (rev 30254)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse_track.cpp 2008-01-05 20:43:07 UTC (rev 30255)
@@ -60,20 +60,16 @@
if (lowest_priority <= priority) {
assert(trackId != -1);
Track *track = _track[trackId];
- while (1) {
- if (!track->used) {
- break;
- }
+ // FIXME: Should we really wait for the sound to finish "nicely"?
+ // Why not just stop it immediately?
+
+ while (track->used) {
// The designated track is not yet available. So, we call flushTrack()
// to get it processed (and thus made ready for us). Since the actual
// processing is done by another thread, we also call parseEvents to
// give it some time (and to avoid busy waiting/looping).
flushTrack(track);
- _mutex.unlock();
- #ifndef __PLAYSTATION2__
_vm->parseEvents();
- #endif
- _mutex.lock();
}
debug(5, "IMuseDigital::allocSlot(): Removed sound %d from track %d", _track[trackId]->soundId, trackId);
} else {
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