From 83ed13edf2a453bffa27801af6e8dd28a8128cd0 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 22 Feb 2023 01:11:32 -0800 Subject: [PATCH] Fix hardware.c match --- include/musyx/musyx_priv.h | 8 ++++---- src/musyx/hardware.c | 6 +++--- src/musyx/hw_dspctrl.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/musyx/musyx_priv.h b/include/musyx/musyx_priv.h index 5c04e92b..ff683894 100644 --- a/include/musyx/musyx_priv.h +++ b/include/musyx/musyx_priv.h @@ -584,9 +584,9 @@ extern SYNTH_VOICE* synthVoice; extern DSPvoice* dspVoice; typedef s32 (*SND_COMPARE)(u16*, u8*); -void dataInit(u32, s32); /* extern */ -void dataInitStack(); /* extern */ -s32 hwInit(u32* rate, u8 numVoices, u8 numStudios, u32 flags); /* extern */ +void dataInit(u32, s32); /* extern */ +void dataInitStack(); /* extern */ +s32 hwInit(u32* frq, u16 numVoices, u16 numStudios, u32 flags); /* extern */ void hwEnableIrq(); void hwDisableIrq(); void s3dInit(s32); /* extern */ @@ -626,7 +626,7 @@ void salInvertMatrix(SND_FMATRIX* out, const SND_FMATRIX* in); /* hardware */ u32 salInitAi(SND_SOME_CALLBACK, u32, u32*); u32 salInitDsp(u32); -bool salInitDspCtrl(u8 numVoices, u8 numStudios, u32 defaultStudioDPL2); +u32 salInitDspCtrl(u8 numVoices, u8 numStudios, u32 defaultStudioDPL2); u32 salStartAi(); void salInitHRTFBuffer(); void salActivateVoice(DSPvoice* dsp_vptr, u8 studio); diff --git a/src/musyx/hardware.c b/src/musyx/hardware.c index 4b377a23..c19ba604 100644 --- a/src/musyx/hardware.c +++ b/src/musyx/hardware.c @@ -65,16 +65,16 @@ void snd_handle_irq() { hwIRQLeaveCritical(); } -s32 hwInit(u32* rate, u8 numVoices, u8 numStudios, u32 flags) { +s32 hwInit(u32 * frq, u16 numVoices, u16 numStudios, u32 flags) { hwInitIrq(); salFrame = 0; salAuxFrame = 0; salMessageCallback = NULL; - if (salInitAi(snd_handle_irq, flags, rate) == 0) { + if (salInitAi(snd_handle_irq, flags, frq) == 0) { // OSReport("Could not initialize AI.\n"); } else { // OSReport("salInitAi() is done.\n\n"); - if (salInitDspCtrl(numVoices, numStudios, flags & 1) == 0) { + if (salInitDspCtrl(numVoices, numStudios, (flags & 1) != 0) == 0) { // OSReport("Could not initialize DSP control logic.\n"); } else { // OSReport("salInitDspCtrl() is done.\n\n"); diff --git a/src/musyx/hw_dspctrl.c b/src/musyx/hw_dspctrl.c index 1028da8c..98b92175 100644 --- a/src/musyx/hw_dspctrl.c +++ b/src/musyx/hw_dspctrl.c @@ -29,7 +29,7 @@ s16* dspITDBuffer = NULL; DSPvoice* dspVoice = NULL; SND_MESSAGE_CALLBACK salMessageCallback = NULL; -bool salInitDspCtrl(u8 numVoices, u8 numStudios, u32 defaultStudioDPL2) { +u32 salInitDspCtrl(u8 numVoices, u8 numStudios, u32 defaultStudioDPL2) { u32 i; // r31 u32 j; // r27 u32 itdPtr; // r28