From e0ff6311effc6a6bb0975603a949c77dae6f8b7a Mon Sep 17 00:00:00 2001 From: Kevin Alexis Contreras <36680385+KiritoDv@users.noreply.github.com> Date: Fri, 3 Jun 2022 14:22:48 -0500 Subject: [PATCH] Increased initial audio pool size and fixed types --- soh/src/code/audio_heap.c | 10 +++++----- soh/src/code/audio_init_params.c | 2 +- soh/src/code/audio_synthesis.c | 4 ++-- soh/src/code/code_800F7260.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/soh/src/code/audio_heap.c b/soh/src/code/audio_heap.c index bee0178ff..25f66e4a7 100644 --- a/soh/src/code/audio_heap.c +++ b/soh/src/code/audio_heap.c @@ -1150,9 +1150,9 @@ void AudioHeap_UnapplySampleCacheForFont(SampleCacheEntry* entry, s32 fontId) { Drum* drum; Instrument* inst; SoundFontSound* sfx; - s32 instId; - s32 drumId; - s32 sfxId; + size_t instId; + size_t drumId; + size_t sfxId; for (instId = 0; instId < gAudioContext.soundFonts[fontId].numInstruments; instId++) { inst = Audio_GetInstrumentInner(fontId, instId); @@ -1203,7 +1203,7 @@ void AudioHeap_DiscardSampleCacheEntry(SampleCacheEntry* entry) { } } -void AudioHeap_UnapplySampleCache(SampleCacheEntry* entry, SoundFontSample* sample) +void AudioHeap_UnapplySampleCache(SampleCacheEntry* entry, SoundFontSample* sample) { if (!gUseLegacySD) return; @@ -1306,7 +1306,7 @@ void AudioHeap_ApplySampleBankCacheInternal(s32 apply, s32 sampleBankId) { s32 numFonts; s32 instId; s32 drumId; - s32 sfxId; + size_t sfxId; StorageChange change; s32 sampleBankId1; s32 sampleBankId2; diff --git a/soh/src/code/audio_init_params.c b/soh/src/code/audio_init_params.c index 0cebdf596..6b8bc18fe 100644 --- a/soh/src/code/audio_init_params.c +++ b/soh/src/code/audio_init_params.c @@ -10,7 +10,7 @@ const s16 D_8014A6C0[] = { 0x0030, // gTatumsPerBeat }; -const AudioContextInitSizes D_8014A6C4 = { 0x37F00, 0xE0E0, 0xBCE0 }; +const AudioContextInitSizes D_8014A6C4 = { 0x57F00, 0x2E0E0, 0xFCE0 }; ReverbSettings D_80133420[][3] = { { diff --git a/soh/src/code/audio_synthesis.c b/soh/src/code/audio_synthesis.c index db43e64e0..4b30e8c7d 100644 --- a/soh/src/code/audio_synthesis.c +++ b/soh/src/code/audio_synthesis.c @@ -382,11 +382,11 @@ void AudioSynth_EnvSetup1(Acmd* cmd, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { void func_800DBD08(void) { } -void AudioSynth_LoadBuffer(Acmd* cmd, s32 arg1, s32 arg2, s32 arg3) { +void AudioSynth_LoadBuffer(Acmd* cmd, s32 arg1, s32 arg2, uintptr_t arg3) { aLoadBuffer(cmd, arg3, arg1, arg2); } -void AudioSynth_SaveBuffer(Acmd* cmd, s32 arg1, s32 arg2, s32 arg3) { +void AudioSynth_SaveBuffer(Acmd* cmd, s32 arg1, s32 arg2, uintptr_t arg3) { aSaveBuffer(cmd, arg1, arg3, arg2); } diff --git a/soh/src/code/code_800F7260.c b/soh/src/code/code_800F7260.c index 1210a0114..4a6189947 100644 --- a/soh/src/code/code_800F7260.c +++ b/soh/src/code/code_800F7260.c @@ -124,7 +124,7 @@ void Audio_ClearBGMMute(u8 channelIdx) { void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd) { - u8 i; + size_t i; SoundRequest* req; if (!gSoundBankMuted[SFX_BANK_SHIFT(sfxId)]) {