From bffe311b3ebd4a42bececd4858dfea05de44618b Mon Sep 17 00:00:00 2001 From: nakeee Date: Fri, 27 Mar 2009 11:06:52 +0000 Subject: 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 --- Source/Core/AudioCommon/Src/AOSoundStream.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Source/Core/AudioCommon/Src/AOSoundStream.cpp') diff --git a/Source/Core/AudioCommon/Src/AOSoundStream.cpp b/Source/Core/AudioCommon/Src/AOSoundStream.cpp index fdc507f5ee..c3cae83f74 100644 --- a/Source/Core/AudioCommon/Src/AOSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AOSoundStream.cpp @@ -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 -- cgit v1.2.3