RageSoundManager::StopPlayingSoundsForThisThread
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -63,10 +63,6 @@ public:
|
||||
RageSound *PlaySound( RageSound &snd, const RageSoundParams *params );
|
||||
void StopPlayingAllCopiesOfSound(RageSound &snd);
|
||||
|
||||
/* Stop all sounds that were started by this thread. This should be called
|
||||
* before exiting a thread. */
|
||||
void StopPlayingSoundsForThisThread();
|
||||
|
||||
void GetCopies( RageSound &snd, vector<RageSound *> &snds, bool bLockSounds=false );
|
||||
|
||||
static void AttenuateBuf( int16_t *buf, int samples, float vol );
|
||||
|
||||
Reference in New Issue
Block a user