fixed underrun buffer in hle on linux

made wiimote compile on linux again


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2093 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-02-03 22:06:18 +00:00
parent d8f4785772
commit bde4241e9e
7 changed files with 21 additions and 35 deletions

View File

@ -32,10 +32,10 @@ void AOSound::SoundLoop()
device = ao_open_live(default_driver, &format, NULL /* no options */);
if (device == NULL) {
PanicAlert("DSP_HLE: Error opening AO device.\n");
ao_shutdown();
Stop();
return;
PanicAlert("DSP_HLE: Error opening AO device.\n");
ao_shutdown();
Stop();
return;
}
buf_size = format.bits/8 * format.channels * format.rate;
@ -57,11 +57,14 @@ void *soundThread(void *args) {
}
bool AOSound::Start() {
memset(realtimeBuffer, 0, sizeof(realtimeBuffer));
soundCriticalSection = new Common::CriticalSection(1);
thread = new Common::Thread(soundThread, (void *)this);
memset(realtimeBuffer, 0, sizeof(realtimeBuffer));
soundSyncEvent = new Common::Event();
soundSyncEvent->Init();
soundCriticalSection = new Common::CriticalSection(1);
thread = new Common::Thread(soundThread, (void *)this);
return true;
}