diff options
author | Andre Heider | 2008-07-06 12:04:19 +0000 |
---|---|---|
committer | Andre Heider | 2008-07-06 12:04:19 +0000 |
commit | 95ca13246eed820a3513ab91a517283a1263cc46 (patch) | |
tree | 69d3735a6b8c5e1f36b311b7c9c41d17202f62c2 /backends/platform/wii/osystem_sfx.cpp | |
parent | 32f653f2b198bc3a5e842636b748d506e79d12ff (diff) | |
download | scummvm-rg350-95ca13246eed820a3513ab91a517283a1263cc46.tar.gz scummvm-rg350-95ca13246eed820a3513ab91a517283a1263cc46.tar.bz2 scummvm-rg350-95ca13246eed820a3513ab91a517283a1263cc46.zip |
adjustments to the recent mixer api changes
svn-id: r32924
Diffstat (limited to 'backends/platform/wii/osystem_sfx.cpp')
-rw-r--r-- | backends/platform/wii/osystem_sfx.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/backends/platform/wii/osystem_sfx.cpp b/backends/platform/wii/osystem_sfx.cpp index 16b2f3b055..0a225e80c7 100644 --- a/backends/platform/wii/osystem_sfx.cpp +++ b/backends/platform/wii/osystem_sfx.cpp @@ -36,9 +36,6 @@ static bool sfx_thread_quit = false; static u8 sb = 0; static u8 *sound_buffer[2]; -static OSystem_Wii::SoundProc sound_proc = NULL; -static void *proc_param = NULL; - static void audio_switch_buffers() { AUDIO_StopDMA(); AUDIO_InitDMA((u32) sound_buffer[sb], SFX_THREAD_FRAG_SIZE); @@ -48,6 +45,7 @@ static void audio_switch_buffers() { } static void * sfx_thread_func(void *arg) { + Audio::MixerImpl *mixer = (Audio::MixerImpl *) arg; u8 next_sb; while (true) { @@ -57,7 +55,7 @@ static void * sfx_thread_func(void *arg) { break; next_sb = sb ^ 1; - sound_proc(proc_param, sound_buffer[next_sb], SFX_THREAD_FRAG_SIZE); + mixer->mixCallback(sound_buffer[next_sb], SFX_THREAD_FRAG_SIZE); DCFlushRange(sound_buffer[next_sb], SFX_THREAD_FRAG_SIZE); sb = next_sb; @@ -75,7 +73,7 @@ void OSystem_Wii::initSfx() { LWP_InitQueue(&sfx_queue); - s32 res = LWP_CreateThread(&sfx_thread, sfx_thread_func, NULL, sfx_stack, + s32 res = LWP_CreateThread(&sfx_thread, sfx_thread_func, _mixer, sfx_stack, SFX_THREAD_STACKSIZE, SFX_THREAD_PRIO); if (res) { @@ -95,9 +93,7 @@ void OSystem_Wii::initSfx() { DCFlushRange(sound_buffer[0], SFX_THREAD_FRAG_SIZE); DCFlushRange(sound_buffer[1], SFX_THREAD_FRAG_SIZE); - sound_proc = Audio::Mixer::mixCallback; - proc_param = _mixer; - + _mixer->setOutputRate(48000); _mixer->setReady(true); AUDIO_SetDSPSampleRate(AI_SAMPLERATE_48KHZ); @@ -127,7 +123,3 @@ void OSystem_Wii::deinitSfx() { } } -int OSystem_Wii::getOutputSampleRate() const { - return 48000; -} - |