mirror of
https://github.com/izzy2lost/Starship.git
synced 2026-07-05 15:19:42 -07:00
audio docs from the decomp
This commit is contained in:
@@ -1029,8 +1029,8 @@ typedef struct {
|
||||
#define SEQ_BYTE2(seqId) (((seqId) & (0xFF << 16)) >> 13 & 0xFFFF)
|
||||
|
||||
// audio_synthesis
|
||||
void func_80008780(f32*, s32, f32*);
|
||||
Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen);
|
||||
void AudioSynth_HartleyTransform(f32*, s32, f32*);
|
||||
Acmd* AudioSynth_Update(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen);
|
||||
|
||||
// audio_effects
|
||||
void Audio_SequencePlayerProcessSound(SequencePlayer* seqplayer);
|
||||
|
||||
@@ -222,26 +222,26 @@ sAudioResetMsg = 0x8015661C;
|
||||
|
||||
|
||||
// functions
|
||||
func_800080C0 = 0x800080C0;
|
||||
func_80008364 = 0x80008364;
|
||||
func_80008780 = 0x80008780;
|
||||
AudioSynth_InitNextRingBuf = 0x800080C0;
|
||||
AudioSynth_InverseDiscreteCosineTransform = 0x80008364;
|
||||
AudioSynth_HartleyTransform = 0x80008780;
|
||||
func_80009124 = 0x80009124;
|
||||
func_80009504 = 0x80009504;
|
||||
func_8000967C = 0x8000967C;
|
||||
func_800097A8 = 0x800097A8;
|
||||
func_800098DC = 0x800098DC;
|
||||
func_80009984 = 0x80009984;
|
||||
func_80009A2C = 0x80009A2C;
|
||||
func_80009AAC = 0x80009AAC;
|
||||
func_80009B64 = 0x80009B64;
|
||||
func_80009D78 = 0x80009D78;
|
||||
func_8000A128 = 0x8000A128;
|
||||
func_8000A25C = 0x8000A25C;
|
||||
func_8000A700 = 0x8000A700;
|
||||
func_8000B3F0 = 0x8000B3F0;
|
||||
func_8000B480 = 0x8000B480;
|
||||
func_8000B51C = 0x8000B51C;
|
||||
func_8000B98C = 0x8000B98C;
|
||||
AudioSynth_LoadRingBufferPart = 0x800098DC;
|
||||
AudioSynth_SaveRingBufferPart = 0x80009984;
|
||||
AudioSynth_DisableSampleStates = 0x80009A2C;
|
||||
AudioSynth_SyncSampleStates = 0x80009AAC;
|
||||
AudioSynth_Update = 0x80009B64;
|
||||
AudioSynth_LoadReverbSamples = 0x80009D78;
|
||||
AudioSynth_SaveReverbSamples = 0x8000A128;
|
||||
AudioSynth_DoOneAudioUpdate = 0x8000A25C;
|
||||
AudioSynth_ProcessNote = 0x8000A700;
|
||||
AudioSynth_LoadWaveSamples = 0x8000B3F0;
|
||||
AudioSynth_FinalResample = 0x8000B480;
|
||||
AudioSynth_ProcessEnvelope = 0x8000B51C;
|
||||
AudioSynth_ApplyHaasEffect = 0x8000B98C;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2268,7 +2268,7 @@ void Audio_AnalyzeFrequencies(f32* buffer0, f32* buffer1, s32 length, f32* buffe
|
||||
buff1half1 = buffer1;
|
||||
|
||||
// FFT buffer 1 using buffer 2
|
||||
func_80008780(buffer1, length, buffer2);
|
||||
AudioSynth_HartleyTransform(buffer1, length, buffer2);
|
||||
|
||||
// handle i = 0 case
|
||||
buff0fromStart[0] = buff1half1[0];
|
||||
|
||||
+293
-259
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@ static const char devstr12[] = "Undefined Port Command %d\n";
|
||||
static const char devstr13[] = "specchg conjunction error (Msg:%d Cur:%d)\n";
|
||||
static const char devstr14[] = "Error : Queue is not empty ( %x ) \n";
|
||||
|
||||
void AudioThread_CreateNextAudioBuffer(s16 *samples, u32 num_samples) {
|
||||
void AudioThread_CreateNextAudioBuffer(s16* samples, u32 num_samples) {
|
||||
static s32 gMaxAbiCmdCnt = 128;
|
||||
static SPTask* gWaitingAudioTask = NULL;
|
||||
s32 abiCmdCount;
|
||||
@@ -79,7 +79,7 @@ void AudioThread_CreateNextAudioBuffer(s16 *samples, u32 num_samples) {
|
||||
AudioThread_ProcessCmds(msg.data32);
|
||||
}
|
||||
|
||||
gCurAbiCmdBuffer = func_80009B64(gCurAbiCmdBuffer, &abiCmdCount, samples, num_samples);
|
||||
AudioSynth_Update(gCurAbiCmdBuffer, &abiCmdCount, samples, num_samples);
|
||||
memcpy(gAiBuffers[gCurAiBuffIndex], samples, num_samples);
|
||||
gAudioRandom = osGetCount() * (gAudioRandom + gAudioTaskCountQ);
|
||||
|
||||
@@ -163,7 +163,7 @@ SPTask* AudioThread_CreateTask() {
|
||||
while (MQ_GET_MESG(gThreadCmdProcQueue, &msg)) {
|
||||
AudioThread_ProcessCmds(msg);
|
||||
}
|
||||
gCurAbiCmdBuffer = func_80009B64(gCurAbiCmdBuffer, &abiCmdCount, aiBuffer, gAiBuffLengths[aiBuffIndex]);
|
||||
gCurAbiCmdBuffer = AudioSynth_Update(gCurAbiCmdBuffer, &abiCmdCount, aiBuffer, gAiBuffLengths[aiBuffIndex]);
|
||||
gAudioRandom = osGetCount() * (gAudioRandom + gAudioTaskCountQ);
|
||||
gAudioRandom = gAiBuffers[aiBuffIndex][gAudioTaskCountQ & 0xFF] + gAudioRandom;
|
||||
|
||||
@@ -317,26 +317,17 @@ void AudioThread_QueueCmd(AudioCmd cmd) {
|
||||
}
|
||||
|
||||
void AudioThread_QueueCmdF32(u32 opArgs, f32 val) {
|
||||
AudioCmd cmd = {
|
||||
.opArgs = opArgs,
|
||||
.asFloat = val
|
||||
};
|
||||
AudioCmd cmd = { .opArgs = opArgs, .asFloat = val };
|
||||
AudioThread_QueueCmd(cmd);
|
||||
}
|
||||
|
||||
void AudioThread_QueueCmdS32(u32 opArgs, u32 val) {
|
||||
AudioCmd cmd = {
|
||||
.opArgs = opArgs,
|
||||
.asInt = val
|
||||
};
|
||||
AudioCmd cmd = { .opArgs = opArgs, .asInt = val };
|
||||
AudioThread_QueueCmd(cmd);
|
||||
}
|
||||
|
||||
void AudioThread_QueueCmdS8(u32 opArgs, s8 val) {
|
||||
AudioCmd cmd = {
|
||||
.opArgs = opArgs,
|
||||
.asSbyte = val
|
||||
};
|
||||
AudioCmd cmd = { .opArgs = opArgs, .asSbyte = val };
|
||||
AudioThread_QueueCmd(cmd);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user