mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
audio_synthesis.c OK and Documented (#1090)
* import synth docs * cleanup * small followup cleanup * PR Suggestions, small cleanup * fix bss * PR suggestion * fix enum * PR Suggestions
This commit is contained in:
+60
-31
@@ -53,6 +53,7 @@
|
||||
#define A_INIT 0x01
|
||||
#define A_CONTINUE 0x00
|
||||
#define A_LOOP 0x02
|
||||
#define A_ADPCM_SHORT 0x04
|
||||
#define A_OUT 0x02
|
||||
#define A_LEFT 0x02
|
||||
#define A_RIGHT 0x00
|
||||
@@ -331,13 +332,20 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (unsigned int)(a2); \
|
||||
}
|
||||
|
||||
#define aClearBuffer(pkt, d, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \
|
||||
_a->words.w1 = (unsigned int)(c); \
|
||||
}
|
||||
/*
|
||||
* Clears DMEM by writing zeros.
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param dmem DMEM address to clear
|
||||
* @param size number of bytes to clear (rounded up to the next multiple of 16)
|
||||
*/
|
||||
#define aClearBuffer(pkt, dmem, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(dmem, 0, 24); \
|
||||
_a->words.w1 = (uintptr_t)(size); \
|
||||
}
|
||||
|
||||
#define aEnvMixer(pkt, dmemi, count, swapLR, x0, x1, x2, x3, m, bits) \
|
||||
{ \
|
||||
@@ -368,14 +376,21 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(dmemi, 16, 16) | _SHIFTL(dmemo, 0, 16); \
|
||||
}
|
||||
|
||||
#define aLoadBuffer(pkt, s, d, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8) | \
|
||||
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(d, 0, 16); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
}
|
||||
/*
|
||||
* Loads a buffer to DMEM from any physical source address, KSEG0, or KSEG1
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param addrSrc Any physical source address, KSEG0, or KSEG1
|
||||
* @param dmemDest DMEM destination address
|
||||
* @param size number of bytes to copy (rounded down to the next multiple of 16)
|
||||
*/
|
||||
#define aLoadBuffer(pkt, addrSrc, dmemDest, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_LOADBUFF, 24, 8) | _SHIFTL((size) >> 4, 16, 8) | _SHIFTL(dmemDest, 0, 16)); \
|
||||
_a->words.w1 = (uintptr_t)(addrSrc); \
|
||||
}
|
||||
|
||||
#define aMix(pkt, f, g, i, o) \
|
||||
{ \
|
||||
@@ -404,14 +419,21 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
}
|
||||
|
||||
#define aSaveBuffer(pkt, s, d, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8) | \
|
||||
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(s, 0, 16); \
|
||||
_a->words.w1 = (unsigned int)(d); \
|
||||
}
|
||||
/*
|
||||
* Stores a buffer from DMEM to any physical source address, KSEG0, or KSEG1
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param dmemSrc DMEM source address
|
||||
* @param addrDest Any physical source address, KSEG0, or KSEG1
|
||||
* @param size number of bytes to copy (rounded down to the next multiple of 16)
|
||||
*/
|
||||
#define aSaveBuffer(pkt, dmemSrc, addrDest, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SAVEBUFF, 24, 8) | _SHIFTL((size) >> 4, 16, 8) | _SHIFTL(dmemSrc, 0, 16)); \
|
||||
_a->words.w1 = (uintptr_t)(addrDest); \
|
||||
}
|
||||
|
||||
#define aSegment(pkt, s, b) \
|
||||
{ \
|
||||
@@ -501,14 +523,21 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (unsigned int)(addr); \
|
||||
}
|
||||
|
||||
#define aDuplicate(pkt, count, dmemi, dmemo, a4) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DUPLICATE, 24, 8) | \
|
||||
_SHIFTL(count, 16, 8) | _SHIFTL(dmemi, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmemo, 16, 16) | _SHIFTL(a4, 0, 16); \
|
||||
}
|
||||
/*
|
||||
* Duplicates 128 bytes of data a specified number of times.
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param numCopies number of times to duplicate 128 bytes from src
|
||||
* @param dmemSrc DMEM source address
|
||||
* @param dmemDest DMEM destination address for the duplicates, size 128 * numCopies
|
||||
*/
|
||||
#define aDuplicate(pkt, numCopies, dmemSrc, dmemDest) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DUPLICATE, 24, 8) | _SHIFTL(numCopies, 16, 8) | _SHIFTL(dmemSrc, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmemDest, 16, 16) | _SHIFTL(0x80, 0, 16); \
|
||||
}
|
||||
|
||||
#define aAddMixer(pkt, count, dmemi, dmemo, a4) \
|
||||
{ \
|
||||
|
||||
+1
-42
@@ -2897,48 +2897,7 @@ s32 osFlashWriteBuffer(OSIoMesg* mb, s32 priority, void* dramAddr, OSMesgQueue*
|
||||
s32 osFlashWriteArray(u32 pageNum);
|
||||
s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u32 pageCount, OSMesgQueue* mq);
|
||||
|
||||
// void func_801877D0(void);
|
||||
// void func_80187B64(void);
|
||||
// void func_80187BEC(void);
|
||||
// void func_80187DE8(void);
|
||||
// void func_80187E58(void);
|
||||
// void func_80187F00(void);
|
||||
// void func_80187FB0(void);
|
||||
// void func_80187FE8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_80188034(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_80188078(void);
|
||||
// void func_801880C4(void);
|
||||
// void func_801880E8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_80188124(void);
|
||||
// void func_8018814C(void);
|
||||
// void func_80188174(void);
|
||||
// void func_801881A8(void);
|
||||
// void func_801881C4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_801881F8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_80188264(void);
|
||||
// void func_80188288(void);
|
||||
// void func_801882A0(void);
|
||||
// void func_80188304(void);
|
||||
// void func_801884A0(void);
|
||||
// void func_80188698(void);
|
||||
// void func_8018883C(void);
|
||||
// void func_801888E4(void);
|
||||
// void func_801889A4(void);
|
||||
// void func_80188A50(void);
|
||||
// void func_80188AFC(void);
|
||||
// void func_80188C48(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_80188CB4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_80188D28(void);
|
||||
// void func_80188D68(void);
|
||||
// void func_80188DDC(void);
|
||||
// void func_80188FBC(void);
|
||||
// void func_80189064(void);
|
||||
// void func_80189620(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
// void func_8018A4B4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
// void func_8018A768(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6);
|
||||
// void func_8018A808(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6);
|
||||
// void func_8018ACC4(void);
|
||||
// void func_8018AE34(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
Acmd* AudioSynth_Update(Acmd* cmdStart, s32* numAbiCmds, s16* aiStart, s32 aiBufLen);
|
||||
|
||||
void AudioHeap_DiscardFont(s32 fontId);
|
||||
void* AudioHeap_WritebackDCache(void* addr, size_t size);
|
||||
|
||||
+10
-24
@@ -1557,11 +1557,11 @@ extern f32 gPitchFrequencies[];
|
||||
extern u8 gDefaultShortNoteVelocityTable[];
|
||||
extern u8 gDefaultShortNoteGateTimeTable[];
|
||||
extern EnvelopePoint gDefaultEnvelope[];
|
||||
extern NoteSubEu gZeroNoteSub;
|
||||
extern NoteSubEu gDefaultNoteSub;
|
||||
extern u16 gHeadsetPanQuantization[];
|
||||
extern u16 gHeadsetPanQuantization[];
|
||||
extern s16 D_801D58A8[];
|
||||
extern NoteSampleState gZeroedSampleState;
|
||||
extern NoteSampleState gDefaultSampleState;
|
||||
extern u16 gHaasEffectDelaySize[];
|
||||
extern u16 gHaasEffectDelaySize[];
|
||||
extern s16 gInvalidAdpcmCodeBook[];
|
||||
extern f32 gHeadsetPanVolume[];
|
||||
extern f32 gStereoPanVolume[];
|
||||
extern f32 gDefaultPanVolume[];
|
||||
@@ -1721,21 +1721,7 @@ extern s8 gSfxDefaultReverb;
|
||||
extern u8 gAudioSpecId;
|
||||
// extern UNK_TYPE1 D_801DB4D8;
|
||||
// extern UNK_TYPE4 D_801DB4DC;
|
||||
// extern UNK_TYPE1 D_801DB4E0;
|
||||
// extern UNK_TYPE1 D_801DB528;
|
||||
// extern UNK_TYPE1 D_801DB570;
|
||||
// extern UNK_TYPE1 D_801DB5B8;
|
||||
// extern UNK_TYPE1 D_801DB600;
|
||||
// extern UNK_TYPE1 D_801DB648;
|
||||
// extern UNK_TYPE1 D_801DB690;
|
||||
// extern UNK_TYPE1 D_801DB6D8;
|
||||
// extern UNK_TYPE1 D_801DB720;
|
||||
// extern UNK_TYPE1 D_801DB750;
|
||||
// extern UNK_TYPE1 D_801DB798;
|
||||
// extern UNK_TYPE1 D_801DB870;
|
||||
// extern UNK_TYPE1 D_801DB8B8;
|
||||
// extern UNK_TYPE1 D_801DB900;
|
||||
extern UNK_PTR D_801DB930;
|
||||
extern ReverbSettings* gReverbSettingsTable[];
|
||||
extern AudioSpec gAudioSpecs[21];
|
||||
|
||||
// rodata
|
||||
@@ -3483,10 +3469,10 @@ extern ActiveSequence gActiveSeqs[];
|
||||
// extern UNK_TYPE1 D_80200BCE;
|
||||
// extern UNK_TYPE1 D_80200BD0;
|
||||
extern AudioContext gAudioContext; // at 0x80200C70
|
||||
extern void (*D_80208E68)(void);
|
||||
extern u32 (*D_80208E6C)(s8 value, SequenceChannel* channel);
|
||||
extern s32 (*D_80208E70)(Sample*, s32, s8, s32);
|
||||
extern Acmd* (*D_80208E74)(Acmd*, s32, s32);
|
||||
extern void (*gCustomAudioUpdateFunction)(void);
|
||||
extern u32 (*gCustomAudioSeqFunction)(s8 value, SequenceChannel* channel);
|
||||
extern s32 (*gCustomAudioReverbFunction)(Sample*, s32, s8, s32);
|
||||
extern Acmd* (*gCustomAudioSynthFunction)(Acmd*, s32, s32);
|
||||
|
||||
// post-code buffers
|
||||
extern u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
|
||||
|
||||
+173
-139
File diff suppressed because it is too large
Load Diff
@@ -608,7 +608,6 @@ beginseg
|
||||
pad_text
|
||||
include "build/src/code/audio/audio_data.o"
|
||||
include "build/src/code/audio/audio_synthesis.o"
|
||||
include "build/data/code/audio_synthesis.data.o"
|
||||
include "build/src/code/audio/audio_heap.o"
|
||||
include "build/data/code/audio_heap.bss.o"
|
||||
include "build/src/code/audio/audio_load.o"
|
||||
|
||||
@@ -857,22 +857,99 @@ EnvelopePoint gDefaultEnvelope[] = {
|
||||
{ ADSR_DISABLE, 0 },
|
||||
};
|
||||
|
||||
NoteSubEu gZeroNoteSub = { 0 };
|
||||
NoteSampleState gZeroedSampleState = { 0 };
|
||||
|
||||
NoteSubEu gDefaultNoteSub = {
|
||||
{ 1, 1, 0, 0, 0, 0, 0, 0 }, { 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
NoteSampleState gDefaultSampleState = {
|
||||
{ true, true, false, false, false, false, false, false },
|
||||
{ 0 },
|
||||
0, // gain
|
||||
0, // haasEffectLeftDelaySize
|
||||
0, // haasEffectRightDelaySize
|
||||
0, // targetReverbVol
|
||||
0, // harmonicIndexCurAndPrev
|
||||
0, // combFilterSize
|
||||
0, // targetVolLeft
|
||||
0, // targetVolRight
|
||||
0, // frequencyFixedPoint
|
||||
0, // combFilterGain
|
||||
NULL, // tunedSample
|
||||
NULL, // filter
|
||||
0, // unk_18
|
||||
0, // surroundEffectIndex
|
||||
0, // unk_1A
|
||||
};
|
||||
|
||||
u16 gHeadsetPanQuantization[64] = {
|
||||
60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18,
|
||||
16, 14, 12, 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
u16 gHaasEffectDelaySize[64] = {
|
||||
30 * SAMPLE_SIZE,
|
||||
29 * SAMPLE_SIZE,
|
||||
28 * SAMPLE_SIZE,
|
||||
27 * SAMPLE_SIZE,
|
||||
26 * SAMPLE_SIZE,
|
||||
25 * SAMPLE_SIZE,
|
||||
24 * SAMPLE_SIZE,
|
||||
23 * SAMPLE_SIZE,
|
||||
22 * SAMPLE_SIZE,
|
||||
21 * SAMPLE_SIZE,
|
||||
20 * SAMPLE_SIZE,
|
||||
19 * SAMPLE_SIZE,
|
||||
18 * SAMPLE_SIZE,
|
||||
17 * SAMPLE_SIZE,
|
||||
16 * SAMPLE_SIZE,
|
||||
15 * SAMPLE_SIZE,
|
||||
14 * SAMPLE_SIZE,
|
||||
13 * SAMPLE_SIZE,
|
||||
12 * SAMPLE_SIZE,
|
||||
11 * SAMPLE_SIZE,
|
||||
10 * SAMPLE_SIZE,
|
||||
9 * SAMPLE_SIZE,
|
||||
8 * SAMPLE_SIZE,
|
||||
7 * SAMPLE_SIZE,
|
||||
6 * SAMPLE_SIZE,
|
||||
5 * SAMPLE_SIZE,
|
||||
4 * SAMPLE_SIZE,
|
||||
3 * SAMPLE_SIZE,
|
||||
2 * SAMPLE_SIZE,
|
||||
1 * SAMPLE_SIZE,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
s32 D_801D58A4 = 0;
|
||||
|
||||
// clang-format off
|
||||
s16 D_801D58A8[] = {
|
||||
s16 gInvalidAdpcmCodeBook[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
+142
-122
@@ -10,7 +10,7 @@ void AudioHeap_DiscardSampleCaches(void);
|
||||
void AudioHeap_DiscardSampleBank(s32 sampleBankId);
|
||||
void AudioHeap_ApplySampleBankCacheInternal(s32 apply, s32 sampleBankId);
|
||||
void AudioHeap_DiscardSampleBanks(void);
|
||||
void AudioHeap_InitReverb(s32 reverbIndex, ReverbSettings* settings, s32 flags);
|
||||
void AudioHeap_InitReverb(s32 reverbIndex, ReverbSettings* settings, s32 isFirstInit);
|
||||
|
||||
#define gTatumsPerBeat (gAudioTatumInit[1])
|
||||
|
||||
@@ -421,7 +421,7 @@ void* AudioHeap_AllocCached(s32 tableType, size_t size, s32 cache, s32 id) {
|
||||
if (loadStatusEntry0 == LOAD_STATUS_MAYBE_DISCARDABLE) {
|
||||
for (i = 0; i < gAudioContext.numNotes; i++) {
|
||||
if ((gAudioContext.notes[i].playbackState.fontId == temporaryCache->entries[0].id) &&
|
||||
gAudioContext.notes[i].noteSubEu.bitField0.enabled) {
|
||||
gAudioContext.notes[i].sampleState.bitField0.enabled) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -435,7 +435,7 @@ void* AudioHeap_AllocCached(s32 tableType, size_t size, s32 cache, s32 id) {
|
||||
if (loadStatusEntry1 == LOAD_STATUS_MAYBE_DISCARDABLE) {
|
||||
for (i = 0; i < gAudioContext.numNotes; i++) {
|
||||
if ((gAudioContext.notes[i].playbackState.fontId == temporaryCache->entries[1].id) &&
|
||||
gAudioContext.notes[i].noteSubEu.bitField0.enabled) {
|
||||
gAudioContext.notes[i].sampleState.bitField0.enabled) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -491,7 +491,7 @@ void* AudioHeap_AllocCached(s32 tableType, size_t size, s32 cache, s32 id) {
|
||||
if (loadStatusEntry0 == LOAD_STATUS_COMPLETE) {
|
||||
for (i = 0; i < gAudioContext.numNotes; i++) {
|
||||
if ((gAudioContext.notes[i].playbackState.fontId == temporaryCache->entries[0].id) &&
|
||||
gAudioContext.notes[i].noteSubEu.bitField0.enabled) {
|
||||
gAudioContext.notes[i].sampleState.bitField0.enabled) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -504,7 +504,7 @@ void* AudioHeap_AllocCached(s32 tableType, size_t size, s32 cache, s32 id) {
|
||||
if (loadStatusEntry1 == LOAD_STATUS_COMPLETE) {
|
||||
for (i = 0; i < gAudioContext.numNotes; i++) {
|
||||
if ((gAudioContext.notes[i].playbackState.fontId == temporaryCache->entries[1].id) &&
|
||||
gAudioContext.notes[i].noteSubEu.bitField0.enabled) {
|
||||
gAudioContext.notes[i].sampleState.bitField0.enabled) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -814,7 +814,7 @@ void AudioHeap_UpdateReverb(SynthesisReverb* reverb) {
|
||||
|
||||
void AudioHeap_UpdateReverbs(void) {
|
||||
s32 count;
|
||||
s32 i;
|
||||
s32 reverbIndex;
|
||||
s32 j;
|
||||
|
||||
if (gAudioContext.audioBufferParameters.specUnk4 == 2) {
|
||||
@@ -823,9 +823,9 @@ void AudioHeap_UpdateReverbs(void) {
|
||||
count = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < gAudioContext.numSynthesisReverbs; i++) {
|
||||
for (reverbIndex = 0; reverbIndex < gAudioContext.numSynthesisReverbs; reverbIndex++) {
|
||||
for (j = 0; j < count; j++) {
|
||||
AudioHeap_UpdateReverb(&gAudioContext.synthesisReverbs[i]);
|
||||
AudioHeap_UpdateReverb(&gAudioContext.synthesisReverbs[reverbIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -837,7 +837,7 @@ void AudioHeap_ClearAiBuffers(void) {
|
||||
s32 curAiBufferIndex = gAudioContext.curAiBufferIndex;
|
||||
s32 i;
|
||||
|
||||
gAudioContext.aiBufNumSamples[curAiBufferIndex] = gAudioContext.audioBufferParameters.minAiBufNumSamples;
|
||||
gAudioContext.aiBufNumSamples[curAiBufferIndex] = gAudioContext.audioBufferParameters.numSamplesPerFrameMin;
|
||||
|
||||
for (i = 0; i < AIBUF_LEN; i++) {
|
||||
gAudioContext.aiBuffers[curAiBufferIndex][i] = 0;
|
||||
@@ -870,7 +870,7 @@ s32 AudioHeap_ResetStep(void) {
|
||||
AudioHeap_UpdateReverbs();
|
||||
} else {
|
||||
for (i = 0; i < gAudioContext.numNotes; i++) {
|
||||
if (gAudioContext.notes[i].noteSubEu.bitField0.enabled &&
|
||||
if (gAudioContext.notes[i].sampleState.bitField0.enabled &&
|
||||
gAudioContext.notes[i].playbackState.adsr.action.s.state != ADSR_STATE_DISABLED) {
|
||||
gAudioContext.notes[i].playbackState.adsr.fadeOutVel =
|
||||
gAudioContext.audioBufferParameters.updatesPerFrameInv;
|
||||
@@ -907,7 +907,7 @@ s32 AudioHeap_ResetStep(void) {
|
||||
AudioHeap_Init();
|
||||
gAudioContext.resetStatus = 0;
|
||||
for (i = 0; i < ARRAY_COUNT(gAudioContext.aiBufNumSamples); i++) {
|
||||
gAudioContext.aiBufNumSamples[i] = gAudioContext.audioBufferParameters.maxAiBufNumSamples;
|
||||
gAudioContext.aiBufNumSamples[i] = gAudioContext.audioBufferParameters.numSamplesPerFrameMax;
|
||||
for (j = 0; j < AIBUF_LEN; j++) {
|
||||
gAudioContext.aiBuffers[i][j] = 0;
|
||||
}
|
||||
@@ -930,8 +930,8 @@ void AudioHeap_Init(void) {
|
||||
size_t cachePoolSize;
|
||||
size_t miscPoolSize;
|
||||
u32 intMask;
|
||||
s32 reverbIndex;
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 pad2;
|
||||
AudioSpec* spec = &gAudioSpecs[gAudioContext.audioResetSpecIdToLoad]; // Audio Specifications
|
||||
|
||||
@@ -942,19 +942,22 @@ void AudioHeap_Init(void) {
|
||||
gAudioContext.audioBufferParameters.aiSamplingFreq =
|
||||
osAiSetFrequency(gAudioContext.audioBufferParameters.samplingFreq);
|
||||
|
||||
gAudioContext.audioBufferParameters.samplesPerFrameTarget =
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameTarget =
|
||||
ALIGN16(gAudioContext.audioBufferParameters.samplingFreq / gAudioContext.refreshRate);
|
||||
gAudioContext.audioBufferParameters.minAiBufNumSamples =
|
||||
gAudioContext.audioBufferParameters.samplesPerFrameTarget - 0x10;
|
||||
gAudioContext.audioBufferParameters.maxAiBufNumSamples =
|
||||
gAudioContext.audioBufferParameters.samplesPerFrameTarget + 0x10;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameMin =
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameTarget - 0x10;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameMax =
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameTarget + 0x10;
|
||||
gAudioContext.audioBufferParameters.updatesPerFrame =
|
||||
((gAudioContext.audioBufferParameters.samplesPerFrameTarget + 0x10) / 0xD0) + 1;
|
||||
gAudioContext.audioBufferParameters.samplesPerUpdate = (gAudioContext.audioBufferParameters.samplesPerFrameTarget /
|
||||
gAudioContext.audioBufferParameters.updatesPerFrame) &
|
||||
~7;
|
||||
gAudioContext.audioBufferParameters.samplesPerUpdateMax = gAudioContext.audioBufferParameters.samplesPerUpdate + 8;
|
||||
gAudioContext.audioBufferParameters.samplesPerUpdateMin = gAudioContext.audioBufferParameters.samplesPerUpdate - 8;
|
||||
((gAudioContext.audioBufferParameters.numSamplesPerFrameTarget + 0x10) / 0xD0) + 1;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerUpdate =
|
||||
(gAudioContext.audioBufferParameters.numSamplesPerFrameTarget /
|
||||
gAudioContext.audioBufferParameters.updatesPerFrame) &
|
||||
~7;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerUpdateMax =
|
||||
gAudioContext.audioBufferParameters.numSamplesPerUpdate + 8;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerUpdateMin =
|
||||
gAudioContext.audioBufferParameters.numSamplesPerUpdate - 8;
|
||||
gAudioContext.audioBufferParameters.resampleRate = 32000.0f / (s32)gAudioContext.audioBufferParameters.samplingFreq;
|
||||
gAudioContext.audioBufferParameters.updatesPerFrameInvScaled =
|
||||
(1.0f / 256.0f) / gAudioContext.audioBufferParameters.updatesPerFrame;
|
||||
@@ -984,13 +987,13 @@ void AudioHeap_Init(void) {
|
||||
gAudioContext.unk_2870 /= gAudioContext.tempoInternalToExternal;
|
||||
|
||||
gAudioContext.audioBufferParameters.specUnk4 = spec->unk_04;
|
||||
gAudioContext.audioBufferParameters.samplesPerFrameTarget *= gAudioContext.audioBufferParameters.specUnk4;
|
||||
gAudioContext.audioBufferParameters.maxAiBufNumSamples *= gAudioContext.audioBufferParameters.specUnk4;
|
||||
gAudioContext.audioBufferParameters.minAiBufNumSamples *= gAudioContext.audioBufferParameters.specUnk4;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameTarget *= gAudioContext.audioBufferParameters.specUnk4;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameMax *= gAudioContext.audioBufferParameters.specUnk4;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameMin *= gAudioContext.audioBufferParameters.specUnk4;
|
||||
gAudioContext.audioBufferParameters.updatesPerFrame *= gAudioContext.audioBufferParameters.specUnk4;
|
||||
|
||||
if (gAudioContext.audioBufferParameters.specUnk4 >= 2) {
|
||||
gAudioContext.audioBufferParameters.maxAiBufNumSamples -= 0x10;
|
||||
gAudioContext.audioBufferParameters.numSamplesPerFrameMax -= 0x10;
|
||||
}
|
||||
|
||||
// Determine the maximum allowable number of audio command list entries for the rsp microcode
|
||||
@@ -1037,13 +1040,13 @@ void AudioHeap_Init(void) {
|
||||
gAudioContext.notes = AudioHeap_AllocZeroed(&gAudioContext.miscPool, gAudioContext.numNotes * sizeof(Note));
|
||||
AudioPlayback_NoteInitAll();
|
||||
AudioPlayback_InitNoteFreeList();
|
||||
gAudioContext.noteSubsEu =
|
||||
gAudioContext.sampleStateList =
|
||||
AudioHeap_AllocZeroed(&gAudioContext.miscPool, gAudioContext.audioBufferParameters.updatesPerFrame *
|
||||
gAudioContext.numNotes * sizeof(NoteSubEu));
|
||||
gAudioContext.numNotes * sizeof(NoteSampleState));
|
||||
|
||||
// Initialize audio binary interface command list buffer
|
||||
for (j = 0; j < ARRAY_COUNT(gAudioContext.abiCmdBufs); j++) {
|
||||
gAudioContext.abiCmdBufs[j] =
|
||||
for (i = 0; i < ARRAY_COUNT(gAudioContext.abiCmdBufs); i++) {
|
||||
gAudioContext.abiCmdBufs[i] =
|
||||
AudioHeap_AllocDmaMemoryZeroed(&gAudioContext.miscPool, gAudioContext.maxAudioCmds * sizeof(Acmd));
|
||||
}
|
||||
|
||||
@@ -1052,20 +1055,20 @@ void AudioHeap_Init(void) {
|
||||
AudioHeap_InitAdsrDecayTable();
|
||||
|
||||
// Initialize reverbs
|
||||
for (i = 0; i < ARRAY_COUNT(gAudioContext.synthesisReverbs); i++) {
|
||||
gAudioContext.synthesisReverbs[i].useReverb = 0;
|
||||
for (reverbIndex = 0; reverbIndex < ARRAY_COUNT(gAudioContext.synthesisReverbs); reverbIndex++) {
|
||||
gAudioContext.synthesisReverbs[reverbIndex].useReverb = 0;
|
||||
}
|
||||
|
||||
gAudioContext.numSynthesisReverbs = spec->numReverbs;
|
||||
for (i = 0; i < gAudioContext.numSynthesisReverbs; i++) {
|
||||
AudioHeap_InitReverb(i, &spec->reverbSettings[i], 1);
|
||||
for (reverbIndex = 0; reverbIndex < gAudioContext.numSynthesisReverbs; reverbIndex++) {
|
||||
AudioHeap_InitReverb(reverbIndex, &spec->reverbSettings[reverbIndex], true);
|
||||
}
|
||||
|
||||
// Initialize sequence players
|
||||
AudioSeq_InitSequencePlayers();
|
||||
for (j = 0; j < gAudioContext.audioBufferParameters.numSequencePlayers; j++) {
|
||||
AudioSeq_InitSequencePlayerChannels(j);
|
||||
AudioSeq_ResetSequencePlayer(&gAudioContext.seqPlayers[j]);
|
||||
for (i = 0; i < gAudioContext.audioBufferParameters.numSequencePlayers; i++) {
|
||||
AudioSeq_InitSequencePlayerChannels(i);
|
||||
AudioSeq_ResetSequencePlayer(&gAudioContext.seqPlayers[i]);
|
||||
}
|
||||
|
||||
// Initialize two additional caches on the audio heap to store individual audio samples
|
||||
@@ -1529,149 +1532,165 @@ void AudioHeap_DiscardSampleBanks(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void AudioHeap_SetReverbData(s32 reverbIndex, u32 dataType, s32 data, s32 flags) {
|
||||
s32 windowSize;
|
||||
void AudioHeap_SetReverbData(s32 reverbIndex, u32 dataType, s32 data, s32 isFirstInit) {
|
||||
s32 delayNumSamples;
|
||||
SynthesisReverb* reverb = &gAudioContext.synthesisReverbs[reverbIndex];
|
||||
|
||||
switch (dataType) {
|
||||
case 0:
|
||||
AudioHeap_InitReverb(reverbIndex, (ReverbSettings*)data, 0);
|
||||
case REVERB_DATA_TYPE_SETTINGS:
|
||||
AudioHeap_InitReverb(reverbIndex, (ReverbSettings*)data, false);
|
||||
break;
|
||||
case 1:
|
||||
|
||||
case REVERB_DATA_TYPE_DELAY:
|
||||
if (data < 4) {
|
||||
data = 4;
|
||||
}
|
||||
|
||||
windowSize = data * 64;
|
||||
if (windowSize < 0x100) {
|
||||
windowSize = 0x100;
|
||||
delayNumSamples = data * 64;
|
||||
if (delayNumSamples < (16 * SAMPLES_PER_FRAME)) {
|
||||
delayNumSamples = 16 * SAMPLES_PER_FRAME;
|
||||
}
|
||||
|
||||
windowSize /= reverb->downsampleRate;
|
||||
delayNumSamples /= reverb->downsampleRate;
|
||||
|
||||
if (flags == 0) {
|
||||
if (reverb->unk_1E >= (data / reverb->downsampleRate)) {
|
||||
if ((reverb->nextRingBufPos >= windowSize) || (reverb->unk_24 >= windowSize)) {
|
||||
reverb->nextRingBufPos = 0;
|
||||
reverb->unk_24 = 0;
|
||||
}
|
||||
} else {
|
||||
if (!isFirstInit) {
|
||||
if (reverb->delayNumSamplesAfterDownsampling < (data / reverb->downsampleRate)) {
|
||||
break;
|
||||
}
|
||||
if ((reverb->nextReverbBufPos >= delayNumSamples) || (reverb->delayNumSamplesUnk >= delayNumSamples)) {
|
||||
reverb->nextReverbBufPos = 0;
|
||||
reverb->delayNumSamplesUnk = 0;
|
||||
}
|
||||
}
|
||||
|
||||
reverb->windowSize = windowSize;
|
||||
reverb->delayNumSamples = delayNumSamples;
|
||||
|
||||
if ((reverb->downsampleRate != 1) || reverb->unk_18) {
|
||||
reverb->unk_0E = 0x8000 / reverb->downsampleRate;
|
||||
if (reverb->unk_30 == NULL) {
|
||||
reverb->unk_30 = AudioHeap_AllocZeroed(&gAudioContext.miscPool, 0x20);
|
||||
reverb->unk_34 = AudioHeap_AllocZeroed(&gAudioContext.miscPool, 0x20);
|
||||
reverb->unk_38 = AudioHeap_AllocZeroed(&gAudioContext.miscPool, 0x20);
|
||||
reverb->unk_3C = AudioHeap_AllocZeroed(&gAudioContext.miscPool, 0x20);
|
||||
if (reverb->unk_3C == NULL) {
|
||||
if ((reverb->downsampleRate != 1) || reverb->resampleEffectOn) {
|
||||
reverb->downsamplePitch = 0x8000 / reverb->downsampleRate;
|
||||
if (reverb->leftLoadResampleBuf == NULL) {
|
||||
reverb->leftLoadResampleBuf =
|
||||
AudioHeap_AllocZeroed(&gAudioContext.miscPool, sizeof(RESAMPLE_STATE));
|
||||
reverb->rightLoadResampleBuf =
|
||||
AudioHeap_AllocZeroed(&gAudioContext.miscPool, sizeof(RESAMPLE_STATE));
|
||||
reverb->leftSaveResampleBuf =
|
||||
AudioHeap_AllocZeroed(&gAudioContext.miscPool, sizeof(RESAMPLE_STATE));
|
||||
reverb->rightSaveResampleBuf =
|
||||
AudioHeap_AllocZeroed(&gAudioContext.miscPool, sizeof(RESAMPLE_STATE));
|
||||
if (reverb->rightSaveResampleBuf == NULL) {
|
||||
reverb->downsampleRate = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].unk_0C = data;
|
||||
|
||||
case REVERB_DATA_TYPE_DECAY:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].decayRatio = data;
|
||||
break;
|
||||
case 3:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].unk_16 = data;
|
||||
|
||||
case REVERB_DATA_TYPE_SUB_VOLUME:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].subVolume = data;
|
||||
break;
|
||||
case 4:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].unk_0A = data;
|
||||
|
||||
case REVERB_DATA_TYPE_VOLUME:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].volume = data;
|
||||
break;
|
||||
case 5:
|
||||
|
||||
case REVERB_DATA_TYPE_LEAK_RIGHT:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].leakRtl = data;
|
||||
break;
|
||||
case 6:
|
||||
|
||||
case REVERB_DATA_TYPE_LEAK_LEFT:
|
||||
gAudioContext.synthesisReverbs[reverbIndex].leakLtr = data;
|
||||
break;
|
||||
case 7:
|
||||
|
||||
case REVERB_DATA_TYPE_FILTER_LEFT:
|
||||
if (data != 0) {
|
||||
if ((flags != 0) || (reverb->unk_278 == 0)) {
|
||||
reverb->filterLeftState = AudioHeap_AllocDmaMemoryZeroed(&gAudioContext.miscPool, 0x40);
|
||||
reverb->unk_278 = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, 0x10);
|
||||
if (isFirstInit || (reverb->filterLeftInit == NULL)) {
|
||||
reverb->filterLeftState = AudioHeap_AllocDmaMemoryZeroed(&gAudioContext.miscPool,
|
||||
2 * (FILTER_BUF_PART1 + FILTER_BUF_PART2));
|
||||
reverb->filterLeftInit = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, FILTER_SIZE);
|
||||
}
|
||||
|
||||
reverb->filterLeft = reverb->unk_278;
|
||||
if (reverb->filterLeft != 0) {
|
||||
reverb->filterLeft = reverb->filterLeftInit;
|
||||
if (reverb->filterLeft != NULL) {
|
||||
AudioHeap_LoadLowPassFilter(reverb->filterLeft, data);
|
||||
}
|
||||
} else {
|
||||
reverb->filterLeft = 0;
|
||||
reverb->filterLeft = NULL;
|
||||
|
||||
if (flags != 0) {
|
||||
reverb->unk_278 = 0;
|
||||
if (isFirstInit) {
|
||||
reverb->filterLeftInit = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 8:
|
||||
|
||||
case REVERB_DATA_TYPE_FILTER_RIGHT:
|
||||
if (data != 0) {
|
||||
if ((flags != 0) || (reverb->unk_27C == 0)) {
|
||||
reverb->filterRightState = AudioHeap_AllocDmaMemoryZeroed(&gAudioContext.miscPool, 0x40);
|
||||
reverb->unk_27C = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, 0x10);
|
||||
if (isFirstInit || (reverb->filterRightInit == NULL)) {
|
||||
reverb->filterRightState = AudioHeap_AllocDmaMemoryZeroed(
|
||||
&gAudioContext.miscPool, 2 * (FILTER_BUF_PART1 + FILTER_BUF_PART2));
|
||||
reverb->filterRightInit = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, FILTER_SIZE);
|
||||
}
|
||||
reverb->filterRight = reverb->unk_27C;
|
||||
if (reverb->unk_27C != 0) {
|
||||
AudioHeap_LoadLowPassFilter(reverb->unk_27C, data);
|
||||
reverb->filterRight = reverb->filterRightInit;
|
||||
if (reverb->filterRight != NULL) {
|
||||
AudioHeap_LoadLowPassFilter(reverb->filterRight, data);
|
||||
}
|
||||
} else {
|
||||
reverb->filterRight = 0;
|
||||
if (flags != 0) {
|
||||
reverb->unk_27C = 0;
|
||||
reverb->filterRight = NULL;
|
||||
if (isFirstInit) {
|
||||
reverb->filterRightInit = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
reverb->unk_19 = data;
|
||||
|
||||
case REVERB_DATA_TYPE_9:
|
||||
reverb->resampleEffectExtraSamples = data;
|
||||
if (data == 0) {
|
||||
reverb->unk_18 = false;
|
||||
reverb->resampleEffectOn = false;
|
||||
} else {
|
||||
reverb->unk_18 = true;
|
||||
reverb->resampleEffectOn = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void AudioHeap_InitReverb(s32 reverbIndex, ReverbSettings* settings, s32 flags) {
|
||||
void AudioHeap_InitReverb(s32 reverbIndex, ReverbSettings* settings, s32 isFirstInit) {
|
||||
SynthesisReverb* reverb = &gAudioContext.synthesisReverbs[reverbIndex];
|
||||
|
||||
if (flags != 0) {
|
||||
reverb->unk_1E = settings->windowSize / settings->downsampleRate;
|
||||
reverb->unk_30 = 0;
|
||||
} else if (reverb->unk_1E < (settings->windowSize / settings->downsampleRate)) {
|
||||
if (isFirstInit) {
|
||||
reverb->delayNumSamplesAfterDownsampling = settings->delayNumSamples / settings->downsampleRate;
|
||||
reverb->leftLoadResampleBuf = NULL;
|
||||
} else if (reverb->delayNumSamplesAfterDownsampling < (settings->delayNumSamples / settings->downsampleRate)) {
|
||||
return;
|
||||
}
|
||||
|
||||
reverb->downsampleRate = settings->downsampleRate;
|
||||
reverb->unk_18 = false;
|
||||
reverb->unk_19 = 0;
|
||||
reverb->unk_1A = 0;
|
||||
reverb->unk_1C = 0;
|
||||
AudioHeap_SetReverbData(reverbIndex, 1, settings->windowSize, flags);
|
||||
reverb->unk_0C = settings->unk_4;
|
||||
reverb->unk_0A = settings->unk_A;
|
||||
reverb->unk_14 = settings->unk_6 << 6;
|
||||
reverb->unk_16 = settings->unk_8;
|
||||
reverb->resampleEffectOn = false;
|
||||
reverb->resampleEffectExtraSamples = 0;
|
||||
reverb->resampleEffectLoadUnk = 0;
|
||||
reverb->resampleEffectSaveUnk = 0;
|
||||
AudioHeap_SetReverbData(reverbIndex, REVERB_DATA_TYPE_DELAY, settings->delayNumSamples, isFirstInit);
|
||||
reverb->decayRatio = settings->decayRatio;
|
||||
reverb->volume = settings->volume;
|
||||
reverb->subDelay = settings->subDelay * 64;
|
||||
reverb->subVolume = settings->subVolume;
|
||||
reverb->leakRtl = settings->leakRtl;
|
||||
reverb->leakLtr = settings->leakLtr;
|
||||
reverb->unk_05 = settings->unk_10;
|
||||
reverb->unk_08 = settings->unk_12;
|
||||
reverb->useReverb = 8;
|
||||
reverb->mixReverbIndex = settings->mixReverbIndex;
|
||||
reverb->mixReverbStrength = settings->mixReverbStrength;
|
||||
reverb->useReverb = 8; // used as a boolean
|
||||
|
||||
if (flags != 0) {
|
||||
reverb->leftRingBuf = AudioHeap_AllocZeroedAttemptExternal(&gAudioContext.miscPool, reverb->windowSize * 2);
|
||||
reverb->rightRingBuf = AudioHeap_AllocZeroedAttemptExternal(&gAudioContext.miscPool, reverb->windowSize * 2);
|
||||
if (isFirstInit) {
|
||||
reverb->leftReverbBuf =
|
||||
AudioHeap_AllocZeroedAttemptExternal(&gAudioContext.miscPool, reverb->delayNumSamples * 2);
|
||||
reverb->rightReverbBuf =
|
||||
AudioHeap_AllocZeroedAttemptExternal(&gAudioContext.miscPool, reverb->delayNumSamples * 2);
|
||||
reverb->resampleFlags = 1;
|
||||
reverb->nextRingBufPos = 0;
|
||||
reverb->unk_24 = 0;
|
||||
reverb->nextReverbBufPos = 0;
|
||||
reverb->delayNumSamplesUnk = 0;
|
||||
reverb->curFrame = 0;
|
||||
reverb->framesToIgnore = 2;
|
||||
}
|
||||
@@ -1681,12 +1700,13 @@ void AudioHeap_InitReverb(s32 reverbIndex, ReverbSettings* settings, s32 flags)
|
||||
reverb->tunedSample.tuning = 1.0f;
|
||||
reverb->sample.codec = CODEC_REVERB;
|
||||
reverb->sample.medium = MEDIUM_RAM;
|
||||
reverb->sample.size = reverb->windowSize * 2;
|
||||
reverb->sample.sampleAddr = (u8*)reverb->leftRingBuf;
|
||||
reverb->sample.size = reverb->delayNumSamples * SAMPLE_SIZE;
|
||||
reverb->sample.sampleAddr = (u8*)reverb->leftReverbBuf;
|
||||
reverb->loop.start = 0;
|
||||
reverb->loop.count = 1;
|
||||
reverb->loop.end = reverb->windowSize;
|
||||
reverb->loop.loopEnd = reverb->delayNumSamples;
|
||||
|
||||
AudioHeap_SetReverbData(reverbIndex, 7, settings->lowPassFilterCutoffLeft, flags);
|
||||
AudioHeap_SetReverbData(reverbIndex, 8, settings->lowPassFilterCutoffRight, flags);
|
||||
AudioHeap_SetReverbData(reverbIndex, REVERB_DATA_TYPE_FILTER_LEFT, settings->lowPassFilterCutoffLeft, isFirstInit);
|
||||
AudioHeap_SetReverbData(reverbIndex, REVERB_DATA_TYPE_FILTER_RIGHT, settings->lowPassFilterCutoffRight,
|
||||
isFirstInit);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,184 @@
|
||||
#include "global.h"
|
||||
|
||||
const s16 gAudioTatumInit[] = {
|
||||
0x1C00, // unused
|
||||
0x30, // gTatumsPerBeat
|
||||
0x1C00, // unused
|
||||
TATUMS_PER_BEAT, // gTatumsPerBeat
|
||||
};
|
||||
|
||||
// TODO: Extract from table?
|
||||
#define NUM_SOUNDFONTS 41
|
||||
#define SFX_SEQ_SIZE 0xC6A0
|
||||
#define AMBIENCE_SEQ_SIZE 0xFC0
|
||||
#define SOUNDFONT_0_SIZE 0x81C0
|
||||
#define SOUNDFONT_1_SIZE 0x36D0
|
||||
#define SOUNDFONT_2_SIZE 0xCE0
|
||||
|
||||
// Sizes of everything on the init pool
|
||||
#define AI_BUFFERS_SIZE (AIBUF_SIZE * ARRAY_COUNT(gAudioContext.aiBuffers))
|
||||
#define SOUNDFONT_LIST_SIZE (NUM_SOUNDFONTS * sizeof(SoundFont))
|
||||
|
||||
// 0x19BD0
|
||||
#define PERMANENT_POOL_SIZE \
|
||||
(SFX_SEQ_SIZE + AMBIENCE_SEQ_SIZE + SOUNDFONT_0_SIZE + SOUNDFONT_1_SIZE + SOUNDFONT_2_SIZE + 0x430)
|
||||
|
||||
const AudioHeapInitSizes gAudioHeapInitSizes = {
|
||||
0x137F00, // heapSize
|
||||
0x1C480, // initPoolSize
|
||||
0x1A000, // permanentPoolSize
|
||||
ALIGN16(sizeof(gAudioHeap) - 0x100), // audio heap size
|
||||
ALIGN16(PERMANENT_POOL_SIZE + AI_BUFFERS_SIZE + SOUNDFONT_LIST_SIZE + 0x40), // init pool size
|
||||
ALIGN16(PERMANENT_POOL_SIZE), // permanent pool size
|
||||
};
|
||||
|
||||
#define REVERB_INDEX_0_SETTINGS \
|
||||
{ 1, 0x30, 0x3000, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x3000, 0, 0 }
|
||||
|
||||
ReverbSettings reverbSettings0[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x20, 0x0800, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x0000, 0, 0 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings1[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x30, 0x1800, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x0000, 11, 11 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings2[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x38, 0x2800, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x0000, 7, 7 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings3[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x30, 0x6800, 0, 0, 0x7FFF, 0x1400, 0x1400, REVERB_INDEX_NONE, 0x3000, 6, 6 },
|
||||
{ 2, 0x50, 0x6000, 0, 0, 0x7FFF, 0xD000, 0x3000, REVERB_INDEX_NONE, 0x3000, 0, 0 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings4[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x40, 0x5000, 0, 0, 0x7FFF, 0x1800, 0x1800, REVERB_INDEX_NONE, 0x3000, 7, 7 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings5[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x40, 0x5C00, 0, 0, 0x7FFF, 0x2000, 0x2000, REVERB_INDEX_NONE, 0x3000, 4, 4 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings6[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x30, 0x6000, 0, 0, 0x7FFF, 0x1000, 0x1000, REVERB_INDEX_NONE, 0x3000, 10, 10 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings7[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x30, 0x6800, 0, 0, 0x7FFF, 0x1400, 0x1400, REVERB_INDEX_NONE, 0x3000, 6, 6 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings8[2] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x50, 0x5000, 0, 0, 0x7FFF, 0xD000, 0x3000, REVERB_INDEX_NONE, 0x3000, 0, 0 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettings9[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x20, 0x0000, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x0000, 0, 0 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettingsA[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x30, 0x1800, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x0000, 11, 11 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettingsB[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettingsC[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x40, 0x5000, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x3000, 0, 0 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettingsD[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x30, 0x6800, 0, 0, 0x7FFF, 0x1400, 0x1400, REVERB_INDEX_NONE, 0x3000, 6, 6 },
|
||||
{ 2, 0x50, 0x6000, 0, 0, 0x7FFF, 0xD000, 0x3000, REVERB_INDEX_NONE, 0x3000, 0, 0 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettingsE[3] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x30, 0x1800, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x0000, 11, 11 },
|
||||
{ 1, 0x40, 0x5000, 0, 0, 0x7FFF, 0x1800, 0x1800, REVERB_INDEX_NONE, 0x3000, 7, 7 },
|
||||
};
|
||||
|
||||
ReverbSettings reverbSettingsF[2] = {
|
||||
REVERB_INDEX_0_SETTINGS,
|
||||
{ 1, 0x50, 0x1800, 0, 0, 0x7FFF, 0x0000, 0x0000, REVERB_INDEX_NONE, 0x0000, 11, 11 },
|
||||
};
|
||||
|
||||
ReverbSettings* gReverbSettingsTable[] = {
|
||||
reverbSettings0, reverbSettings1, reverbSettings2, reverbSettings4, reverbSettings5,
|
||||
reverbSettings6, reverbSettings7, reverbSettings8, reverbSettings9, reverbSettings3,
|
||||
};
|
||||
|
||||
AudioSpec gAudioSpecs[21] = {
|
||||
/* 0x0 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x1 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x2 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x3 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x4 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x5 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x6 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x7 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x8 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x9 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0xA */
|
||||
{ 32000, 1, 28, 3, 0, 0, 2, reverbSettingsA, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x2800, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0xB */
|
||||
{ 32000, 1, 28, 3, 0, 0, 2, reverbSettingsA, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0xC */
|
||||
{ 32000, 1, 28, 5, 0, 0, 2, reverbSettingsA, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xCC800 },
|
||||
/* 0xD */
|
||||
{ 32000, 1, 24, 5, 0, 0, 3, reverbSettingsD, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0xE */
|
||||
{ 32000, 1, 24, 5, 0, 0, 3, reverbSettingsE, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0xF */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4000, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x10 */
|
||||
{ 32000, 1, 22, 5, 0, 0, 2, reverbSettings0, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x11 */
|
||||
{ 32000, 1, 22, 5, 0, 0, 2, reverbSettings8, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x12 */
|
||||
{ 32000, 1, 16, 5, 0, 0, 2, reverbSettings0, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x13 */
|
||||
{ 22050, 1, 24, 5, 0, 0, 2, reverbSettings0, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
|
||||
0xDC800 },
|
||||
/* 0x14 */
|
||||
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettings2, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x3600, 0x2600, 0, 0,
|
||||
0xDC800 },
|
||||
};
|
||||
|
||||
@@ -1218,9 +1218,9 @@ void AudioLoad_Init(void* heap, size_t heapSize) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
D_80208E68 = NULL;
|
||||
D_80208E70 = NULL;
|
||||
D_80208E74 = NULL;
|
||||
gCustomAudioUpdateFunction = NULL;
|
||||
gCustomAudioReverbFunction = NULL;
|
||||
gCustomAudioSynthFunction = NULL;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gAudioContext.unk_29A8); i++) {
|
||||
gAudioContext.unk_29A8[i] = NULL;
|
||||
|
||||
+103
-99
@@ -1,10 +1,10 @@
|
||||
#include "global.h"
|
||||
|
||||
void AudioPlayback_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput);
|
||||
void AudioPlayback_NoteSetResamplingRate(NoteSampleState* sampleState, f32 resamplingRateInput);
|
||||
void AudioPlayback_AudioListPushFront(AudioListItem* list, AudioListItem* item);
|
||||
void AudioPlayback_NoteInitForLayer(Note* note, SequenceLayer* layer);
|
||||
|
||||
void AudioPlayback_InitNoteSub(Note* note, NoteSubEu* noteSubEu, NoteSubAttributes* subAttrs) {
|
||||
void AudioPlayback_InitSampleState(Note* note, NoteSampleState* sampleState, NoteSubAttributes* subAttrs) {
|
||||
f32 volLeft;
|
||||
f32 volRight;
|
||||
s32 halfPanIndex;
|
||||
@@ -13,45 +13,45 @@ void AudioPlayback_InitNoteSub(Note* note, NoteSubEu* noteSubEu, NoteSubAttribut
|
||||
u8 strongRight;
|
||||
f32 vel;
|
||||
u8 pan;
|
||||
u8 reverbVol;
|
||||
u8 targetReverbVol;
|
||||
StereoData stereoData;
|
||||
s32 stereoHeadsetEffects = note->playbackState.stereoHeadsetEffects;
|
||||
|
||||
vel = subAttrs->velocity;
|
||||
pan = subAttrs->pan;
|
||||
reverbVol = subAttrs->reverbVol;
|
||||
stereoData = subAttrs->stereo.s;
|
||||
targetReverbVol = subAttrs->targetReverbVol;
|
||||
stereoData = subAttrs->stereoData;
|
||||
|
||||
noteSubEu->bitField0 = note->noteSubEu.bitField0;
|
||||
noteSubEu->bitField1 = note->noteSubEu.bitField1;
|
||||
noteSubEu->waveSampleAddr = note->noteSubEu.waveSampleAddr;
|
||||
noteSubEu->harmonicIndexCurAndPrev = note->noteSubEu.harmonicIndexCurAndPrev;
|
||||
sampleState->bitField0 = note->sampleState.bitField0;
|
||||
sampleState->bitField1 = note->sampleState.bitField1;
|
||||
sampleState->waveSampleAddr = note->sampleState.waveSampleAddr;
|
||||
sampleState->harmonicIndexCurAndPrev = note->sampleState.harmonicIndexCurAndPrev;
|
||||
|
||||
AudioPlayback_NoteSetResamplingRate(noteSubEu, subAttrs->frequency);
|
||||
AudioPlayback_NoteSetResamplingRate(sampleState, subAttrs->frequency);
|
||||
|
||||
pan &= 0x7F;
|
||||
|
||||
noteSubEu->bitField0.stereoStrongRight = false;
|
||||
noteSubEu->bitField0.stereoStrongLeft = false;
|
||||
noteSubEu->bitField0.stereoHeadsetEffects = stereoData.stereoHeadsetEffects;
|
||||
noteSubEu->bitField0.usesHeadsetPanEffects = stereoData.usesHeadsetPanEffects;
|
||||
sampleState->bitField0.strongRight = false;
|
||||
sampleState->bitField0.strongLeft = false;
|
||||
sampleState->bitField0.strongReverbRight = stereoData.strongReverbRight;
|
||||
sampleState->bitField0.strongReverbLeft = stereoData.strongReverbLeft;
|
||||
if (stereoHeadsetEffects && (gAudioContext.soundMode == SOUNDMODE_HEADSET)) {
|
||||
halfPanIndex = pan >> 1;
|
||||
if (halfPanIndex > 0x3F) {
|
||||
halfPanIndex = 0x3F;
|
||||
}
|
||||
|
||||
noteSubEu->headsetPanLeft = gHeadsetPanQuantization[halfPanIndex];
|
||||
noteSubEu->headsetPanRight = gHeadsetPanQuantization[0x3F - halfPanIndex];
|
||||
noteSubEu->bitField1.usesHeadsetPanEffects2 = true;
|
||||
sampleState->haasEffectRightDelaySize = gHaasEffectDelaySize[halfPanIndex];
|
||||
sampleState->haasEffectLeftDelaySize = gHaasEffectDelaySize[0x3F - halfPanIndex];
|
||||
sampleState->bitField1.useHaasEffect = true;
|
||||
|
||||
volLeft = gHeadsetPanVolume[pan];
|
||||
volRight = gHeadsetPanVolume[0x7F - pan];
|
||||
} else if (stereoHeadsetEffects && (gAudioContext.soundMode == SOUNDMODE_STEREO)) {
|
||||
strongLeft = strongRight = false;
|
||||
noteSubEu->headsetPanRight = 0;
|
||||
noteSubEu->headsetPanLeft = 0;
|
||||
noteSubEu->bitField1.usesHeadsetPanEffects2 = false;
|
||||
sampleState->haasEffectLeftDelaySize = 0;
|
||||
sampleState->haasEffectRightDelaySize = 0;
|
||||
sampleState->bitField1.useHaasEffect = false;
|
||||
|
||||
volLeft = gStereoPanVolume[pan];
|
||||
volRight = gStereoPanVolume[0x7F - pan];
|
||||
@@ -62,37 +62,37 @@ void AudioPlayback_InitNoteSub(Note* note, NoteSubEu* noteSubEu, NoteSubAttribut
|
||||
}
|
||||
|
||||
// case 0:
|
||||
noteSubEu->bitField0.stereoStrongRight = strongRight;
|
||||
noteSubEu->bitField0.stereoStrongLeft = strongLeft;
|
||||
sampleState->bitField0.strongRight = strongRight;
|
||||
sampleState->bitField0.strongLeft = strongLeft;
|
||||
|
||||
switch (stereoData.bit2) {
|
||||
switch (stereoData.type) {
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
noteSubEu->bitField0.stereoStrongRight = stereoData.strongRight;
|
||||
noteSubEu->bitField0.stereoStrongLeft = stereoData.strongLeft;
|
||||
sampleState->bitField0.strongRight = stereoData.strongRight;
|
||||
sampleState->bitField0.strongLeft = stereoData.strongLeft;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
noteSubEu->bitField0.stereoStrongRight = stereoData.strongRight | strongRight;
|
||||
noteSubEu->bitField0.stereoStrongLeft = stereoData.strongLeft | strongLeft;
|
||||
sampleState->bitField0.strongRight = stereoData.strongRight | strongRight;
|
||||
sampleState->bitField0.strongLeft = stereoData.strongLeft | strongLeft;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
noteSubEu->bitField0.stereoStrongRight = stereoData.strongRight ^ strongRight;
|
||||
noteSubEu->bitField0.stereoStrongLeft = stereoData.strongLeft ^ strongLeft;
|
||||
sampleState->bitField0.strongRight = stereoData.strongRight ^ strongRight;
|
||||
sampleState->bitField0.strongLeft = stereoData.strongLeft ^ strongLeft;
|
||||
break;
|
||||
}
|
||||
|
||||
} else if (gAudioContext.soundMode == SOUNDMODE_MONO) {
|
||||
noteSubEu->bitField0.stereoHeadsetEffects = false;
|
||||
noteSubEu->bitField0.usesHeadsetPanEffects = false;
|
||||
sampleState->bitField0.strongReverbRight = false;
|
||||
sampleState->bitField0.strongReverbLeft = false;
|
||||
volLeft = 0.707f; // approx 1/sqrt(2)
|
||||
volRight = 0.707f;
|
||||
} else {
|
||||
noteSubEu->bitField0.stereoStrongRight = stereoData.strongRight;
|
||||
noteSubEu->bitField0.stereoStrongLeft = stereoData.strongLeft;
|
||||
sampleState->bitField0.strongRight = stereoData.strongRight;
|
||||
sampleState->bitField0.strongLeft = stereoData.strongLeft;
|
||||
volLeft = gDefaultPanVolume[pan];
|
||||
volRight = gDefaultPanVolume[0x7F - pan];
|
||||
}
|
||||
@@ -100,33 +100,33 @@ void AudioPlayback_InitNoteSub(Note* note, NoteSubEu* noteSubEu, NoteSubAttribut
|
||||
vel = 0.0f > vel ? 0.0f : vel;
|
||||
vel = 1.0f < vel ? 1.0f : vel;
|
||||
|
||||
noteSubEu->targetVolLeft = (s32)((vel * volLeft) * (0x1000 - 0.001f));
|
||||
noteSubEu->targetVolRight = (s32)((vel * volRight) * (0x1000 - 0.001f));
|
||||
sampleState->targetVolLeft = (s32)((vel * volLeft) * (0x1000 - 0.001f));
|
||||
sampleState->targetVolRight = (s32)((vel * volRight) * (0x1000 - 0.001f));
|
||||
|
||||
noteSubEu->gain = subAttrs->gain;
|
||||
noteSubEu->filter = subAttrs->filter;
|
||||
noteSubEu->unk_07 = subAttrs->unk_14;
|
||||
noteSubEu->unk_0E = subAttrs->unk_16;
|
||||
noteSubEu->reverbVol = reverbVol;
|
||||
noteSubEu->unk_19 = subAttrs->unk_3;
|
||||
sampleState->gain = subAttrs->gain;
|
||||
sampleState->filter = subAttrs->filter;
|
||||
sampleState->combFilterSize = subAttrs->combFilterSize;
|
||||
sampleState->combFilterGain = subAttrs->combFilterGain;
|
||||
sampleState->targetReverbVol = targetReverbVol;
|
||||
sampleState->surroundEffectIndex = subAttrs->surroundEffectIndex;
|
||||
}
|
||||
|
||||
void AudioPlayback_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput) {
|
||||
void AudioPlayback_NoteSetResamplingRate(NoteSampleState* sampleState, f32 resamplingRateInput) {
|
||||
f32 resamplingRate = 0.0f;
|
||||
|
||||
if (resamplingRateInput < 2.0f) {
|
||||
noteSubEu->bitField1.hasTwoParts = false;
|
||||
sampleState->bitField1.hasTwoParts = false;
|
||||
resamplingRate = CLAMP_MAX(resamplingRateInput, 1.99998f);
|
||||
|
||||
} else {
|
||||
noteSubEu->bitField1.hasTwoParts = true;
|
||||
sampleState->bitField1.hasTwoParts = true;
|
||||
if (resamplingRateInput > 3.99996f) {
|
||||
resamplingRate = 1.99998f;
|
||||
} else {
|
||||
resamplingRate = resamplingRateInput * 0.5f;
|
||||
}
|
||||
}
|
||||
noteSubEu->resamplingRateFixedPoint = (s32)(resamplingRate * 32768.0f);
|
||||
sampleState->frequencyFixedPoint = (s32)(resamplingRate * 32768.0f);
|
||||
}
|
||||
|
||||
void AudioPlayback_NoteInit(Note* note) {
|
||||
@@ -140,17 +140,17 @@ void AudioPlayback_NoteInit(Note* note) {
|
||||
|
||||
note->playbackState.status = PLAYBACK_STATUS_0;
|
||||
note->playbackState.adsr.action.s.state = ADSR_STATE_INITIAL;
|
||||
note->noteSubEu = gDefaultNoteSub;
|
||||
note->sampleState = gDefaultSampleState;
|
||||
}
|
||||
|
||||
void AudioPlayback_NoteDisable(Note* note) {
|
||||
if (note->noteSubEu.bitField0.needsInit == true) {
|
||||
note->noteSubEu.bitField0.needsInit = false;
|
||||
if (note->sampleState.bitField0.needsInit == true) {
|
||||
note->sampleState.bitField0.needsInit = false;
|
||||
}
|
||||
note->playbackState.priority = 0;
|
||||
note->noteSubEu.bitField0.enabled = false;
|
||||
note->sampleState.bitField0.enabled = false;
|
||||
note->playbackState.status = PLAYBACK_STATUS_0;
|
||||
note->noteSubEu.bitField0.finished = false;
|
||||
note->sampleState.bitField0.finished = false;
|
||||
note->playbackState.parentLayer = NO_LAYER;
|
||||
note->playbackState.prevParentLayer = NO_LAYER;
|
||||
note->playbackState.adsr.action.s.state = ADSR_STATE_DISABLED;
|
||||
@@ -161,8 +161,8 @@ void AudioPlayback_ProcessNotes(void) {
|
||||
s32 pad;
|
||||
s32 playbackStatus;
|
||||
NoteAttributes* attrs;
|
||||
NoteSubEu* noteSubEu2;
|
||||
NoteSubEu* noteSubEu;
|
||||
NoteSampleState* sampleState;
|
||||
NoteSampleState* noteSampleState;
|
||||
Note* note;
|
||||
NotePlaybackState* playbackState;
|
||||
NoteSubAttributes subAttrs;
|
||||
@@ -172,7 +172,7 @@ void AudioPlayback_ProcessNotes(void) {
|
||||
|
||||
for (i = 0; i < gAudioContext.numNotes; i++) {
|
||||
note = &gAudioContext.notes[i];
|
||||
noteSubEu2 = &gAudioContext.noteSubsEu[gAudioContext.noteSubEuOffset + i];
|
||||
sampleState = &gAudioContext.sampleStateList[gAudioContext.sampleStateOffset + i];
|
||||
playbackState = ¬e->playbackState;
|
||||
if (playbackState->parentLayer != NO_LAYER) {
|
||||
if ((u32)playbackState->parentLayer < 0x7FFFFFFF) {
|
||||
@@ -211,10 +211,12 @@ void AudioPlayback_ProcessNotes(void) {
|
||||
|
||||
out:
|
||||
if (playbackState->priority != 0) {
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
noteSubEu = ¬e->noteSubEu;
|
||||
if ((playbackState->status >= 1) || noteSubEu->bitField0.finished) {
|
||||
if ((playbackState->adsr.action.s.state == ADSR_STATE_DISABLED) || noteSubEu->bitField0.finished) {
|
||||
noteSampleState = ¬e->sampleState;
|
||||
if ((playbackState->status >= 1) || noteSampleState->bitField0.finished) {
|
||||
if ((playbackState->adsr.action.s.state == ADSR_STATE_DISABLED) ||
|
||||
noteSampleState->bitField0.finished) {
|
||||
if (playbackState->wantedParentLayer != NO_LAYER) {
|
||||
AudioPlayback_NoteDisable(note);
|
||||
if (playbackState->wantedParentLayer->channel != NULL) {
|
||||
@@ -260,14 +262,14 @@ void AudioPlayback_ProcessNotes(void) {
|
||||
subAttrs.frequency = attrs->freqScale;
|
||||
subAttrs.velocity = attrs->velocity;
|
||||
subAttrs.pan = attrs->pan;
|
||||
subAttrs.reverbVol = attrs->reverb;
|
||||
subAttrs.stereo = attrs->stereo;
|
||||
subAttrs.targetReverbVol = attrs->targetReverbVol;
|
||||
subAttrs.stereoData = attrs->stereoData;
|
||||
subAttrs.gain = attrs->gain;
|
||||
subAttrs.filter = attrs->filter;
|
||||
subAttrs.unk_14 = attrs->unk_4;
|
||||
subAttrs.unk_16 = attrs->unk_6;
|
||||
subAttrs.unk_3 = attrs->unk_3;
|
||||
bookOffset = noteSubEu->bitField1.bookOffset;
|
||||
subAttrs.combFilterSize = attrs->combFilterSize;
|
||||
subAttrs.combFilterGain = attrs->combFilterGain;
|
||||
subAttrs.surroundEffectIndex = attrs->surroundEffectIndex;
|
||||
bookOffset = noteSampleState->bitField1.bookOffset;
|
||||
} else {
|
||||
SequenceLayer* layer = playbackState->parentLayer;
|
||||
SequenceChannel* channel = playbackState->parentLayer->channel;
|
||||
@@ -276,34 +278,35 @@ void AudioPlayback_ProcessNotes(void) {
|
||||
subAttrs.velocity = layer->noteVelocity;
|
||||
subAttrs.pan = layer->notePan;
|
||||
|
||||
if (layer->unk_08 == 0x80) {
|
||||
subAttrs.unk_3 = channel->unk_10;
|
||||
if (layer->surroundEffectIndex == 0x80) {
|
||||
subAttrs.surroundEffectIndex = channel->surroundEffectIndex;
|
||||
} else {
|
||||
subAttrs.unk_3 = layer->unk_08;
|
||||
subAttrs.surroundEffectIndex = layer->surroundEffectIndex;
|
||||
}
|
||||
|
||||
if (layer->stereo.s.bit2 == 0) {
|
||||
subAttrs.stereo = channel->stereo;
|
||||
if (layer->stereoData.type == 0) {
|
||||
subAttrs.stereoData = channel->stereoData;
|
||||
} else {
|
||||
subAttrs.stereo = layer->stereo;
|
||||
subAttrs.stereoData = layer->stereoData;
|
||||
}
|
||||
|
||||
if (layer->unk_0A.s.bit_2 == 1) {
|
||||
subAttrs.reverbVol = channel->reverb;
|
||||
subAttrs.targetReverbVol = channel->targetReverbVol;
|
||||
} else {
|
||||
subAttrs.reverbVol = layer->unk_09;
|
||||
subAttrs.targetReverbVol = layer->targetReverbVol;
|
||||
}
|
||||
|
||||
if (layer->unk_0A.s.bit_9 == 1) {
|
||||
subAttrs.gain = channel->gain;
|
||||
} else {
|
||||
subAttrs.gain = 0;
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
}
|
||||
|
||||
subAttrs.filter = channel->filter;
|
||||
subAttrs.unk_14 = channel->unk_0F;
|
||||
subAttrs.unk_16 = channel->unk_20;
|
||||
subAttrs.combFilterSize = channel->combFilterSize;
|
||||
subAttrs.combFilterGain = channel->combFilterGain;
|
||||
bookOffset = channel->bookOffset & 0x7;
|
||||
|
||||
if (channel->seqPlayer->muted && (channel->muteFlags & MUTE_FLAGS_3)) {
|
||||
@@ -315,8 +318,8 @@ void AudioPlayback_ProcessNotes(void) {
|
||||
subAttrs.frequency *= playbackState->vibratoFreqScale * playbackState->portamentoFreqScale;
|
||||
subAttrs.frequency *= gAudioContext.audioBufferParameters.resampleRate;
|
||||
subAttrs.velocity *= scale;
|
||||
AudioPlayback_InitNoteSub(note, noteSubEu2, &subAttrs);
|
||||
noteSubEu->bitField1.bookOffset = bookOffset;
|
||||
AudioPlayback_InitSampleState(note, sampleState, &subAttrs);
|
||||
noteSampleState->bitField1.bookOffset = bookOffset;
|
||||
skip:;
|
||||
}
|
||||
}
|
||||
@@ -500,15 +503,15 @@ void AudioPlayback_SeqLayerDecayRelease(SequenceLayer* layer, s32 target) {
|
||||
channel = layer->channel;
|
||||
|
||||
if (layer->unk_0A.s.bit_2 == 1) {
|
||||
attrs->reverb = channel->reverb;
|
||||
attrs->targetReverbVol = channel->targetReverbVol;
|
||||
} else {
|
||||
attrs->reverb = layer->unk_09;
|
||||
attrs->targetReverbVol = layer->targetReverbVol;
|
||||
}
|
||||
|
||||
if (layer->unk_08 == 0x80) {
|
||||
attrs->unk_3 = channel->unk_10;
|
||||
if (layer->surroundEffectIndex == 0x80) {
|
||||
attrs->surroundEffectIndex = channel->surroundEffectIndex;
|
||||
} else {
|
||||
attrs->unk_3 = layer->unk_08;
|
||||
attrs->surroundEffectIndex = layer->surroundEffectIndex;
|
||||
}
|
||||
|
||||
if (layer->unk_0A.s.bit_9 == 1) {
|
||||
@@ -526,20 +529,20 @@ void AudioPlayback_SeqLayerDecayRelease(SequenceLayer* layer, s32 target) {
|
||||
attrs->filter = attrs->filterBuf;
|
||||
}
|
||||
|
||||
attrs->unk_6 = channel->unk_20;
|
||||
attrs->unk_4 = channel->unk_0F;
|
||||
attrs->combFilterGain = channel->combFilterGain;
|
||||
attrs->combFilterSize = channel->combFilterSize;
|
||||
if (channel->seqPlayer->muted && (channel->muteFlags & MUTE_FLAGS_3)) {
|
||||
note->noteSubEu.bitField0.finished = true;
|
||||
note->sampleState.bitField0.finished = true;
|
||||
}
|
||||
|
||||
if (layer->stereo.asByte == 0) {
|
||||
attrs->stereo = channel->stereo;
|
||||
if (layer->stereoData.asByte == 0) {
|
||||
attrs->stereoData = channel->stereoData;
|
||||
} else {
|
||||
attrs->stereo = layer->stereo;
|
||||
attrs->stereoData = layer->stereoData;
|
||||
}
|
||||
note->playbackState.priority = channel->someOtherPriority;
|
||||
} else {
|
||||
attrs->stereo = layer->stereo;
|
||||
attrs->stereoData = layer->stereoData;
|
||||
note->playbackState.priority = 1;
|
||||
}
|
||||
|
||||
@@ -620,7 +623,7 @@ s32 AudioPlayback_BuildSyntheticWave(Note* note, SequenceLayer* layer, s32 waveI
|
||||
|
||||
// Save the pointer to the synthethic wave
|
||||
// waveId index starts at 128, there are WAVE_SAMPLE_COUNT samples to read from
|
||||
note->noteSubEu.waveSampleAddr = &gWaveSamples[waveId - 128][harmonicIndex * WAVE_SAMPLE_COUNT];
|
||||
note->sampleState.waveSampleAddr = &gWaveSamples[waveId - 128][harmonicIndex * WAVE_SAMPLE_COUNT];
|
||||
|
||||
return harmonicIndex;
|
||||
}
|
||||
@@ -638,7 +641,7 @@ void AudioPlayback_InitSyntheticWave(Note* note, SequenceLayer* layer) {
|
||||
curHarmonicIndex = AudioPlayback_BuildSyntheticWave(note, layer, waveId);
|
||||
|
||||
if (curHarmonicIndex != prevHarmonicIndex) {
|
||||
note->noteSubEu.harmonicIndexCurAndPrev = (curHarmonicIndex << 2) + prevHarmonicIndex;
|
||||
note->sampleState.harmonicIndexCurAndPrev = (curHarmonicIndex << 2) + prevHarmonicIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -808,7 +811,7 @@ void AudioPlayback_NoteInitForLayer(Note* note, SequenceLayer* layer) {
|
||||
s16 instId;
|
||||
SequenceChannel* channel = layer->channel;
|
||||
NotePlaybackState* playbackState = ¬e->playbackState;
|
||||
NoteSubEu* noteSubEu = ¬e->noteSubEu;
|
||||
NoteSampleState* noteSampleState = ¬e->sampleState;
|
||||
|
||||
playbackState->prevParentLayer = NO_LAYER;
|
||||
playbackState->parentLayer = layer;
|
||||
@@ -825,28 +828,28 @@ void AudioPlayback_NoteInitForLayer(Note* note, SequenceLayer* layer) {
|
||||
if (instId == 0xFF) {
|
||||
instId = channel->instOrWave;
|
||||
}
|
||||
noteSubEu->tunedSample = layer->tunedSample;
|
||||
noteSampleState->tunedSample = layer->tunedSample;
|
||||
|
||||
if (instId >= 0x80 && instId < 0xC0) {
|
||||
noteSubEu->bitField1.isSyntheticWave = true;
|
||||
noteSampleState->bitField1.isSyntheticWave = true;
|
||||
} else {
|
||||
noteSubEu->bitField1.isSyntheticWave = false;
|
||||
noteSampleState->bitField1.isSyntheticWave = false;
|
||||
}
|
||||
|
||||
if (noteSubEu->bitField1.isSyntheticWave) {
|
||||
if (noteSampleState->bitField1.isSyntheticWave) {
|
||||
AudioPlayback_BuildSyntheticWave(note, layer, instId);
|
||||
} else if (channel->startSamplePos == 1) {
|
||||
playbackState->startSamplePos = noteSubEu->tunedSample->sample->loop->start;
|
||||
playbackState->startSamplePos = noteSampleState->tunedSample->sample->loop->start;
|
||||
} else {
|
||||
playbackState->startSamplePos = channel->startSamplePos;
|
||||
if (playbackState->startSamplePos >= noteSubEu->tunedSample->sample->loop->end) {
|
||||
if (playbackState->startSamplePos >= noteSampleState->tunedSample->sample->loop->loopEnd) {
|
||||
playbackState->startSamplePos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
playbackState->fontId = channel->fontId;
|
||||
playbackState->stereoHeadsetEffects = channel->stereoHeadsetEffects;
|
||||
noteSubEu->bitField1.reverbIndex = channel->reverbIndex & 3;
|
||||
noteSampleState->bitField1.reverbIndex = channel->reverbIndex & 3;
|
||||
}
|
||||
|
||||
void func_801963E8(Note* note, SequenceLayer* layer) {
|
||||
@@ -987,7 +990,7 @@ void AudioPlayback_NoteInitAll(void) {
|
||||
|
||||
for (i = 0; i < gAudioContext.numNotes; i++) {
|
||||
note = &gAudioContext.notes[i];
|
||||
note->noteSubEu = gZeroNoteSub;
|
||||
note->sampleState = gZeroedSampleState;
|
||||
note->playbackState.priority = 0;
|
||||
note->playbackState.status = PLAYBACK_STATUS_0;
|
||||
note->playbackState.parentLayer = NO_LAYER;
|
||||
@@ -1002,7 +1005,8 @@ void AudioPlayback_NoteInitAll(void) {
|
||||
note->playbackState.portamento.speed = 0;
|
||||
note->playbackState.stereoHeadsetEffects = false;
|
||||
note->playbackState.startSamplePos = 0;
|
||||
note->synthesisState.synthesisBuffers = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, 0x2E0);
|
||||
note->playbackState.attributes.filterBuf = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, 0x10);
|
||||
note->synthesisState.synthesisBuffers =
|
||||
AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, sizeof(NoteSynthesisBuffers));
|
||||
note->playbackState.attributes.filterBuf = AudioHeap_AllocDmaMemory(&gAudioContext.miscPool, FILTER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,17 +282,17 @@ void AudioSeq_InitSequenceChannel(SequenceChannel* channel) {
|
||||
channel->transposition = 0;
|
||||
channel->largeNotes = false;
|
||||
channel->bookOffset = 0;
|
||||
channel->stereo.asByte = 0;
|
||||
channel->stereoData.asByte = 0;
|
||||
channel->changes.asByte = 0xFF;
|
||||
channel->scriptState.depth = 0;
|
||||
channel->newPan = 0x40;
|
||||
channel->panChannelWeight = 0x80;
|
||||
channel->unk_10 = 0xFF;
|
||||
channel->surroundEffectIndex = 0xFF;
|
||||
channel->velocityRandomVariance = 0;
|
||||
channel->gateTimeRandomVariance = 0;
|
||||
channel->noteUnused = NULL;
|
||||
channel->reverbIndex = 0;
|
||||
channel->reverb = 0;
|
||||
channel->targetReverbVol = 0;
|
||||
channel->gain = 0;
|
||||
channel->notePriority = 3;
|
||||
channel->someOtherPriority = 1;
|
||||
@@ -308,8 +308,8 @@ void AudioSeq_InitSequenceChannel(SequenceChannel* channel) {
|
||||
channel->vibrato.vibratoExtentChangeDelay = 0;
|
||||
channel->vibrato.vibratoDelay = 0;
|
||||
channel->filter = NULL;
|
||||
channel->unk_20 = 0;
|
||||
channel->unk_0F = 0;
|
||||
channel->combFilterGain = 0;
|
||||
channel->combFilterSize = 0;
|
||||
channel->volume = 1.0f;
|
||||
channel->volumeScale = 1.0f;
|
||||
channel->freqScale = 1.0f;
|
||||
@@ -345,7 +345,7 @@ s32 AudioSeq_SeqChannelSetLayer(SequenceChannel* channel, s32 layerIndex) {
|
||||
layer->channel = channel;
|
||||
layer->adsr = channel->adsr;
|
||||
layer->adsr.decayIndex = 0;
|
||||
layer->unk_09 = channel->reverb;
|
||||
layer->targetReverbVol = channel->targetReverbVol;
|
||||
layer->enabled = true;
|
||||
layer->finished = false;
|
||||
layer->stopSomething = false;
|
||||
@@ -355,8 +355,8 @@ s32 AudioSeq_SeqChannelSetLayer(SequenceChannel* channel, s32 layerIndex) {
|
||||
layer->bit1 = false;
|
||||
layer->notePropertiesNeedInit = false;
|
||||
layer->gateTime = 0x80;
|
||||
layer->unk_08 = 0x80;
|
||||
layer->stereo.asByte = 0;
|
||||
layer->surroundEffectIndex = 0x80;
|
||||
layer->stereoData.asByte = 0;
|
||||
layer->portamento.mode = PORTAMENTO_MODE_OFF;
|
||||
layer->scriptState.depth = 0;
|
||||
layer->pan = 0x40;
|
||||
@@ -782,7 +782,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
|
||||
break;
|
||||
|
||||
case 0xCD: // layer: stereo effects
|
||||
layer->stereo.asByte = AudioSeq_ScriptReadU8(state);
|
||||
layer->stereoData.asByte = AudioSeq_ScriptReadU8(state);
|
||||
break;
|
||||
|
||||
case 0xCE: // layer: bend pitch
|
||||
@@ -796,7 +796,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
|
||||
break;
|
||||
|
||||
case 0xF1: // layer:
|
||||
layer->unk_08 = AudioSeq_ScriptReadU8(state);
|
||||
layer->surroundEffectIndex = AudioSeq_ScriptReadU8(state);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -991,13 +991,14 @@ s32 AudioSeq_SeqLayerProcessScriptStep4(SequenceLayer* layer, s32 cmd) {
|
||||
|
||||
if (layer->delay == 0) {
|
||||
if (layer->tunedSample != NULL) {
|
||||
time = layer->tunedSample->sample->loop->end;
|
||||
time = layer->tunedSample->sample->loop->loopEnd;
|
||||
} else {
|
||||
time = 0.0f;
|
||||
}
|
||||
time *= seqPlayer->tempo;
|
||||
time *= gAudioContext.unk_2870;
|
||||
time /= layer->freqScale;
|
||||
//! FAKE:
|
||||
if (1) {}
|
||||
if (time > 0x7FFE) {
|
||||
time = 0x7FFE;
|
||||
@@ -1416,9 +1417,9 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
channel->vibrato.vibratoDelay = cmd * 16;
|
||||
break;
|
||||
|
||||
case 0xD4: // channel: set reverb
|
||||
case 0xD4: // channel: set reverb volume
|
||||
cmd = (u8)cmdArgs[0];
|
||||
channel->reverb = cmd;
|
||||
channel->targetReverbVol = cmd;
|
||||
break;
|
||||
|
||||
case 0xC6: // channel: set soundFont
|
||||
@@ -1491,7 +1492,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
} else {
|
||||
channel->stereoHeadsetEffects = false;
|
||||
}
|
||||
channel->stereo.asByte = cmd & 0x7F;
|
||||
channel->stereoData.asByte = cmd & 0x7F;
|
||||
break;
|
||||
|
||||
case 0xD1: // channel: set note allocation policy
|
||||
@@ -1537,7 +1538,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
data += 4;
|
||||
channel->newPan = data[-3];
|
||||
channel->panChannelWeight = data[-2];
|
||||
channel->reverb = data[-1];
|
||||
channel->targetReverbVol = data[-1];
|
||||
channel->reverbIndex = data[0];
|
||||
//! @bug: Not marking reverb state as changed
|
||||
channel->changes.s.pan = true;
|
||||
@@ -1551,7 +1552,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
channel->transposition = (s8)AudioSeq_ScriptReadU8(scriptState);
|
||||
channel->newPan = AudioSeq_ScriptReadU8(scriptState);
|
||||
channel->panChannelWeight = AudioSeq_ScriptReadU8(scriptState);
|
||||
channel->reverb = AudioSeq_ScriptReadU8(scriptState);
|
||||
channel->targetReverbVol = AudioSeq_ScriptReadU8(scriptState);
|
||||
channel->reverbIndex = AudioSeq_ScriptReadU8(scriptState);
|
||||
//! @bug: Not marking reverb state as changed
|
||||
channel->changes.s.pan = true;
|
||||
@@ -1569,8 +1570,8 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
channel->adsr.sustain = 0;
|
||||
channel->velocityRandomVariance = 0;
|
||||
channel->gateTimeRandomVariance = 0;
|
||||
channel->unk_0F = 0;
|
||||
channel->unk_20 = 0;
|
||||
channel->combFilterSize = 0;
|
||||
channel->combFilterGain = 0;
|
||||
channel->bookOffset = 0;
|
||||
channel->startSamplePos = 0;
|
||||
channel->unk_E0 = 0;
|
||||
@@ -1651,8 +1652,8 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
break;
|
||||
|
||||
case 0xBB: // channel:
|
||||
channel->unk_0F = cmdArgs[0];
|
||||
channel->unk_20 = cmdArgs[1];
|
||||
channel->combFilterSize = cmdArgs[0];
|
||||
channel->combFilterGain = cmdArgs[1];
|
||||
break;
|
||||
|
||||
case 0xBC: // channel: add large
|
||||
@@ -1667,8 +1668,8 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
if (cmdArgs[0] < 5) {
|
||||
if (1) {}
|
||||
if (gAudioContext.unk_29A8[cmdArgs[0]] != NULL) {
|
||||
D_80208E6C = gAudioContext.unk_29A8[cmdArgs[0]];
|
||||
scriptState->value = D_80208E6C(scriptState->value, channel);
|
||||
gCustomAudioSeqFunction = gAudioContext.unk_29A8[cmdArgs[0]];
|
||||
scriptState->value = gCustomAudioSeqFunction(scriptState->value, channel);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1693,7 +1694,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
break;
|
||||
|
||||
case 0xA4: // channel:
|
||||
channel->unk_10 = cmdArgs[0];
|
||||
channel->surroundEffectIndex = cmdArgs[0];
|
||||
break;
|
||||
|
||||
case 0xA5: // channel:
|
||||
@@ -2197,7 +2198,7 @@ void AudioSeq_ProcessSequences(s32 arg0) {
|
||||
SequencePlayer* seqPlayer;
|
||||
u32 i;
|
||||
|
||||
gAudioContext.noteSubEuOffset =
|
||||
gAudioContext.sampleStateOffset =
|
||||
(gAudioContext.audioBufferParameters.updatesPerFrame - arg0 - 1) * gAudioContext.numNotes;
|
||||
|
||||
for (i = 0; i < (u32)gAudioContext.audioBufferParameters.numSequencePlayers; i++) {
|
||||
|
||||
+1684
-123
File diff suppressed because it is too large
Load Diff
@@ -4078,7 +4078,7 @@ void AudioSfx_SetProperties(u8 bankId, u8 entryIndex, u8 channelIndex) {
|
||||
}
|
||||
|
||||
u32 AudioSfx_SetFreqAndStereoBits(u8 seqScriptValIn, SequenceChannel* channel) {
|
||||
channel->stereo.asByte = sSfxChannelState[seqScriptValIn].stereoBits;
|
||||
channel->stereoData.asByte = sSfxChannelState[seqScriptValIn].stereoBits;
|
||||
channel->freqScale = sSfxChannelState[seqScriptValIn].freqScale;
|
||||
channel->changes.s.freqScale = true;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* Description: Keaton grass
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_kusa2.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
@@ -597,6 +597,7 @@
|
||||
0x801D9090 : "audio_sound_params",
|
||||
0x801DB470 : "code_801A5BD0",
|
||||
0x801DB4C0 : "code_801A7B10",
|
||||
0x801DB4E0 : "audio_init_params",
|
||||
|
||||
# .rodata section
|
||||
0x801DBDF0 : "z_en_item00",
|
||||
|
||||
+69
-69
@@ -3478,74 +3478,74 @@
|
||||
0x801872FC:("osFlashWriteBuffer",),
|
||||
0x801873BC:("osFlashWriteArray",),
|
||||
0x8018752C:("osFlashReadArray",),
|
||||
0x801877D0:("func_801877D0",),
|
||||
0x80187B64:("func_80187B64",),
|
||||
0x80187BEC:("func_80187BEC",),
|
||||
0x80187DE8:("func_80187DE8",),
|
||||
0x80187E58:("func_80187E58",),
|
||||
0x80187F00:("func_80187F00",),
|
||||
0x80187FA8:("func_80187FA8",),
|
||||
0x80187FB0:("func_80187FB0",),
|
||||
0x80187FD0:("func_80187FD0",),
|
||||
0x80187FD8:("func_80187FD8",),
|
||||
0x80187FE0:("func_80187FE0",),
|
||||
0x80187FE8:("func_80187FE8",),
|
||||
0x8018801C:("func_8018801C",),
|
||||
0x80188024:("func_80188024",),
|
||||
0x8018802C:("func_8018802C",),
|
||||
0x80188034:("func_80188034",),
|
||||
0x80188068:("func_80188068",),
|
||||
0x80188070:("func_80188070",),
|
||||
0x80188078:("func_80188078",),
|
||||
0x801880A4:("func_801880A4",),
|
||||
0x801880AC:("func_801880AC",),
|
||||
0x801880B4:("func_801880B4",),
|
||||
0x801880BC:("func_801880BC",),
|
||||
0x801880C4:("func_801880C4",),
|
||||
0x801880E8:("func_801880E8",),
|
||||
0x8018811C:("func_8018811C",),
|
||||
0x80188124:("func_80188124",),
|
||||
0x8018814C:("func_8018814C",),
|
||||
0x80188174:("func_80188174",),
|
||||
0x80188190:("func_80188190",),
|
||||
0x80188198:("func_80188198",),
|
||||
0x801881A0:("func_801881A0",),
|
||||
0x801881A8:("func_801881A8",),
|
||||
0x801881C4:("func_801881C4",),
|
||||
0x801881F8:("func_801881F8",),
|
||||
0x80188224:("func_80188224",),
|
||||
0x8018822C:("func_8018822C",),
|
||||
0x80188234:("func_80188234",),
|
||||
0x8018823C:("func_8018823C",),
|
||||
0x80188244:("func_80188244",),
|
||||
0x8018824C:("func_8018824C",),
|
||||
0x80188254:("func_80188254",),
|
||||
0x8018825C:("func_8018825C",),
|
||||
0x80188264:("func_80188264",),
|
||||
0x80188288:("func_80188288",),
|
||||
0x801882A0:("func_801882A0",),
|
||||
0x80188304:("func_80188304",),
|
||||
0x801884A0:("func_801884A0",),
|
||||
0x80188698:("func_80188698",),
|
||||
0x8018883C:("func_8018883C",),
|
||||
0x801888E4:("func_801888E4",),
|
||||
0x801889A4:("func_801889A4",),
|
||||
0x80188A50:("func_80188A50",),
|
||||
0x80188AFC:("func_80188AFC",),
|
||||
0x80188C48:("func_80188C48",),
|
||||
0x80188CB4:("func_80188CB4",),
|
||||
0x80188D20:("func_80188D20",),
|
||||
0x80188D28:("func_80188D28",),
|
||||
0x80188D68:("func_80188D68",),
|
||||
0x80188DDC:("func_80188DDC",),
|
||||
0x80188FBC:("func_80188FBC",),
|
||||
0x80189064:("func_80189064",),
|
||||
0x80189620:("func_80189620",),
|
||||
0x8018A4B4:("func_8018A4B4",),
|
||||
0x8018A768:("func_8018A768",),
|
||||
0x8018A808:("func_8018A808",),
|
||||
0x8018ACC4:("func_8018ACC4",),
|
||||
0x8018AE34:("func_8018AE34",),
|
||||
0x801877D0:("AudioSynth_AddReverbBufferEntry",),
|
||||
0x80187B64:("AudioSynth_SyncSampleStates",),
|
||||
0x80187BEC:("AudioSynth_Update",),
|
||||
0x80187DE8:("AudioSynth_DisableSampleStates",),
|
||||
0x80187E58:("AudioSynth_LoadMixedReverbSamples",),
|
||||
0x80187F00:("AudioSynth_SaveMixedReverbSamples",),
|
||||
0x80187FA8:("AudioSynth_Noop1",),
|
||||
0x80187FB0:("AudioSynth_ClearBuffer",),
|
||||
0x80187FD0:("AudioSynth_Noop2",),
|
||||
0x80187FD8:("AudioSynth_Noop3",),
|
||||
0x80187FE0:("AudioSynth_Noop4",),
|
||||
0x80187FE8:("AudioSynth_Mix",),
|
||||
0x8018801C:("AudioSynth_Noop5",),
|
||||
0x80188024:("AudioSynth_Noop6",),
|
||||
0x8018802C:("AudioSynth_Noop7",),
|
||||
0x80188034:("AudioSynth_SetBuffer",),
|
||||
0x80188068:("AudioSynth_Noop8",),
|
||||
0x80188070:("AudioSynth_Noop9",),
|
||||
0x80188078:("AudioSynth_DMemMove",),
|
||||
0x801880A4:("AudioSynth_Noop10",),
|
||||
0x801880AC:("AudioSynth_Noop11",),
|
||||
0x801880B4:("AudioSynth_Noop12",),
|
||||
0x801880BC:("AudioSynth_Noop13",),
|
||||
0x801880C4:("AudioSynth_InterL",),
|
||||
0x801880E8:("AudioSynth_EnvSetup1",),
|
||||
0x8018811C:("AudioSynth_Noop14",),
|
||||
0x80188124:("AudioSynth_LoadBuffer",),
|
||||
0x8018814C:("AudioSynth_SaveBuffer",),
|
||||
0x80188174:("AudioSynth_EnvSetup2",),
|
||||
0x80188190:("AudioSynth_Noop15",),
|
||||
0x80188198:("AudioSynth_Noop16",),
|
||||
0x801881A0:("AudioSynth_Noop17",),
|
||||
0x801881A8:("AudioSynth_S8Dec",),
|
||||
0x801881C4:("AudioSynth_HiLoGain",),
|
||||
0x801881F8:("AudioSynth_UnkCmd19",),
|
||||
0x80188224:("AudioSynth_Noop18",),
|
||||
0x8018822C:("AudioSynth_Noop19",),
|
||||
0x80188234:("AudioSynth_Noop20",),
|
||||
0x8018823C:("AudioSynth_Noop21",),
|
||||
0x80188244:("AudioSynth_Noop22",),
|
||||
0x8018824C:("AudioSynth_Noop23",),
|
||||
0x80188254:("AudioSynth_Noop24",),
|
||||
0x8018825C:("AudioSynth_Noop25",),
|
||||
0x80188264:("AudioSynth_LoadFilterBuffer",),
|
||||
0x80188288:("AudioSynth_LoadFilterSize",),
|
||||
0x801882A0:("AudioSynth_LeakReverb",),
|
||||
0x80188304:("AudioSynth_LoadDownsampledReverbSamples",),
|
||||
0x801884A0:("AudioSynth_SaveResampledReverbSamples",),
|
||||
0x80188698:("AudioSynth_LoadResampledReverbSamples",),
|
||||
0x8018883C:("AudioSynth_FilterReverb",),
|
||||
0x801888E4:("AudioSynth_MixOtherReverbIndex",),
|
||||
0x801889A4:("AudioSynth_LoadDefaultReverbSamples",),
|
||||
0x80188A50:("AudioSynth_LoadSubReverbSamples",),
|
||||
0x80188AFC:("AudioSynth_SaveResampledReverbSamplesImpl",),
|
||||
0x80188C48:("AudioSynth_LoadReverbSamplesImpl",),
|
||||
0x80188CB4:("AudioSynth_SaveReverbSamplesImpl",),
|
||||
0x80188D20:("AudioSynth_Noop26",),
|
||||
0x80188D28:("AudioSynth_LoadSubReverbSamplesWithoutDownsample",),
|
||||
0x80188D68:("AudioSynth_LoadReverbSamples",),
|
||||
0x80188DDC:("AudioSynth_SaveReverbSamples",),
|
||||
0x80188FBC:("AudioSynth_SaveSubReverbSamples",),
|
||||
0x80189064:("AudioSynth_ProcessSamples",),
|
||||
0x80189620:("AudioSynth_ProcessSample",),
|
||||
0x8018A4B4:("AudioSynth_ApplySurroundEffect",),
|
||||
0x8018A768:("AudioSynth_FinalResample",),
|
||||
0x8018A808:("AudioSynth_ProcessEnvelope",),
|
||||
0x8018ACC4:("AudioSynth_LoadWaveSamples",),
|
||||
0x8018AE34:("AudioSynth_ApplyHaasEffect",),
|
||||
0x8018B0F0:("AudioHeap_CalculateAdsrDecay",),
|
||||
0x8018B10C:("AudioHeap_InitAdsrDecayTable",),
|
||||
0x8018B250:("AudioHeap_ResetLoadStatus",),
|
||||
@@ -3726,7 +3726,7 @@
|
||||
0x80194804:("func_80194804",),
|
||||
0x80194840:("func_80194840",),
|
||||
0x801948B0:("func_801948B0",),
|
||||
0x80194930:("AudioPlayback_InitNoteSub",),
|
||||
0x80194930:("AudioPlayback_InitSampleState",),
|
||||
0x80194DB0:("AudioPlayback_NoteSetResamplingRate",),
|
||||
0x80194E60:("AudioPlayback_NoteInit",),
|
||||
0x80194F20:("AudioPlayback_NoteDisable",),
|
||||
|
||||
@@ -2220,11 +2220,11 @@
|
||||
0x801D57B4:("gDefaultShortNoteVelocityTable","UNK_TYPE1","",0x1),
|
||||
0x801D57C4:("gDefaultShortNoteGateTimeTable","UNK_TYPE1","",0x1),
|
||||
0x801D57D4:("gDefaultEnvelope","UNK_TYPE1","",0x1),
|
||||
0x801D57E4:("gZeroNoteSub","UNK_TYPE4","",0x4),
|
||||
0x801D5804:("gDefaultNoteSub","UNK_TYPE4","",0x4),
|
||||
0x801D5824:("gHeadsetPanQuantization","u16","[64]",0x80),
|
||||
0x801D57E4:("gZeroedSampleState","UNK_TYPE4","",0x4),
|
||||
0x801D5804:("gDefaultSampleState","UNK_TYPE4","",0x4),
|
||||
0x801D5824:("gHaasEffectDelaySize","u16","[64]",0x80),
|
||||
0x801D58A4:("D_801D58A4","s32","",0x4),
|
||||
0x801D58A8:("D_801D58A8","s16","[64]",0x80),
|
||||
0x801D58A8:("gInvalidAdpcmCodeBook","s16","[64]",0x80),
|
||||
0x801D5928:("gHeadsetPanVolume","f32","[128]",0x200),
|
||||
0x801D5B28:("gStereoPanVolume","f32","[128]",0x200),
|
||||
0x801D5D28:("gDefaultPanVolume","f32","[128]",0x200),
|
||||
@@ -2411,7 +2411,7 @@
|
||||
0x801DB870:("D_801DB870","UNK_TYPE1","",0x1),
|
||||
0x801DB8B8:("D_801DB8B8","UNK_TYPE1","",0x1),
|
||||
0x801DB900:("D_801DB900","UNK_TYPE1","",0x1),
|
||||
0x801DB930:("D_801DB930","UNK_PTR","",0x4),
|
||||
0x801DB930:("gReverbSettingsTable","UNK_PTR","",0x4),
|
||||
0x801DB958:("gAudioSpecs","AudioSpec","[21]",0x498),
|
||||
0x801DBDF0:("D_801DBDF0","f32","",0x4),
|
||||
0x801DBDF4:("jtbl_801DBDF4","UNK_PTR","",0x4),
|
||||
@@ -4354,10 +4354,10 @@
|
||||
0x80200BCE:("D_80200BCE","UNK_TYPE1","",0x1),
|
||||
0x80200BD0:("D_80200BD0","UNK_TYPE1","",0x1),
|
||||
0x80200C70:("gAudioContext","AudioContext","",0x81F8),
|
||||
0x80208E68:("D_80208E68","UNK_TYPE4","",0x4),
|
||||
0x80208E6C:("D_80208E6C","UNK_TYPE4","",0x4),
|
||||
0x80208E70:("D_80208E70","UNK_TYPE4","",0x4),
|
||||
0x80208E74:("D_80208E74","UNK_TYPE4","",0x4),
|
||||
0x80208E68:("gCustomAudioUpdateFunction","UNK_TYPE4","",0x4),
|
||||
0x80208E6C:("gCustomAudioSeqFunction","UNK_TYPE4","",0x4),
|
||||
0x80208E70:("gCustomAudioReverbFunction","UNK_TYPE4","",0x4),
|
||||
0x80208E74:("gCustomAudioSynthFunction","UNK_TYPE4","",0x4),
|
||||
0x80208E90:("sJpegBitStreamPtr","UNK_TYPE1","",0x1),
|
||||
0x80208E94:("sJpegBitStreamByteIdx","UNK_TYPE1","",0x1),
|
||||
0x80208E98:("sJpegBitStreamBitIdx","UNK_TYPE1","",0x1),
|
||||
|
||||
@@ -2996,74 +2996,74 @@ asm/non_matchings/code/osFlash/func_80187284.s,func_80187284,0x80187284,0x1E
|
||||
asm/non_matchings/code/osFlash/func_801872FC.s,func_801872FC,0x801872FC,0x30
|
||||
asm/non_matchings/code/osFlash/func_801873BC.s,func_801873BC,0x801873BC,0x5C
|
||||
asm/non_matchings/code/osFlash/func_8018752C.s,func_8018752C,0x8018752C,0x9D
|
||||
asm/non_matchings/code/audio_synthesis/func_801877D0.s,func_801877D0,0x801877D0,0xE5
|
||||
asm/non_matchings/code/audio_synthesis/func_80187B64.s,func_80187B64,0x80187B64,0x22
|
||||
asm/non_matchings/code/audio_synthesis/func_80187BEC.s,func_80187BEC,0x80187BEC,0x7F
|
||||
asm/non_matchings/code/audio_synthesis/func_80187DE8.s,func_80187DE8,0x80187DE8,0x1C
|
||||
asm/non_matchings/code/audio_synthesis/func_80187E58.s,func_80187E58,0x80187E58,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/func_80187F00.s,func_80187F00,0x80187F00,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/func_80187FA8.s,func_80187FA8,0x80187FA8,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80187FB0.s,func_80187FB0,0x80187FB0,0x8
|
||||
asm/non_matchings/code/audio_synthesis/func_80187FD0.s,func_80187FD0,0x80187FD0,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80187FD8.s,func_80187FD8,0x80187FD8,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80187FE0.s,func_80187FE0,0x80187FE0,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80187FE8.s,func_80187FE8,0x80187FE8,0xD
|
||||
asm/non_matchings/code/audio_synthesis/func_8018801C.s,func_8018801C,0x8018801C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188024.s,func_80188024,0x80188024,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_8018802C.s,func_8018802C,0x8018802C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188034.s,func_80188034,0x80188034,0xD
|
||||
asm/non_matchings/code/audio_synthesis/func_80188068.s,func_80188068,0x80188068,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188070.s,func_80188070,0x80188070,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188078.s,func_80188078,0x80188078,0xB
|
||||
asm/non_matchings/code/audio_synthesis/func_801880A4.s,func_801880A4,0x801880A4,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_801880AC.s,func_801880AC,0x801880AC,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_801880B4.s,func_801880B4,0x801880B4,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_801880BC.s,func_801880BC,0x801880BC,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_801880C4.s,func_801880C4,0x801880C4,0x9
|
||||
asm/non_matchings/code/audio_synthesis/func_801880E8.s,func_801880E8,0x801880E8,0xD
|
||||
asm/non_matchings/code/audio_synthesis/func_8018811C.s,func_8018811C,0x8018811C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188124.s,func_80188124,0x80188124,0xA
|
||||
asm/non_matchings/code/audio_synthesis/func_8018814C.s,func_8018814C,0x8018814C,0xA
|
||||
asm/non_matchings/code/audio_synthesis/func_80188174.s,func_80188174,0x80188174,0x7
|
||||
asm/non_matchings/code/audio_synthesis/func_80188190.s,func_80188190,0x80188190,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188198.s,func_80188198,0x80188198,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_801881A0.s,func_801881A0,0x801881A0,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_801881A8.s,func_801881A8,0x801881A8,0x7
|
||||
asm/non_matchings/code/audio_synthesis/func_801881C4.s,func_801881C4,0x801881C4,0xD
|
||||
asm/non_matchings/code/audio_synthesis/func_801881F8.s,func_801881F8,0x801881F8,0xB
|
||||
asm/non_matchings/code/audio_synthesis/func_80188224.s,func_80188224,0x80188224,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_8018822C.s,func_8018822C,0x8018822C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188234.s,func_80188234,0x80188234,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_8018823C.s,func_8018823C,0x8018823C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188244.s,func_80188244,0x80188244,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_8018824C.s,func_8018824C,0x8018824C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188254.s,func_80188254,0x80188254,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_8018825C.s,func_8018825C,0x8018825C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188264.s,func_80188264,0x80188264,0x9
|
||||
asm/non_matchings/code/audio_synthesis/func_80188288.s,func_80188288,0x80188288,0x6
|
||||
asm/non_matchings/code/audio_synthesis/func_801882A0.s,func_801882A0,0x801882A0,0x19
|
||||
asm/non_matchings/code/audio_synthesis/func_80188304.s,func_80188304,0x80188304,0x67
|
||||
asm/non_matchings/code/audio_synthesis/func_801884A0.s,func_801884A0,0x801884A0,0x7E
|
||||
asm/non_matchings/code/audio_synthesis/func_80188698.s,func_80188698,0x80188698,0x69
|
||||
asm/non_matchings/code/audio_synthesis/func_8018883C.s,func_8018883C,0x8018883C,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/func_801888E4.s,func_801888E4,0x801888E4,0x30
|
||||
asm/non_matchings/code/audio_synthesis/func_801889A4.s,func_801889A4,0x801889A4,0x2B
|
||||
asm/non_matchings/code/audio_synthesis/func_80188A50.s,func_80188A50,0x80188A50,0x2B
|
||||
asm/non_matchings/code/audio_synthesis/func_80188AFC.s,func_80188AFC,0x80188AFC,0x53
|
||||
asm/non_matchings/code/audio_synthesis/func_80188C48.s,func_80188C48,0x80188C48,0x1B
|
||||
asm/non_matchings/code/audio_synthesis/func_80188CB4.s,func_80188CB4,0x80188CB4,0x1B
|
||||
asm/non_matchings/code/audio_synthesis/func_80188D20.s,func_80188D20,0x80188D20,0x2
|
||||
asm/non_matchings/code/audio_synthesis/func_80188D28.s,func_80188D28,0x80188D28,0x10
|
||||
asm/non_matchings/code/audio_synthesis/func_80188D68.s,func_80188D68,0x80188D68,0x1D
|
||||
asm/non_matchings/code/audio_synthesis/func_80188DDC.s,func_80188DDC,0x80188DDC,0x78
|
||||
asm/non_matchings/code/audio_synthesis/func_80188FBC.s,func_80188FBC,0x80188FBC,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/func_80189064.s,func_80189064,0x80189064,0x16F
|
||||
asm/non_matchings/code/audio_synthesis/func_80189620.s,func_80189620,0x80189620,0x3A5
|
||||
asm/non_matchings/code/audio_synthesis/func_8018A4B4.s,func_8018A4B4,0x8018A4B4,0xAD
|
||||
asm/non_matchings/code/audio_synthesis/func_8018A768.s,func_8018A768,0x8018A768,0x28
|
||||
asm/non_matchings/code/audio_synthesis/func_8018A808.s,func_8018A808,0x8018A808,0x12F
|
||||
asm/non_matchings/code/audio_synthesis/func_8018ACC4.s,func_8018ACC4,0x8018ACC4,0x5C
|
||||
asm/non_matchings/code/audio_synthesis/func_8018AE34.s,func_8018AE34,0x8018AE34,0xAF
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_AddReverbBufferEntry.s,AudioSynth_AddReverbBufferEntry,0x801877D0,0xE5
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SyncSampleStates.s,AudioSynth_SyncSampleStates,0x80187B64,0x22
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Update.s,AudioSynth_Update,0x80187BEC,0x7F
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_DisableSampleStates.s,AudioSynth_DisableSampleStates,0x80187DE8,0x1C
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadMixedReverbSamples.s,AudioSynth_LoadMixedReverbSamples,0x80187E58,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SaveMixedReverbSamples.s,AudioSynth_SaveMixedReverbSamples,0x80187F00,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop1.s,AudioSynth_Noop1,0x80187FA8,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_ClearBuffer.s,AudioSynth_ClearBuffer,0x80187FB0,0x8
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop2.s,AudioSynth_Noop2,0x80187FD0,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop3.s,AudioSynth_Noop3,0x80187FD8,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop4.s,AudioSynth_Noop4,0x80187FE0,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Mix.s,AudioSynth_Mix,0x80187FE8,0xD
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop5.s,AudioSynth_Noop5,0x8018801C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop6.s,AudioSynth_Noop6,0x80188024,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop7.s,AudioSynth_Noop7,0x8018802C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SetBuffer.s,AudioSynth_SetBuffer,0x80188034,0xD
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop8.s,AudioSynth_Noop8,0x80188068,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop9.s,AudioSynth_Noop9,0x80188070,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_DMemMove.s,AudioSynth_DMemMove,0x80188078,0xB
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop10.s,AudioSynth_Noop10,0x801880A4,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop11.s,AudioSynth_Noop11,0x801880AC,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop12.s,AudioSynth_Noop12,0x801880B4,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop13.s,AudioSynth_Noop13,0x801880BC,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_InterL.s,AudioSynth_InterL,0x801880C4,0x9
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_EnvSetup1.s,AudioSynth_EnvSetup1,0x801880E8,0xD
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop14.s,AudioSynth_Noop14,0x8018811C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadBuffer.s,AudioSynth_LoadBuffer,0x80188124,0xA
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SaveBuffer.s,AudioSynth_SaveBuffer,0x8018814C,0xA
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_EnvSetup2.s,AudioSynth_EnvSetup2,0x80188174,0x7
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop15.s,AudioSynth_Noop15,0x80188190,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop16.s,AudioSynth_Noop16,0x80188198,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop17.s,AudioSynth_Noop17,0x801881A0,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_S8Dec.s,AudioSynth_S8Dec,0x801881A8,0x7
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_HiLoGain.s,AudioSynth_HiLoGain,0x801881C4,0xD
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_UnkCmd19.s,AudioSynth_UnkCmd19,0x801881F8,0xB
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop18.s,AudioSynth_Noop18,0x80188224,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop19.s,AudioSynth_Noop19,0x8018822C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop20.s,AudioSynth_Noop20,0x80188234,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop21.s,AudioSynth_Noop21,0x8018823C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop22.s,AudioSynth_Noop22,0x80188244,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop23.s,AudioSynth_Noop23,0x8018824C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop24.s,AudioSynth_Noop24,0x80188254,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop25.s,AudioSynth_Noop25,0x8018825C,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadFilterBuffer.s,AudioSynth_LoadFilterBuffer,0x80188264,0x9
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadFilterSize.s,AudioSynth_LoadFilterSize,0x80188288,0x6
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LeakReverb.s,AudioSynth_LeakReverb,0x801882A0,0x19
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadDownsampledReverbSamples.s,AudioSynth_LoadDownsampledReverbSamples,0x80188304,0x67
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SaveResampledReverbSamples.s,AudioSynth_SaveResampledReverbSamples,0x801884A0,0x7E
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadResampledReverbSamples.s,AudioSynth_LoadResampledReverbSamples,0x80188698,0x69
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_FilterReverb.s,AudioSynth_FilterReverb,0x8018883C,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_MixOtherReverbIndex.s,AudioSynth_MixOtherReverbIndex,0x801888E4,0x30
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadDefaultReverbSamples.s,AudioSynth_LoadDefaultReverbSamples,0x801889A4,0x2B
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadSubReverbSamples.s,AudioSynth_LoadSubReverbSamples,0x80188A50,0x2B
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SaveResampledReverbSamplesImpl.s,AudioSynth_SaveResampledReverbSamplesImpl,0x80188AFC,0x53
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadReverbSamplesImpl.s,AudioSynth_LoadReverbSamplesImpl,0x80188C48,0x1B
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SaveReverbSamplesImpl.s,AudioSynth_SaveReverbSamplesImpl,0x80188CB4,0x1B
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_Noop26.s,AudioSynth_Noop26,0x80188D20,0x2
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadSubReverbSamplesWithoutDownsample.s,AudioSynth_LoadSubReverbSamplesWithoutDownsample,0x80188D28,0x10
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadReverbSamples.s,AudioSynth_LoadReverbSamples,0x80188D68,0x1D
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SaveReverbSamples.s,AudioSynth_SaveReverbSamples,0x80188DDC,0x78
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_SaveSubReverbSamples.s,AudioSynth_SaveSubReverbSamples,0x80188FBC,0x2A
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_ProcessSamples.s,AudioSynth_ProcessSamples,0x80189064,0x16F
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_ProcessSample.s,AudioSynth_ProcessSample,0x80189620,0x3A5
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_ApplySurroundEffect.s,AudioSynth_ApplySurroundEffect,0x8018A4B4,0xAD
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_FinalResample.s,AudioSynth_FinalResample,0x8018A768,0x28
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_ProcessEnvelope.s,AudioSynth_ProcessEnvelope,0x8018A808,0x12F
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_LoadWaveSamples.s,AudioSynth_LoadWaveSamples,0x8018ACC4,0x5C
|
||||
asm/non_matchings/code/audio_synthesis/AudioSynth_ApplyHaasEffect.s,AudioSynth_ApplyHaasEffect,0x8018AE34,0xAF
|
||||
asm/non_matchings/code/audio_heap/AudioHeap_ResetLoadStatus.s,AudioHeap_ResetLoadStatus,0x8018B250,0x32
|
||||
asm/non_matchings/code/audio_heap/AudioHeap_DiscardFont.s,AudioHeap_DiscardFont,0x8018B318,0x39
|
||||
asm/non_matchings/code/audio_heap/AudioHeap_ReleaseNotesForFont.s,AudioHeap_ReleaseNotesForFont,0x8018B3FC,0x1E
|
||||
@@ -3242,7 +3242,7 @@ asm/non_matchings/code/code_80194710/osAiSetNextBuffer.s,osAiSetNextBuffer,0x801
|
||||
asm/non_matchings/code/code_80194710/func_80194804.s,func_80194804,0x80194804,0xF
|
||||
asm/non_matchings/code/code_80194710/func_80194840.s,func_80194840,0x80194840,0x1C
|
||||
asm/non_matchings/code/code_80194710/func_801948B0.s,func_801948B0,0x801948B0,0x20
|
||||
asm/non_matchings/code/audio_playback/AudioPlayback_InitNoteSub.s,AudioPlayback_InitNoteSub,0x80194930,0x120
|
||||
asm/non_matchings/code/audio_playback/AudioPlayback_InitSampleState.s,AudioPlayback_InitSampleState,0x80194930,0x120
|
||||
asm/non_matchings/code/audio_playback/AudioPlayback_NoteSetResamplingRate.s,AudioPlayback_NoteSetResamplingRate,0x80194DB0,0x2C
|
||||
asm/non_matchings/code/audio_playback/AudioPlayback_NoteInit.s,AudioPlayback_NoteInit,0x80194E60,0x30
|
||||
asm/non_matchings/code/audio_playback/AudioPlayback_NoteDisable.s,AudioPlayback_NoteDisable,0x80194F20,0x19
|
||||
|
||||
|
Reference in New Issue
Block a user