Fix hardware.c match

This commit is contained in:
Phillip Stephens 2023-02-22 01:11:32 -08:00
parent 0436d062bb
commit 83ed13edf2
3 changed files with 8 additions and 8 deletions

View File

@ -586,7 +586,7 @@ typedef s32 (*SND_COMPARE)(u16*, u8*);
void dataInit(u32, s32); /* extern */ void dataInit(u32, s32); /* extern */
void dataInitStack(); /* extern */ void dataInitStack(); /* extern */
s32 hwInit(u32* rate, u8 numVoices, u8 numStudios, u32 flags); /* extern */ s32 hwInit(u32* frq, u16 numVoices, u16 numStudios, u32 flags); /* extern */
void hwEnableIrq(); void hwEnableIrq();
void hwDisableIrq(); void hwDisableIrq();
void s3dInit(s32); /* extern */ void s3dInit(s32); /* extern */
@ -626,7 +626,7 @@ void salInvertMatrix(SND_FMATRIX* out, const SND_FMATRIX* in);
/* hardware */ /* hardware */
u32 salInitAi(SND_SOME_CALLBACK, u32, u32*); u32 salInitAi(SND_SOME_CALLBACK, u32, u32*);
u32 salInitDsp(u32); u32 salInitDsp(u32);
bool salInitDspCtrl(u8 numVoices, u8 numStudios, u32 defaultStudioDPL2); u32 salInitDspCtrl(u8 numVoices, u8 numStudios, u32 defaultStudioDPL2);
u32 salStartAi(); u32 salStartAi();
void salInitHRTFBuffer(); void salInitHRTFBuffer();
void salActivateVoice(DSPvoice* dsp_vptr, u8 studio); void salActivateVoice(DSPvoice* dsp_vptr, u8 studio);

View File

@ -65,16 +65,16 @@ void snd_handle_irq() {
hwIRQLeaveCritical(); hwIRQLeaveCritical();
} }
s32 hwInit(u32* rate, u8 numVoices, u8 numStudios, u32 flags) { s32 hwInit(u32 * frq, u16 numVoices, u16 numStudios, u32 flags) {
hwInitIrq(); hwInitIrq();
salFrame = 0; salFrame = 0;
salAuxFrame = 0; salAuxFrame = 0;
salMessageCallback = NULL; salMessageCallback = NULL;
if (salInitAi(snd_handle_irq, flags, rate) == 0) { if (salInitAi(snd_handle_irq, flags, frq) == 0) {
// OSReport("Could not initialize AI.\n"); // OSReport("Could not initialize AI.\n");
} else { } else {
// OSReport("salInitAi() is done.\n\n"); // 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"); // OSReport("Could not initialize DSP control logic.\n");
} else { } else {
// OSReport("salInitDspCtrl() is done.\n\n"); // OSReport("salInitDspCtrl() is done.\n\n");

View File

@ -29,7 +29,7 @@ s16* dspITDBuffer = NULL;
DSPvoice* dspVoice = NULL; DSPvoice* dspVoice = NULL;
SND_MESSAGE_CALLBACK salMessageCallback = 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 i; // r31
u32 j; // r27 u32 j; // r27
u32 itdPtr; // r28 u32 itdPtr; // r28