mirror of
https://github.com/zeldaret/oot
synced 2026-07-02 12:36:14 -04:00
Synthetic Waves Documentation (#1256)
* Synthetic wave documentation * Better docs * harmonicIndex * More * typo * Complete the abi buffer docs * Small change * Revert change * PR suggestions * Missed one * PR Feedback * Better documents * Well that was a silly copy-pasta mistake * Typo * Another comment * Plural * Make it more block-like * Capitalization * Add comments for gWaveSamples[8] * Adjust comment * More PR Suggestions * PR Suggestions * missed a phrasing * PR Suggestions * Update include/z64audio.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
@@ -153,8 +153,6 @@ AudioTask* func_800E5000(void) {
|
||||
if (gAudioContext.resetStatus == 0) {
|
||||
// msg = 0000RREE R = read pos, E = End Pos
|
||||
while (osRecvMesg(gAudioContext.cmdProcQueueP, (OSMesg*)&sp4C, OS_MESG_NOBLOCK) != -1) {
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
Audio_ProcessCmds(sp4C);
|
||||
j++;
|
||||
@@ -166,9 +164,15 @@ AudioTask* func_800E5000(void) {
|
||||
|
||||
gAudioContext.curAbiCmdBuf =
|
||||
AudioSynth_Update(gAudioContext.curAbiCmdBuf, &abiCmdCnt, currAiBuffer, gAudioContext.aiBufLengths[index]);
|
||||
|
||||
// Update audioRandom to the next random number
|
||||
gAudioContext.audioRandom = (gAudioContext.audioRandom + gAudioContext.totalTaskCount) * osGetCount();
|
||||
gAudioContext.audioRandom =
|
||||
gAudioContext.aiBuffers[index][gAudioContext.totalTaskCount & 0xFF] + gAudioContext.audioRandom;
|
||||
gAudioContext.audioRandom + gAudioContext.aiBuffers[index][gAudioContext.totalTaskCount & 0xFF];
|
||||
|
||||
// gWaveSamples[8] interprets compiled assembly code as s16 samples as a way to generate sound with noise.
|
||||
// Start with the address of func_800E4FE0, and offset it by a random number between 0 - 0xFFF0
|
||||
// Use the resulting address as the starting address to interpret an array of samples i.e. `s16 samples[]`
|
||||
gWaveSamples[8] = (s16*)(((u8*)func_800E4FE0) + (gAudioContext.audioRandom & 0xFFF0));
|
||||
|
||||
index = gAudioContext.rspTaskIndex;
|
||||
|
||||
Reference in New Issue
Block a user