more consistent code path: call SoundIsFinishedPlaying when the driver stops mixing, even if it's due to RageSoundDriver::StopMixing
This commit is contained in:
@@ -335,26 +335,8 @@ void RageSound::StopPlaying()
|
||||
if( !m_bPlaying )
|
||||
return;
|
||||
|
||||
m_iStoppedSourceFrame = (int) GetPositionSecondsInternal();
|
||||
|
||||
/* Tell the sound driver to stop mixing this sound. */
|
||||
SOUNDMAN->StopMixing(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. */
|
||||
m_Mutex.Lock();
|
||||
|
||||
// LOG->Trace("set playing false for %p (StopPlaying) (%s)", this, this->GetLoadedFilePath().c_str());
|
||||
m_bPlaying = false;
|
||||
|
||||
m_iMaxDriverFrame = 0;
|
||||
m_HardwareToStreamMap.Clear();
|
||||
m_StreamToSourceMap.Clear();
|
||||
|
||||
// LOG->Trace("StopPlaying %p finished (%s)", this, this->GetLoadedFilePath().c_str());
|
||||
|
||||
m_Mutex.Unlock();
|
||||
}
|
||||
|
||||
/* This is similar to StopPlaying, except it's called by sound drivers when we're done
|
||||
|
||||
Reference in New Issue
Block a user