mirror of
https://github.com/wiiu-env/homebrew_launcher.git
synced 2025-02-17 13:06:20 +01:00
Fix for 410 sound issue.
This commit is contained in:
parent
0499b68ecf
commit
8de7f2c6ec
@ -72,3 +72,23 @@ void InitAXFunctionPointers(void)
|
||||
OS_FIND_EXPORT(sound_handle, AXSetVoiceLoopOffset);
|
||||
}
|
||||
|
||||
void ProperlyEndTransitionAudio(void)
|
||||
{
|
||||
bool (* check_os_audio_transition_flag_old)(void);
|
||||
void (* AXInit_old)(void);
|
||||
void (* AXQuit_old)(void);
|
||||
|
||||
unsigned int *funcPointer = 0;
|
||||
unsigned int sound_handle;
|
||||
OSDynLoad_Acquire("snd_core.rpl", &sound_handle);
|
||||
|
||||
OS_FIND_EXPORT_EX(sound_handle, check_os_audio_transition_flag, check_os_audio_transition_flag_old);
|
||||
OS_FIND_EXPORT_EX(sound_handle, AXInit, AXInit_old);
|
||||
OS_FIND_EXPORT_EX(sound_handle, AXQuit, AXQuit_old);
|
||||
|
||||
if (check_os_audio_transition_flag_old())
|
||||
{
|
||||
AXInit_old();
|
||||
AXQuit_old();
|
||||
}
|
||||
}
|
@ -31,6 +31,7 @@ extern "C" {
|
||||
#include <gctypes.h>
|
||||
|
||||
void InitAXFunctionPointers(void);
|
||||
void ProperlyEndTransitionAudio(void);
|
||||
|
||||
extern void (* AXInitWithParams)(u32 * params);
|
||||
extern void (* AXQuit)(void);
|
||||
|
@ -216,6 +216,12 @@ SoundDecoder * SoundHandler::GetSoundDecoder(const u8 * sound, int length)
|
||||
|
||||
void SoundHandler::executeThread()
|
||||
{
|
||||
// v2 sound lib can not properly end transition audio on old firmwares.
|
||||
if (OS_FIRMWARE <= 410)
|
||||
{
|
||||
ProperlyEndTransitionAudio();
|
||||
}
|
||||
|
||||
//! initialize 48 kHz renderer
|
||||
u32 params[3] = { 1, 0, 0 };
|
||||
AXInitWithParams(params);
|
||||
|
Loading…
x
Reference in New Issue
Block a user