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

@ -46,20 +46,15 @@ void AOSound::SoundLoop()
while (!threadData)
{
soundCriticalSection.Enter();
m_mixer->Mix(realtimeBuffer, numBytesToRender >> 2);
ao_play(device, (char*)realtimeBuffer, numBytesToRender);
soundCriticalSection.Leave();
if (! threadData)
soundSyncEvent.Wait();
}
ao_close(device);
device = NULL;
ao_shutdown();
device = NULL;
}
void *soundThread(void *args)
@ -93,7 +88,10 @@ void AOSound::Stop()
delete thread;
thread = NULL;
soundSyncEvent.Shutdown();
}
AOSound::~AOSound() {
// FIXME: crashes dolphin
// ao_shutdown();
}
#endif