mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-04 04:12:41 -04:00
Audio Sequences: Scene/Ambience/SeqFlags Functions OK (#1033)
* import audio scene seq docs * cleanup * fix scene cmd * small fixes * more PR suggestions * missed comment * rename spot to resume * cleanup comments * SEQ_IO_VAL_NONE * Empty-Commit * another PR suggestion
This commit is contained in:
@@ -315,7 +315,7 @@ void AudioSeq_InitSequenceChannel(SequenceChannel* channel) {
|
||||
channel->freqScale = 1.0f;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(channel->soundScriptIO); i++) {
|
||||
channel->soundScriptIO[i] = -1;
|
||||
channel->soundScriptIO[i] = SEQ_IO_VAL_NONE;
|
||||
}
|
||||
|
||||
channel->unused = false;
|
||||
@@ -1791,12 +1791,12 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
|
||||
case 0x10: // channel: load sample
|
||||
if (lowBits < 8) {
|
||||
channel->soundScriptIO[lowBits] = -1;
|
||||
channel->soundScriptIO[lowBits] = SEQ_IO_VAL_NONE;
|
||||
if (AudioLoad_SlowLoadSample(channel->fontId, scriptState->value,
|
||||
&channel->soundScriptIO[lowBits]) == -1) {}
|
||||
} else {
|
||||
lowBits -= 8;
|
||||
channel->soundScriptIO[lowBits] = -1;
|
||||
channel->soundScriptIO[lowBits] = SEQ_IO_VAL_NONE;
|
||||
if (AudioLoad_SlowLoadSample(channel->fontId, channel->unk_22 + 0x100,
|
||||
&channel->soundScriptIO[lowBits]) == -1) {}
|
||||
}
|
||||
@@ -1805,7 +1805,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
|
||||
case 0x60: // channel: io read value
|
||||
scriptState->value = channel->soundScriptIO[lowBits];
|
||||
if (lowBits < 2) {
|
||||
channel->soundScriptIO[lowBits] = -1;
|
||||
channel->soundScriptIO[lowBits] = SEQ_IO_VAL_NONE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2150,7 +2150,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
|
||||
case 0x80: // seqPlayer: io read value
|
||||
seqScript->value = seqPlayer->soundScriptIO[cmdLowBits];
|
||||
if (cmdLowBits < 2) {
|
||||
seqPlayer->soundScriptIO[cmdLowBits] = -1;
|
||||
seqPlayer->soundScriptIO[cmdLowBits] = SEQ_IO_VAL_NONE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2286,7 +2286,7 @@ void AudioSeq_InitSequencePlayer(SequencePlayer* seqPlayer) {
|
||||
seqPlayer->applyBend = false;
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(seqPlayer->soundScriptIO); j++) {
|
||||
seqPlayer->soundScriptIO[j] = -1;
|
||||
seqPlayer->soundScriptIO[j] = SEQ_IO_VAL_NONE;
|
||||
}
|
||||
|
||||
seqPlayer->muteFlags = MUTE_FLAGS_SOFTEN | MUTE_FLAGS_STOP_NOTES;
|
||||
|
||||
Reference in New Issue
Block a user