summaryrefslogtreecommitdiff
path: root/src/audio/lib/load.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2024-02-01 10:25:23 +1100
committerGitHub <noreply@github.com>2024-01-31 18:25:23 -0500
commita0d31dba680fdddb354dc8aae6ae0efe1663ef3f (patch)
treefc3afc6f166b9a8fd83a643ef61adb03e7491dd4 /src/audio/lib/load.c
parentd65fb6ed28299b36cfb9c80949649b9a4da4883e (diff)
Document Audio Thread Commands (#1399)
* begin docs * cleanup * copy over progress * cleanup * small cleanup * more docs, fill out cmds * small touchup * pan weight ganon comment * fix specId * seqcmd cleanup * format * small cleanup * one more thing * small feedback from MM * partial PR * some PR Suggestions * small adjustments * ticks, seqticks, frames, updates: term cleanup * small fix * PR Review * PR Review * PR Review * rm param * adjust comment * update renamed functions * format --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Diffstat (limited to 'src/audio/lib/load.c')
-rw-r--r--src/audio/lib/load.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/audio/lib/load.c b/src/audio/lib/load.c
index b7b674a23..c542c8062 100644
--- a/src/audio/lib/load.c
+++ b/src/audio/lib/load.c
@@ -1126,7 +1126,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
void* ramAddr;
s32 i;
- D_801755D0 = NULL;
+ gAudioCustomUpdateFunction = NULL;
gAudioCtx.resetTimer = 0;
{
@@ -1138,25 +1138,26 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
}
}
+ // 1000 is a conversion from seconds to milliseconds
switch (osTvType) {
case OS_TV_PAL:
- gAudioCtx.unk_2960 = 20.03042f;
- gAudioCtx.refreshRate = 50;
+ gAudioCtx.maxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_PAL / REFRESH_RATE_PAL;
+ gAudioCtx.refreshRate = REFRESH_RATE_PAL;
break;
case OS_TV_MPAL:
- gAudioCtx.unk_2960 = 16.546f;
- gAudioCtx.refreshRate = 60;
+ gAudioCtx.maxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_MPAL / REFRESH_RATE_MPAL;
+ gAudioCtx.refreshRate = REFRESH_RATE_MPAL;
break;
case OS_TV_NTSC:
default:
- gAudioCtx.unk_2960 = 16.713f;
- gAudioCtx.refreshRate = 60;
+ gAudioCtx.maxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_NTSC / REFRESH_RATE_NTSC;
+ gAudioCtx.refreshRate = REFRESH_RATE_NTSC;
break;
}
- Audio_InitMesgQueues();
+ AudioThread_InitMesgQueues();
for (i = 0; i < 3; i++) {
gAudioCtx.aiBufLengths[i] = 0xA0;
@@ -1209,7 +1210,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
gAudioCtx.numSequences = gAudioCtx.sequenceTable->numEntries;
- gAudioCtx.audioResetSpecIdToLoad = 0;
+ gAudioCtx.specId = 0;
gAudioCtx.resetStatus = 1; // Set reset to immediately initialize the audio heap
AudioHeap_ResetStep();