From 90bf41bed88540073d233516c160025e7cbeb285 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 20 Jul 2017 13:41:50 +0200 Subject: [PATCH] added handle for the snd_core --- ax_functions.c | 3 +++ ax_functions.h | 1 + 2 files changed, 4 insertions(+) diff --git a/ax_functions.c b/ax_functions.c index dc49494..7d91ecc 100644 --- a/ax_functions.c +++ b/ax_functions.c @@ -26,6 +26,7 @@ #include "ax_functions.h" u32 sound_handle __attribute__((section(".data"))) = 0; +u32 sound_handle_old __attribute__((section(".data"))) = 0; EXPORT_DECL(void, AXInitWithParams, u32 * params); EXPORT_DECL(void, AXInit, void); @@ -57,6 +58,7 @@ void InitAcquireAX(void) { AXInit = 0; + OSDynLoad_Acquire("snd_core.rpl", &sound_handle_old); OSDynLoad_Acquire("sndcore2.rpl", &sound_handle); OS_FIND_EXPORT(sound_handle, AXInitWithParams); OS_FIND_EXPORT(sound_handle, AXGetInputSamplesPerSec); @@ -67,6 +69,7 @@ void InitAcquireAX(void) AXGetInputSamplesPerSec = 0; OSDynLoad_Acquire("snd_core.rpl", &sound_handle); + sound_handle_old = sound_handle; OS_FIND_EXPORT(sound_handle, AXInit); } } diff --git a/ax_functions.h b/ax_functions.h index 206d34f..467a8b0 100644 --- a/ax_functions.h +++ b/ax_functions.h @@ -31,6 +31,7 @@ extern "C" { #include extern u32 sound_handle; +extern u32 sound_handle_old; void InitAXFunctionPointers(void); void InitAcquireAX(void);