don't stop copies on stop and destruction; just the master copy

- this may come back, but if it does, the list of copied sounds should be stored inside RageSound itself
remove registration of playing sounds; the need is going away
This commit is contained in:
Glenn Maynard
2004-11-15 04:43:42 +00:00
parent 6bc25e56c2
commit f15246cba8
+1 -12
View File
@@ -83,11 +83,6 @@ RageSound::RageSound():
RageSound::~RageSound()
{
/* If we're a "master" sound (not a copy), tell RageSoundManager to
* stop mixing us and everything that's copied from us. */
if(original == this)
SOUNDMAN->StopPlayingAllCopiesOfSound(*this);
Unload();
/* Unregister ourself. */
@@ -594,8 +589,6 @@ void RageSound::StartPlaying()
SOUNDMAN->StartMixing(this);
SOUNDMAN->RegisterPlayingSound( this );
// LOG->Trace("StartPlaying %p finished (%s)", this, this->GetLoadedFilePath().c_str());
}
@@ -609,8 +602,6 @@ void RageSound::StopPlaying()
/* Tell the sound driver to stop mixing this sound. */
SOUNDMAN->StopMixing(this);
SOUNDMAN->UnregisterPlayingSound( this );
/* Lock the mutex after calling UnregisterPlayingSound. We must not make driver
* calls with our mutex locked (driver mutex < sound mutex). Nobody else will
* see our sound as not playing until we set playing = false. */
@@ -647,8 +638,6 @@ void RageSound::SoundIsFinishedPlaying()
stopped_position = (int) GetPositionSecondsInternal();
SOUNDMAN->UnregisterPlayingSound( this );
// LOG->Trace("set playing false for %p (SoundIsFinishedPlaying) (%s)", this, this->GetLoadedFilePath().c_str());
playing = false;
playing_thread = 0;
@@ -667,7 +656,7 @@ RageSound *RageSound::Play( const RageSoundParams *params )
void RageSound::Stop()
{
SOUNDMAN->StopPlayingAllCopiesOfSound(*this);
StopPlaying();
}