diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2024-11-09 20:45:31 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2024-11-09 20:45:31 -0600 |
| commit | cd48d2cefac7d162242cc2d335ec3bd10b0f8cd2 (patch) | |
| tree | eaa694a663eda00eae26937f3d3f343d3e8b67dd /src/audio/audio_thread.c | |
| parent | 4acc13fb36523ba270b3b921ffd1328610e0a58c (diff) | |
Updated audio
Diffstat (limited to 'src/audio/audio_thread.c')
| -rw-r--r-- | src/audio/audio_thread.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index 0ccbba46..f60cf6af 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -48,7 +48,7 @@ void AudioThread_CreateNextAudioBuffer(s16 *samples, u32 num_samples) { gCurAudioFrameDmaCount = 0; AudioLoad_DecreaseSampleDmaTtls(); - // AudioLoad_ProcessLoads(gAudioResetStep); + AudioLoad_ProcessLoads(gAudioResetStep); if (MQ_GET_MESG(gAudioSpecQueue, &specId)) { if (gAudioResetStep == 0) { @@ -80,6 +80,7 @@ void AudioThread_CreateNextAudioBuffer(s16 *samples, u32 num_samples) { } gCurAbiCmdBuffer = func_80009B64(gCurAbiCmdBuffer, &abiCmdCount, samples, num_samples); + memcpy(gAiBuffers[gCurAiBuffIndex], samples, num_samples); gAudioRandom = osGetCount() * (gAudioRandom + gAudioTaskCountQ); gAudioCurTask->msg = OS_MESG_PTR(NULL); @@ -347,7 +348,7 @@ void AudioThread_ScheduleProcessCmds(void) { D_800C7C70 = (u8) (gThreadCmdWritePos - gThreadCmdReadPos + 0x100); } msg = (((gThreadCmdReadPos & 0xFF) << 8) | (gThreadCmdWritePos & 0xFF)); - osSendMesg32(gThreadCmdProcQueue, msg, OS_MESG_NOBLOCK); + osSendMesg(gThreadCmdProcQueue, OS_MESG_32(msg), OS_MESG_NOBLOCK); gThreadCmdReadPos = gThreadCmdWritePos; } @@ -364,11 +365,10 @@ void AudioThread_ProcessCmds(u32 msg) { u8 writePos; if (!gThreadCmdQueueFinished) { - gCurCmdReadPos = msg >> 8; + gCurCmdReadPos = (msg >> 8) & 0xFF; } - + writePos = msg & 0xFF; while (true) { - writePos = msg & 0xFF; if (gCurCmdReadPos == writePos) { gThreadCmdQueueFinished = 0; |
