From f15246cba8ec5847a427a34b175631f51ed161c3 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 15 Nov 2004 04:43:42 +0000 Subject: [PATCH] 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 --- stepmania/src/RageSound.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 483f1b1424..d02cfad6f6 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -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(); }