lock cleanups
This commit is contained in:
@@ -92,7 +92,9 @@ RageSound::~RageSound()
|
|||||||
Unload();
|
Unload();
|
||||||
|
|
||||||
/* Unregister ourselves. */
|
/* Unregister ourselves. */
|
||||||
|
SOUNDMAN->lock.Lock();
|
||||||
SOUNDMAN->all_sounds.erase(this);
|
SOUNDMAN->all_sounds.erase(this);
|
||||||
|
SOUNDMAN->lock.Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
RageSound::RageSound(const RageSound &cpy)
|
RageSound::RageSound(const RageSound &cpy)
|
||||||
@@ -532,7 +534,11 @@ void RageSound::StopPlaying()
|
|||||||
|
|
||||||
/* Tell the sound manager to stop mixing this sound. */
|
/* Tell the sound manager to stop mixing this sound. */
|
||||||
SOUNDMAN->StopMixing(this);
|
SOUNDMAN->StopMixing(this);
|
||||||
|
|
||||||
|
SOUNDMAN->lock.Lock();
|
||||||
SOUNDMAN->playing_sounds.erase( this );
|
SOUNDMAN->playing_sounds.erase( this );
|
||||||
|
SOUNDMAN->lock.Unlock();
|
||||||
|
|
||||||
playing = false;
|
playing = false;
|
||||||
|
|
||||||
pos_map.clear();
|
pos_map.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user