Audio_SequenceChannelProcessSound

This commit is contained in:
Alejandro Javier Asenjo Nitti 2024-11-10 17:59:06 -03:00
parent af6f109ac1
commit 26bc70724a
2 changed files with 4 additions and 4 deletions

View File

@ -361,7 +361,7 @@ Audio_AllocNoteFromDecaying = 0x80012ED4;
Audio_AllocNoteFromActive = 0x80012F24;
Audio_AllocNote = 0x8001301C;
Audio_NoteInitAll = 0x800132E8;
func_80013400 = 0x80013400;
Audio_SequenceChannelProcessSound = 0x80013400;
Audio_SequencePlayerProcessSound = 0x800135A8;
Audio_GetPortamentoFreqScale = 0x80013708;
func_800137DC = 0x800137DC;

View File

@ -3,13 +3,13 @@
static const char devstr[] = "Audio:Envp: overflow %f\n";
void func_80013400(SequenceChannel* channel, s32 updateVolume) {
void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 updateVolume) {
s32 i;
if (channel->changes.s.volume || updateVolume) {
f32 channelVolume = channel->volume * channel->volumeMod * channel->seqPlayer->appliedFadeVolume;
if (channel->seqPlayer->muted && (channel->muteBehavior & 0x20)) {
if (channel->seqPlayer->muted && (channel->muteBehavior & MUTE_BEHAVIOR_SOFTEN)) {
channelVolume = channel->seqPlayer->muteVolumeMod * channelVolume;
}
channel->appliedVolume = SQ(channelVolume);
@ -65,7 +65,7 @@ void Audio_SequencePlayerProcessSound(SequencePlayer* seqplayer) {
}
for (i = 0; i < SEQ_NUM_CHANNELS; i++) {
if ((IS_SEQUENCE_CHANNEL_VALID(seqplayer->channels[i]) == 1) && (seqplayer->channels[i]->enabled == 1)) {
func_80013400(seqplayer->channels[i], seqplayer->recalculateVolume);
Audio_SequenceChannelProcessSound(seqplayer->channels[i], seqplayer->recalculateVolume);
}
}
seqplayer->recalculateVolume = false;