1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-06 07:56:32 +00:00

Audio WIP (#836)

* being code_800EC960

* wip

* wip

* more audio progress

* migrate data in code_800E11F0

* wip

* make ok

* remove asm

* wip

* move some variables outside of gAudioContext to the AudioContext structure due to the size used in func_800E3094

* more progress

* wip

* wip

* split code_800E11F0

* migrate rodata in code_800E11F0

* match functions that couldn't because of data issues

* move code_800E4FE0 asm files

* wip

* more wip

* fix global functions, and forward declarations

* wip

* wip

* wip

* ocarina wip

* match a couple functions

* some progress

* separate some bss

* match func_800EDA3C

* some matching

* more matches

* migrate audio rodata

* some matches

* more matchess

* start on synthesis

* work on synthesis

* fix function declaration

* Merge branch 'master' into audio

* match a few more functions

* wip

* wip

* more matching, rename Audio_SetBGM to Audio_QueueSeqCmd

* name several audio functions, and audiocontext members

* more naming, rename code_800E11F0 to audio_load, code_800DAAC0 to audio_synthesis

* audio wip

* match a few more functions.

* wip

* add missing NON_MATCHING directive

* wip

* some matching, data reogranization

* match cursed function

* wip

* wip

* formatting

* remove prefix from struct memebers

* missed function rename

* review

Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
krimtonz 2021-07-27 18:44:58 -05:00 committed by GitHub
parent cc9a04feb4
commit d1a5ea5110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
429 changed files with 9047 additions and 17038 deletions

View file

@ -1893,7 +1893,7 @@ void UCodeDisas_RegisterUCode(UCodeDisas*, s32, UCodeInfo*);
void UCodeDisas_SetCurUCode(UCodeDisas*, void*);
// ? func_800DACC0(?);
// ? func_800DB03C(?);
// ? func_800DB0C4(?);
// ? AudioSynth_Update(?);
// ? func_800DB2C0(?);
// ? func_800DB330(?);
// ? func_800DB3D8(?);
@ -1905,24 +1905,24 @@ void UCodeDisas_SetCurUCode(UCodeDisas*, void*);
// ? func_800DBAE8(?);
// ? func_800DBB9C(?);
// ? func_800DBBD4(?);
// ? func_800DBC20(?);
// ? func_800DBC64(?);
// ? func_800DBCB0(?);
// ? AudioSynth_SetBuffer(?);
// ? AudioSynth_DMemMove(?);
// ? AudioSynth_InterL(?);
// ? func_800DBCD4(?);
// ? func_800DBD10(?);
// ? func_800DBD38(?);
// ? func_800DBD60(?);
// ? func_800DBD94(?);
// ? func_800DBDB0(?);
// ? func_800DBDE4(?);
// ? func_800DBE38(?);
// ? func_800DBE74(?);
// ? func_800DBE98(?);
// ? AudioSynth_SaveBuffer(?);
// ? AudioSynth_EnvSetup2(?);
// ? AudioSynth_UnkCmd17(?);
// ? AudioSynth_HiLoGain(?);
// ? AudioSynth_UnkCmd19(?);
// ? AudioSynth_UnkCmd3(?);
// ? AudioSynth_SetFilter(?);
// ? AudioSynth_SetFilterCount(?);
// ? func_800DBEB0(?);
// ? func_800DBF5C(?);
// ? func_800DC008(?);
// ? func_800DC074(?);
// ? func_800DC0E0(?);
// ? AudioSynth_LoadRingBuffer(?);
// ? AudioSynth_SaveRingBuffer(?);
// ? AudioSynth_SaveBuffer(?);
// ? func_800DC124(?);
// ? func_800DC164(?);
// ? func_800DC1D8(?);
@ -1963,9 +1963,9 @@ void func_800DF688(s16* arg0, s32 arg1, s32 arg2);
void func_800DF7C4(void);
void func_800DF888(void);
s32 Audio_ResetStep(void);
void func_800DFBF8(void);
void Audio_InitHeap(void);
void* func_800E04E8(s32 poolIdx, s32 id);
// ? func_800E0540(?);
void* func_800E0540(s32 poolIdx, s32 id, u32 size);
void* func_800E05C4(u32 size, s32 arg1, void* arg2, s8 arg3, s32 arg4);
void func_800E0634(u32 arg0, u32 arg1);
UnkHeapEntry* func_800E06CC(u32 size);
@ -1979,103 +1979,49 @@ void func_800E0E6C(s32 id);
void func_800E0E90(s32 id);
void func_800E0EB4(s32 arg0, s32 id);
void func_800E1148(void);
// ? func_800E11F0(?);
// ? func_800E12DC(?);
void func_800E11F0(void);
s32 func_800E12DC(s32 arg0, s32 arg1, s32 arg2, u8* arg3, s32 arg4);
void func_800E1618(s32 arg0);
s32 Audio_IsBankLoadComplete(s32 bankId);
s32 Audio_IsSeqLoadComplete(s32 seqId);
void Audio_SetBankLoadStatus(s32 bankId, u8 status);
void Audio_SetSeqLoadStatus(s32 seqId, u8 status);
// ? func_800E1A78(?);
// ? func_800E1AD8(?);
// ? func_800E1B08(?);
// ? func_800E1B68(?);
// ? func_800E1C18(?);
// ? func_800E1C78(?);
// ? func_800E1D64(?);
// ? func_800E1E34(?);
// ? func_800E1E6C(?);
// ? func_800E1EB0(?);
// ? func_800E1EF4(?);
// ? func_800E1F38(?);
// ? func_800E1F7C(?);
// ? func_800E202C(?);
void func_800E20D4(s32, s32, s32);
// ? func_800E2124(?);
// ? func_800E217C(?);
// ? func_800E22C4(?);
// ? func_800E2318(?);
// ? func_800E2338(?);
// ? func_800E2454(?);
// ? func_800E2558(?);
// ? func_800E2768(?);
// ? func_800E27A4(?);
// ? func_800E27F8(?);
// ? func_800E283C(?);
// ? func_800E2AA8(?);
// ? func_800E2BCC(?);
// ? func_800E2BE0(?);
// ? func_800E2CE0(?);
// ? func_800E2FEC(?);
void Audio_SetBankLoadStatus(s32 bankId, s32 status);
void Audio_SetSeqLoadStatus(s32 seqId, s32 status);
void func_800E1C18(s32 channelIdx, s32 arg1);
s32 func_800E1D64(s32 arg0, s32 arg1, s32 arg2);
void Audio_AudioSeqAsyncLoad(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue* arg3);
void Audio_AudioTableAsyncLoad(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue* arg3);
void Audio_AudioBankAsyncLoad(s32 arg0, s32 arg1, s32 arg2, OSMesgQueue* arg3);
u8* func_800E1F38(s32 arg0, u32* arg1);
void func_800E1F7C(s32 arg0);
s32 func_800E20D4(s32 playerIdx, s32 seqId, s32 arg2);
s32 func_800E2124(s32 playerIdx, s32 seqId, s32 arg2);
void Audio_ProcessLoads(s32 resetStatus);
void func_800E301C(void* callback);
// ? func_800E3034(?);
// ? func_800E3094(?);
void func_800E3400(void);
// ? func_800E3414(?);
// ? func_800E35E0(?);
// ? func_800E3678(?);
// ? func_800E36EC(?);
// ? func_800E3874(?);
// ? func_800E38F8(?);
void func_800E390C(s32, void*, void*);
void func_800E3A14(void);
// ? func_800E3A44(?);
// ? func_800E3AC8(?);
// ? func_800E3BEC(?);
// ? func_800E3D10(?);
// ? func_800E3D1C(?);
// ? func_800E3E58(?);
// ? func_800E3FB4(?);
// ? func_800E4044(?);
// ? func_800E4058(?);
// ? func_800E4198(?);
// ? func_800E4590(?);
// ? func_800E4744(?);
// ? func_800E48C0(?);
// ? func_800E4918(?);
void Audio_ContextInit(void* heap, u32 heapSize);
void Audio_SyncLoadsInit(void);
s32 Audio_SyncLoadSample(s32 arg0, s32 arg1, u8* arg2);
s32 Audio_SyncLoadSeq(s32 seqIdx, u8* ramAddr, u8* arg2);
void Audio_AsyncLoadReqInit(void);
void func_800E4D94(void);
void func_800E4EEC(u32, u32, s8*);
// ? func_800E4F58(?);
// ? func_800E4EEC(?);
void func_800E4F58(void);
void func_800E4FB0(void);
Sub_AudioMgr_18* func_800E4FE0(void);
// ? func_800E5000(?);
// ? func_800E5584(?);
// ? func_800E5958(?);
// ? func_800E59AC(?);
// ? func_800E59F4(?);
// ? func_800E5A8C(?);
// ? func_800E5AD8(?);
// ? func_800E5AFC(?);
void func_800E5B20(u32, s8);
// ? func_800E5B50(?);
// ? func_800E5B80(?);
// ? func_800E5C10(?);
// ? func_800E5C28(?);
// ? func_800E5D6C(?);
// ? func_800E5E20(?);
// ? func_800E5E84(?);
// ? func_800E5EDC(?);
// ? func_800E5F34(?);
// ? func_800E5F88(?);
// ? func_800E6024(?);
// ? func_800E6128(?);
// ? func_800E6300(?);
// ? func_800E6680(?);
// ? func_800E66C0(?);
s32 Audio_NextRandom(void);
// ? func_800E6818(?);
// ? func_800E6840(?);
void func_800E6880(void* mem, s32 size);
AudioTask* func_800E4FE0(void);
void Audio_QueueCmdF32(u32 arg0, f32 arg1);
void Audio_QueueCmdS32(u32 arg0, s32 arg1);
void Audio_QueueCmdS8(u32 arg0, s8 arg1);
void Audio_QueueCmdU16(u32 arg0, u16 arg1);
s32 Audio_ScheduleProcessCmds(void);
u32 func_800E5E20(u32* arg0);
u8* func_800E5E84(s32 arg0, u32* arg1);
s32 func_800E5EDC(void);
s32 func_800E5F88(u32 arg0);
void Audio_PreNMIInternal(void);
s32 func_800E6680(void);
u32 Audio_NextRandom(void);
void Audio_InitMesgQueues(void);
void Audio_osInvalDCache(void* buf, s32 size);
void Audio_osWritebackDCache(void* mem, s32 size);
s32 osAiSetNextBuffer(void*, u32);
void Audio_NoteSetVelPanReverb(Note* note, NoteSubEu* sub, Reverb* reverb);
void Audio_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput);
@ -2128,10 +2074,10 @@ void Audio_ProcessSequence(SequencePlayer* seqPlayer);
void Audio_ResetSequencePlayer(SequencePlayer* seqPlayer);
void func_800EC734(s32 seqPlayerIdx);
void Audio_InitSequencePlayers(void);
// ? func_800ECA00(?);
// ? func_800ECA60(?);
// ? Audio_GetOcaInput(?);
// ? Audio_OcaAdjStick(?);
// ? func_800ECAF0(?);
// ? func_800ECB34(?);
// ? Audio_OcaMapNoteValue(?);
// ? func_800ECB7C(?);
void func_800ECC04(u16);
// ? func_800ECDBC(?);
@ -2147,8 +2093,8 @@ void func_800ED93C(s8 songIdx, s8 arg1);
// ? func_800EE2D4(?);
// ? func_800EE318(?);
// ? func_800EE3C8(?);
UnkAudioStruct* func_800EE3D4(void);
UnkAudioStruct* func_800EE3F8(void);
OcarinaStaff* func_800EE3D4(void);
OcarinaStaff* Audio_OcaGetDisplayStaff(void);
// ? func_800EE404(?);
// ? func_800EE57C(?);
// ? func_800EE5EC(?);
@ -2167,7 +2113,7 @@ void func_800EEA50(GfxPrint* printer);
// ? func_800F28B4(?);
// ? func_800F29FC(?);
// ? func_800F2A04(?);
void func_800F2D6C(u8*, u16 sfxId);
void func_800F2D6C(s8*, u16 sfxId);
// ? func_800F2E28(?);
void func_800F3054(void);
// ? func_800F3188(?);
@ -2184,17 +2130,19 @@ void func_800F4010(Vec3f*, u16 sfxId, f32);
void func_800F41E0(Vec3f*, u16 sfxId, u8);
void func_800F4138(Vec3f*, u16 sfxId, f32);
void func_800F4190(Vec3f*, u16 sfxId);
void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2);
void func_800F4414(Vec3f* pos, u16 sfxId, f32);
void func_800F44EC(s8 arg0, s8 arg1);
void func_800F4524(Vec3f* arg0, u16 arg1, s8 arg2);
void func_800F4254(Vec3f* pos, u8 arg1);
void func_800F436C(Vec3f*, u16 sfxId, f32 arg2);
void func_800F4414(Vec3f*, u16 sfxId, f32 arg2);
void func_800F44EC(UNK_TYPE arg0, UNK_TYPE arg1);
void func_800F4524(Vec3f*, u16 sfxId, u8);
void func_800F4634(Vec3f*, f32);
void func_800F46E0(Vec3f* pos, f32 arg0);
// ? func_800F4784(?);
void func_800F47BC(void);
void func_800F47FC(void);
void func_800F483C(UNK_TYPE arg0, UNK_TYPE arg1);
void func_800F483C(u8 arg0, u8 arg1);
void func_800F4870(u8);
// ? func_800F491C(?);
void func_800F4A54(u8);
@ -2203,20 +2151,20 @@ void func_800F4BF4(Vec3f*, u16 sfxId, s8);
void func_800F4C58(Vec3f*, u16 sfxId, u8);
void func_800F4E30(Vec3f*, f32);
// ? func_800F50CC(?);
void func_800F50EC(Vec3f*);
void* func_800F50EC(Vec3f*);
// ? func_800F510C(?);
void func_800F52A0(Vec3f*, u16, u16);
void func_800F5504();
// ? func_800F5510(?);
// ? func_800F5550(?);
// ? func_800F56A8(?);
void func_800F574C(f32 arg0, u8 arg2);
void func_800F5718(void);
void func_800F574C(f32 arg0, UNK_TYPE arg2);
void func_800F5918(void);
void func_800F595C(u16);
void func_800F59E8(u16);
s32 func_800F5A58(s32, GlobalContext*);
void func_800F5ACC(u32 bgmID);
s32 func_800F5A58(u8);
void func_800F5ACC(u16 bgmID);
void func_800F5B58(void);
void func_800F5BF0(u8 arg0);
void func_800F5C64(u16);
@ -2225,10 +2173,8 @@ void func_800F5C2C(void);
// ? func_800F5E18(?);
void func_800F5E90(u8);
void func_800F6114(f32);
void func_800F6268(f32, UNK_TYPE);
void func_800F6584(UNK_TYPE);
void func_800F64E0(u8);
void func_800F6584(UNK_TYPE);
void func_800F6268(f32, u16);
void func_800F64E0(u8 arg0);
void func_800F66C0(s8 echo);
void func_800F66DC(s8);
void func_800F6700(s8 outputMode);
@ -2238,22 +2184,22 @@ void func_800F68BC(s8);
// ? func_800F68D4(?);
// ? func_800F691C(?);
void func_800F6964(u16);
void func_800F6AB0(u8);
// ? func_800F6B68(?);
void func_800F6AB0(u16);
// ? Audio_DisableAllSeq(?);
// ? func_800F6BB8(?);
void func_800F6C14();
void Audio_PreNMI();
// ? func_800F6C34(?);
void func_800F6D58(u8, u8, u8);
// ? func_800F6E7C(?);
void func_800F6FB4(u8);
void func_800F70F8();
void func_800F711C();
// ? func_800F7170(?);
void func_800F7170(void);
// ? func_800F71BC(?);
void func_800F7260(u16);
void func_800F72B8(u8);
void func_800F731C(u8);
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* a1, u8 a2, f32* a3, f32* a4, f32* a5);
void Audio_QueueSeqCmdMute(u8);
void Audio_ClearBGMMute(u8);
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* a1, u8 a2, f32* a3, f32* a4, s8* a5);
// ? func_800F74E0(?);
void func_800F7680(void);
void func_800F7B54(u8, u8);
@ -2263,25 +2209,25 @@ void func_800F87A0(u8);
void func_800F8884(u8, Vec3f*);
void func_800F89A0(u8, Vec3f*);
void func_800F89E8(Vec3f*);
// ? func_800F9280(?);
void Audio_QueueSeqCmd(u32 bgmID);
u16 func_800FA0B4(u8 a0);
s32 func_800FA11C(u32, u32);
void func_800F8A44(Vec3f* pos, u16 sfxId);
void func_800F8BA0(u8, u16);
void func_800F8D04(u32 sfxId);
void Audio_StopSfx(u32 sfxId);
void func_800F8E3C(void);
void func_800F8EA0(u8, u8, u16);
void func_800F8F34(u8);
void func_800F8F88(void);
u8 func_800F8FF4(u32 sfxId);
void func_800F905C(void);
// ? func_800F9280(?);
void func_800F9474(u8, u16);
void func_800F94FC(u32);
void Audio_SetBGM(u32 bgmId);
void func_800FA034(void);
u16 func_800FA0B4(u8 a0);
s32 func_800FA11C(u32, s32);
void Audio_ProcessSeqCmd(u32);
void Audio_ProcessSeqCmds(void);
void func_800FA174(u8);
void func_800FA18C(u8, u8);
void func_800FA240(u8, u8, u8, u8);
void Audio_SetVolScale(u8, u8, u8, u8);
void func_800FA3DC(void);
u8 func_800FAD34(void);
void func_800FADF8(void);