Fixed stop of DSP HLE+LLE and some clean up(reset all variables in DSound creation)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2760 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-03-27 11:06:52 +00:00
parent b5b42746ed
commit bffe311b3e
6 changed files with 117 additions and 103 deletions

View File

@ -261,22 +261,29 @@ void Initialize(void *init)
void DSP_StopSoundStream()
{
if (!soundStream)
PanicAlert("Can't stop non running SoundStream!");
soundStream->Stop();
delete soundStream;
soundStream = NULL;
}
void Shutdown(void)
{
// Check that soundstream already is stopped.
if (soundStream)
PanicAlert("SoundStream alive in DSP::Shutdown!");
NOTICE_LOG(DSPHLE, "Shutting down DSP plugin");
if (soundStream) {
soundStream->Stop();
delete soundStream;
soundStream = NULL;
}
// Check that soundstream already is stopped.
while (soundStream) {
ERROR_LOG(DSPHLE, "Waiting for sound stream");
Common::SleepCurrentThread(2000);
}
// Stop the sound recording
if (log_ai)
g_wave_writer.Stop();
INFO_LOG(DSPHLE, "Done shutting down DSP plugin");
}
u16 DSP_WriteControlRegister(u16 _uFlag)