From b2f070da808c638166984868c0bcc2819012ecb4 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Thu, 6 Aug 2020 00:03:03 -0500 Subject: [PATCH] alSynAddPlayer --- lib/src/unknown_0C9C90.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/src/unknown_0C9C90.c b/lib/src/unknown_0C9C90.c index f43933cc..2a1aa949 100644 --- a/lib/src/unknown_0C9C90.c +++ b/lib/src/unknown_0C9C90.c @@ -110,8 +110,7 @@ void alEvtqPostEvent(ALEventQueue *evtq, ALEvent *evt, ALMicroTime delta) } #endif -ALMicroTime alEvtqNextEvent(ALEventQueue *evtq, ALEvent *evt) -{ +ALMicroTime alEvtqNextEvent(ALEventQueue *evtq, ALEvent *evt) { ALEventListItem *item; ALMicroTime delta; OSIntMask mask; @@ -144,8 +143,7 @@ ALMicroTime alEvtqNextEvent(ALEventQueue *evtq, ALEvent *evt) } -void alEvtqNew(ALEventQueue *evtq, ALEventListItem *items, s32 itemCount) -{ +void alEvtqNew(ALEventQueue *evtq, ALEventListItem *items, s32 itemCount){ s32 i; evtq->eventCount = 0; @@ -159,6 +157,17 @@ void alEvtqNew(ALEventQueue *evtq, ALEventListItem *items, s32 itemCount) } } -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s") +//GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s") +void alSynAddPlayer(ALSynth *drvr, ALPlayer *client) +{ + OSIntMask mask = osSetIntMask(OS_IM_NONE); + + client->samplesLeft = drvr->curSamples; + client->next = drvr->head; + drvr->head = client; + + osSetIntMask(mask); +} + GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/_allocatePVoice.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAllocVoice.s")