Skip to content

Commit

Permalink
Audio_SequenceChannelProcessSound
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicdcer committed Nov 10, 2024
1 parent af6f109 commit 26bc707
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion linker_scripts/us/rev1/symbol_addrs_audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/audio/audio_effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 26bc707

Please sign in to comment.