summaryrefslogtreecommitdiff
path: root/src/code/code_800E4FE0.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2022-06-19 07:31:08 -0700
committerGitHub <noreply@github.com>2022-06-19 16:31:08 +0200
commit38de9405e65a1af95fac80ae225696638184b22c (patch)
tree639acb9ce3f4b6aebd0fe8fff937ccc111667ba2 /src/code/code_800E4FE0.c
parent849fdbf9ea37a69ad6af3bbdc55c07903135dccd (diff)
Restructuring SoundFont Structs (#1277)
* Document fontData relocation * Fix * More cleanup * typo * sample -> sampleHeader * Revert name * Just a little more * Another comment change * Fix Drum * fix * K0BASE * Update relocs * consistency * clearer phrasing * Fix * PR/Discord Suggestions * typo * Revert Sound Font Sample Struct for another PR * Missed a function * Organize structs, tuned samples * New sound effects struct * fix func name * wave samples * consistency * Fix * More suggestions * PR Suggestions * sample bank reloc * Revert header description * better text * SoundFount Relocation: some cleanup (#6) * `fontDataStartAddr` for relocation, `fontData` for reading data (`AudioLoad_RelocateFont`) * Comment "cleanup" in `AudioLoad_RelocateFont` * Comment "cleanup" in `AudioLoad_RelocateSample` * Cleanup cast and compares to 0 (offsets) / NULL (pointers) * Cleanup * soundFont info * Revert waveSamples * cleanup * Plural * PR suggestions * A few name changes and suggestions * small changes * Drop Info on SoundFont * Missed some * One more function change Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Diffstat (limited to 'src/code/code_800E4FE0.c')
-rw-r--r--src/code/code_800E4FE0.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/code/code_800E4FE0.c b/src/code/code_800E4FE0.c
index 1c2370566..785a02cf1 100644
--- a/src/code/code_800E4FE0.c
+++ b/src/code/code_800E4FE0.c
@@ -517,9 +517,9 @@ u8* func_800E5E84(s32 arg0, u32* arg1) {
return AudioLoad_GetFontsForSequence(arg0, arg1);
}
-void func_800E5EA4(s32 arg0, u32* arg1, u32* arg2) {
- *arg1 = gAudioContext.soundFonts[arg0].sampleBankId1;
- *arg2 = gAudioContext.soundFonts[arg0].sampleBankId2;
+void Audio_GetSampleBankIdsOfFont(s32 fontId, u32* sampleBankId1, u32* sampleBankId2) {
+ *sampleBankId1 = gAudioContext.soundFontList[fontId].sampleBankId1;
+ *sampleBankId2 = gAudioContext.soundFontList[fontId].sampleBankId2;
}
s32 func_800E5EDC(void) {
@@ -784,7 +784,7 @@ s32 func_800E6590(s32 playerIdx, s32 arg1, s32 arg2) {
SequencePlayer* seqPlayer;
SequenceLayer* layer;
Note* note;
- SoundFontSound* sound;
+ TunedSample* tunedSample;
s32 loopEnd;
s32 samplePos;
@@ -806,11 +806,11 @@ s32 func_800E6590(s32 playerIdx, s32 arg1, s32 arg2) {
note = layer->note;
if (layer == note->playbackState.parentLayer) {
- sound = note->noteSubEu.sound.soundFontSound;
- if (sound == NULL) {
+ tunedSample = note->noteSubEu.tunedSample;
+ if (tunedSample == NULL) {
return 0;
}
- loopEnd = sound->sample->loop->end;
+ loopEnd = tunedSample->sample->loop->end;
samplePos = note->synthesisState.samplePosInt;
return loopEnd - samplePos;
}
@@ -834,7 +834,7 @@ s32 func_800E66C0(s32 arg0) {
NoteSubEu* temp_a3;
s32 i;
Note* note;
- SoundFontSound* sound;
+ TunedSample* tunedSample;
phi_v1 = 0;
for (i = 0; i < gAudioContext.numNotes; i++) {
@@ -844,11 +844,11 @@ s32 func_800E66C0(s32 arg0) {
temp_a3 = &note->noteSubEu;
if (temp_a2->adsr.action.s.state != 0) {
if (arg0 >= 2) {
- sound = temp_a3->sound.soundFontSound;
- if (sound == NULL || temp_a3->bitField1.isSyntheticWave) {
+ tunedSample = temp_a3->tunedSample;
+ if (tunedSample == NULL || temp_a3->bitField1.isSyntheticWave) {
continue;
}
- if (sound->sample->medium == MEDIUM_RAM) {
+ if (tunedSample->sample->medium == MEDIUM_RAM) {
continue;
}
}