mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Fix memory corruption in sound init
This commit is contained in:
parent
757cad4fbc
commit
bf315f266f
2 changed files with 3 additions and 2 deletions
|
@ -268,6 +268,7 @@ void *soundAlloc(struct SoundAllocPool *pool, u32 size) {
|
|||
u32 alignedSize = ALIGN16(size);
|
||||
|
||||
if (pool == NULL || pool->cur == NULL) {
|
||||
fprintf(stderr, "soundAlloc failed: pull was invalid\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1984,8 +1984,8 @@ void audio_init() {
|
|||
|
||||
// Load bank sets for each sequence (assets/bank_sets.s)
|
||||
data = LOAD_DATA(gBankSetsData);
|
||||
gAlBankSets = soundAlloc(&gAudioInitPool, 0x800);
|
||||
audio_dma_copy_immediate((uintptr_t)data, gAlBankSets, 0x800);
|
||||
gAlBankSets = soundAlloc(&gAudioInitPool, 160);
|
||||
audio_dma_copy_immediate((uintptr_t)data, gAlBankSets, 160);
|
||||
|
||||
init_sequence_players();
|
||||
gAudioLoadLock = AUDIO_LOCK_NOT_LOADING;
|
||||
|
|
Loading…
Reference in a new issue