Mario Kart 64
Loading...
Searching...
No Matches
heap.c File Reference
#include <ultra64.h>
#include <macros.h>
#include "audio/data.h"
#include "audio/effects.h"
#include "audio/heap.h"
#include "audio/load.h"
#include "audio/synthesis.h"
#include "audio/playback.h"
#include "audio/seqplayer.h"
Include dependency graph for heap.c:

Functions

void reset_bank_and_seq_load_status (void)
 
void discard_bank (s32 bankId)
 
void discard_sequence (s32 seqId)
 
void * soundAlloc (struct SoundAllocPool *pool, u32 size)
 
void sound_alloc_pool_init (struct SoundAllocPool *pool, void *memAddr, u32 size)
 
void persistent_pool_clear (struct PersistentPool *persistent)
 
void temporary_pool_clear (struct TemporaryPool *temporary)
 
void func_800B90E0 (struct SoundAllocPool *pool)
 
void sound_init_main_pools (s32 arg0)
 
void func_800B914C (struct PoolSplit *arg0)
 
void seq_and_bank_pool_init (struct PoolSplit2 *a)
 
void persistent_pools_init (struct PoolSplit *a)
 
void temporary_pools_init (struct PoolSplit *a)
 
void * alloc_bank_or_seq (struct SoundMultiPool *arg0, s32 arg1, s32 size, s32 arg3, s32 id)
 
void * get_bank_or_seq (s32 poolIdx, s32 arg1, s32 id)
 
void * get_bank_or_seq_inner (s32 poolIdx, s32 arg1, s32 bankId)
 
void func_800B9BE4 (f32 arg0, f32 arg1, u16 *arg2)
 
void decrease_reverb_gain (void)
 
s32 audio_shut_down_and_reset_step (void)
 
void audio_reset_session (void)
 
void * unk_pool1_lookup (s32 poolIdx, s32 id)
 
void func_800BA8B0 (s32 poolIdx, s32 id)
 

Variables

s16 gVolume
 
s8 gUseReverb
 
s8 gNumSynthesisReverbs
 
struct NoteSubEugNoteSubsEu
 
struct SoundAllocPool gAudioSessionPool
 
struct SoundAllocPool gAudioInitPool
 
struct SoundAllocPool gNotesAndBuffersPool
 
u8 sAudioHeapPad [0x20]
 
struct SoundAllocPool gSeqAndBankPool
 
struct SoundAllocPool gPersistentCommonPool
 
struct SoundAllocPool gTemporaryCommonPool
 
struct SoundMultiPool gSeqLoadedPool
 
struct SoundMultiPool gBankLoadedPool
 
struct SoundMultiPool gUnusedLoadedPool
 
struct Unk1Pool gUnkPool1
 
struct PoolSplit sSessionPoolSplit
 
struct PoolSplit2 sSeqAndBankPoolSplit
 
struct PoolSplit sPersistentCommonPoolSplit
 
struct PoolSplit sTemporaryCommonPoolSplit
 
u8 gUnkLoadStatus [0x40]
 
u8 gBankLoadStatus [0x40]
 
u8 gSeqLoadStatus [0x100]
 
volatile u8 gAudioResetStatus
 
u8 gAudioResetPresetIdToLoad
 
s32 gAudioResetFadeOutFramesLeft
 
u8 gAudioUnusedBuffer [0x1000]
 
struct NotegNotes
 
char heapAudioString00 [] = "Warning:Kill Note %x \n"
 
char heapAudioString01 [] = "Kill Voice %d (ID %d) %d\n"
 
char heapAudioString02 [] = "Warning: Running Sequence's data disappear!\n"
 
char heapAudioString03 [] = "Audio:Memory:Heap OverFlow : Not Allocate %d!\n"
 
char heapAudioString04 [] = "Audio:Memory:DataHeap Not Allocate \n"
 
char heapAudioString05 [] = "StayHeap Not Allocate %d\n"
 
char heapAudioString06 [] = "AutoHeap Not Allocate %d\n"
 
char heapAudioString07 [] = "Status ID0 : %d ID1 : %d\n"
 
char heapAudioString08 [] = "id 0 is Stopping\n"
 
char heapAudioString09 [] = "id 0 is Stop\n"
 
char heapAudioString10 [] = "id 1 is Stopping\n"
 
char heapAudioString11 [] = "id 1 is Stop\n"
 
char heapAudioString12 [] = "WARNING: NO FREE AUTOSEQ AREA.\n"
 
char heapAudioString13 [] = "WARNING: NO STOP AUTO AREA.\n"
 
char heapAudioString14 [] = " AND TRY FORCE TO STOP SIDE \n"
 
char heapAudioString15 [] = "Check ID0 (seq ID %d) Useing ...\n"
 
char heapAudioString16 [] = "Check ID1 (seq ID %d) Useing ...\n"
 
char heapAudioString17 [] = "No Free Seq area.\n"
 
char heapAudioString18 [] = "CH %d: ID %d\n"
 
char heapAudioString19 [] = "TWO SIDES ARE LOADING... ALLOC CANCELED.\n"
 
char heapAudioString20 [] = "WARNING: Before Area Overlaid After."
 
char heapAudioString21 [] = "WARNING: After Area Overlaid Before."
 
char heapAudioString22 [] = "MEMORY:SzHeapAlloc ERROR: sza->side %d\n"
 
char heapAudioString23 [] = "Audio:MEMORY:SzHeap Overflow error. (%d bytes)\n"
 
char heapAudioString24 [] = "Auto Heap Unhit for ID %d\n"
 
char heapAudioString25 [] = "Heap Reconstruct Start %x\n"
 
char heapAudioString26 [] = "AHPBASE %x\n"
 
char heapAudioString27 [] = "AHPCUR %x\n"
 
char heapAudioString28 [] = "HeapTop %x\n"
 
char heapAudioString29 [] = "SynoutRate %d / %d \n"
 
char heapAudioString30 [] = "FXSIZE %d\n"
 
char heapAudioString31 [] = "FXCOMP %d\n"
 
char heapAudioString32 [] = "FXDOWN %d\n"
 
char heapAudioString33 [] = "WaveCacheLen: %d\n"
 
char heapAudioString34 [] = "SpecChange Finished\n"
 
char heapAudioString35 [] = "Fbank Seq %x\n"
 
char heapAudioString36 [] = "Already Load Type %d,ID %d\n"
 
char heapAudioString37 [] = "Warning:Emem Over,not alloc %d\n"
 
char heapAudioString38 [] = "Write %d\n"
 

Function Documentation

◆ alloc_bank_or_seq()

void * alloc_bank_or_seq ( struct SoundMultiPool * arg0,
s32 arg1,
s32 size,
s32 arg3,
s32 id )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audio_reset_session()

void audio_reset_session ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ audio_shut_down_and_reset_step()

s32 audio_shut_down_and_reset_step ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decrease_reverb_gain()

void decrease_reverb_gain ( void )
Here is the caller graph for this function:

◆ discard_bank()

void discard_bank ( s32 bankId)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discard_sequence()

void discard_sequence ( s32 seqId)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B90E0()

void func_800B90E0 ( struct SoundAllocPool * pool)

◆ func_800B914C()

void func_800B914C ( struct PoolSplit * arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800B9BE4()

void func_800B9BE4 ( f32 arg0,
f32 arg1,
u16 * arg2 )
Bug
they probably meant to store the value to tmp[i] and tmp[8 + i]

◆ func_800BA8B0()

void func_800BA8B0 ( s32 poolIdx,
s32 id )
Here is the call graph for this function:

◆ get_bank_or_seq()

void * get_bank_or_seq ( s32 poolIdx,
s32 arg1,
s32 id )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_bank_or_seq_inner()

void * get_bank_or_seq_inner ( s32 poolIdx,
s32 arg1,
s32 bankId )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ persistent_pool_clear()

void persistent_pool_clear ( struct PersistentPool * persistent)
Here is the caller graph for this function:

◆ persistent_pools_init()

void persistent_pools_init ( struct PoolSplit * a)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_bank_and_seq_load_status()

void reset_bank_and_seq_load_status ( void )
Here is the caller graph for this function:

◆ seq_and_bank_pool_init()

void seq_and_bank_pool_init ( struct PoolSplit2 * a)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sound_alloc_pool_init()

void sound_alloc_pool_init ( struct SoundAllocPool * pool,
void * memAddr,
u32 size )
Here is the caller graph for this function:

◆ sound_init_main_pools()

void sound_init_main_pools ( s32 arg0)
Here is the call graph for this function:

◆ soundAlloc()

void * soundAlloc ( struct SoundAllocPool * pool,
u32 size )
Here is the caller graph for this function:

◆ temporary_pool_clear()

void temporary_pool_clear ( struct TemporaryPool * temporary)
Here is the caller graph for this function:

◆ temporary_pools_init()

void temporary_pools_init ( struct PoolSplit * a)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unk_pool1_lookup()

void * unk_pool1_lookup ( s32 poolIdx,
s32 id )
Here is the caller graph for this function:

Variable Documentation

◆ gAudioInitPool

struct SoundAllocPool gAudioInitPool

◆ gAudioResetFadeOutFramesLeft

s32 gAudioResetFadeOutFramesLeft

◆ gAudioResetPresetIdToLoad

u8 gAudioResetPresetIdToLoad

◆ gAudioResetStatus

volatile u8 gAudioResetStatus

◆ gAudioSessionPool

struct SoundAllocPool gAudioSessionPool

◆ gAudioUnusedBuffer

u8 gAudioUnusedBuffer[0x1000]

◆ gBankLoadedPool

struct SoundMultiPool gBankLoadedPool

◆ gBankLoadStatus

u8 gBankLoadStatus[0x40]

◆ gNotes

struct Note* gNotes

◆ gNotesAndBuffersPool

struct SoundAllocPool gNotesAndBuffersPool

◆ gNoteSubsEu

struct NoteSubEu* gNoteSubsEu

◆ gNumSynthesisReverbs

s8 gNumSynthesisReverbs

◆ gPersistentCommonPool

struct SoundAllocPool gPersistentCommonPool

◆ gSeqAndBankPool

struct SoundAllocPool gSeqAndBankPool

◆ gSeqLoadedPool

struct SoundMultiPool gSeqLoadedPool

◆ gSeqLoadStatus

u8 gSeqLoadStatus[0x100]

◆ gTemporaryCommonPool

struct SoundAllocPool gTemporaryCommonPool

◆ gUnkLoadStatus

u8 gUnkLoadStatus

◆ gUnkPool1

struct Unk1Pool gUnkPool1

◆ gUnusedLoadedPool

struct SoundMultiPool gUnusedLoadedPool

◆ gUseReverb

s8 gUseReverb

◆ gVolume

s16 gVolume

◆ heapAudioString00

char heapAudioString00[] = "Warning:Kill Note %x \n"

Given that (almost) all of these are format strings, it is highly likely that they are meant to be used in some sort of printf variant. But I don't care to try and figure out which function gets which string(s) So I've place them all here instead.

◆ heapAudioString01

char heapAudioString01[] = "Kill Voice %d (ID %d) %d\n"

◆ heapAudioString02

char heapAudioString02[] = "Warning: Running Sequence's data disappear!\n"

◆ heapAudioString03

char heapAudioString03[] = "Audio:Memory:Heap OverFlow : Not Allocate %d!\n"

◆ heapAudioString04

char heapAudioString04[] = "Audio:Memory:DataHeap Not Allocate \n"

◆ heapAudioString05

char heapAudioString05[] = "StayHeap Not Allocate %d\n"

◆ heapAudioString06

char heapAudioString06[] = "AutoHeap Not Allocate %d\n"

◆ heapAudioString07

char heapAudioString07[] = "Status ID0 : %d ID1 : %d\n"

◆ heapAudioString08

char heapAudioString08[] = "id 0 is Stopping\n"

◆ heapAudioString09

char heapAudioString09[] = "id 0 is Stop\n"

◆ heapAudioString10

char heapAudioString10[] = "id 1 is Stopping\n"

◆ heapAudioString11

char heapAudioString11[] = "id 1 is Stop\n"

◆ heapAudioString12

char heapAudioString12[] = "WARNING: NO FREE AUTOSEQ AREA.\n"

◆ heapAudioString13

char heapAudioString13[] = "WARNING: NO STOP AUTO AREA.\n"

◆ heapAudioString14

char heapAudioString14[] = " AND TRY FORCE TO STOP SIDE \n"

◆ heapAudioString15

char heapAudioString15[] = "Check ID0 (seq ID %d) Useing ...\n"

◆ heapAudioString16

char heapAudioString16[] = "Check ID1 (seq ID %d) Useing ...\n"

◆ heapAudioString17

char heapAudioString17[] = "No Free Seq area.\n"

◆ heapAudioString18

char heapAudioString18[] = "CH %d: ID %d\n"

◆ heapAudioString19

char heapAudioString19[] = "TWO SIDES ARE LOADING... ALLOC CANCELED.\n"

◆ heapAudioString20

char heapAudioString20[] = "WARNING: Before Area Overlaid After."

◆ heapAudioString21

char heapAudioString21[] = "WARNING: After Area Overlaid Before."

◆ heapAudioString22

char heapAudioString22[] = "MEMORY:SzHeapAlloc ERROR: sza->side %d\n"

◆ heapAudioString23

char heapAudioString23[] = "Audio:MEMORY:SzHeap Overflow error. (%d bytes)\n"

◆ heapAudioString24

char heapAudioString24[] = "Auto Heap Unhit for ID %d\n"

◆ heapAudioString25

char heapAudioString25[] = "Heap Reconstruct Start %x\n"

◆ heapAudioString26

char heapAudioString26[] = "AHPBASE %x\n"

◆ heapAudioString27

char heapAudioString27[] = "AHPCUR %x\n"

◆ heapAudioString28

char heapAudioString28[] = "HeapTop %x\n"

◆ heapAudioString29

char heapAudioString29[] = "SynoutRate %d / %d \n"

◆ heapAudioString30

char heapAudioString30[] = "FXSIZE %d\n"

◆ heapAudioString31

char heapAudioString31[] = "FXCOMP %d\n"

◆ heapAudioString32

char heapAudioString32[] = "FXDOWN %d\n"

◆ heapAudioString33

char heapAudioString33[] = "WaveCacheLen: %d\n"

◆ heapAudioString34

char heapAudioString34[] = "SpecChange Finished\n"

◆ heapAudioString35

char heapAudioString35[] = "Fbank Seq %x\n"

◆ heapAudioString36

char heapAudioString36[] = "Already Load Type %d,ID %d\n"

◆ heapAudioString37

char heapAudioString37[] = "Warning:Emem Over,not alloc %d\n"

◆ heapAudioString38

char heapAudioString38[] = "Write %d\n"

◆ sAudioHeapPad

u8 sAudioHeapPad[0x20]

◆ sPersistentCommonPoolSplit

struct PoolSplit sPersistentCommonPoolSplit

◆ sSeqAndBankPoolSplit

struct PoolSplit2 sSeqAndBankPoolSplit

◆ sSessionPoolSplit

struct PoolSplit sSessionPoolSplit

◆ sTemporaryCommonPoolSplit

struct PoolSplit sTemporaryCommonPoolSplit