RageSoundManager::StopPlayingSoundsForThisThread

This commit is contained in:
Glenn Maynard
2004-11-15 04:53:15 +00:00
parent f15246cba8
commit de5c504191
2 changed files with 0 additions and 20 deletions
-16
View File
@@ -281,22 +281,6 @@ void RageSoundManager::DeleteSound( RageSound *p )
g_SoundManMutex.Unlock(); /* finished with owned_sounds */
}
void RageSoundManager::StopPlayingSoundsForThisThread()
{
/* Lock to make sure sounds don't become invalidated below before we get to them. */
g_DeletionMutex.Lock();
set<RageSound *> Sounds = GetPlayingSounds();
set<RageSound *>::iterator it;
for( it = Sounds.begin(); it != Sounds.end(); ++it )
{
if( (*it)->GetPlayingThread() != RageThread::GetCurrentThreadID() )
continue;
(*it)->Stop();
}
g_DeletionMutex.Unlock();
}
/*
* If bLockSounds is true, all returned sounds will be locked; you must call Unlock()
* on all returned sounds when you're done. This is used for thread safety: without