diff options
| author | zelda2774 <69368340+zelda2774@users.noreply.github.com> | 2020-09-20 19:22:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-20 13:22:09 -0400 |
| commit | 055d1d2baeef17f1f9c3fbe5bfb643cc38fc3873 (patch) | |
| tree | 56dbf627325d337dd1b7ae214f1422df602b6f0c /src/code/audio_effects.c | |
| parent | 90188416602be3691f4381a0fad40c3850a6e213 (diff) | |
audio_heap: 1 non-matching (#381)
* Audio_AllocDmaMemory
* Audio_AllocDmaMemoryZeroed
* func_800DE238
* Audio_SessionPoolsInit
* func_800DE2B0
* func_800DE258
* Audio_DiscardSequence
* Audio_DiscardBank
* func_800DE12C
* Audio_ResetLoadStatus
* func_800DDE3C
* func_800DDE20
* Audio_InitMainPools
* Audio_SoundAllocPoolInit
* Audio_PersistentPoolClear
* Audio_TemporaryPoolClear
* func_800DE4A0
* Audio_PersistentPoolsInit
* Audio_TemporaryPoolsInit
* Formatting
* Audio_SeqAndBankPoolInit
* Audio_Alloc
* Audio_AllocZeroed
* func_800DE4B0
* func_800DF0CC
* func_800DF074
* func_800DF1D8
* func_800DF688
* func_800DF5DC, func_800DF630
* func_800DF7BC
* func_800DF7C4
* func_800DF888
* Fix AudioBufferParameters
* Audio_ResetStep
* Struct work
* oops
* structsss
* wip on func_800DFBF8
* func_800E04E8
* func_800E0540
* func_800E0964
* func_800E1148
* func_800DF5AC
* func_800E0E6C
* func_800E0E90
* func_800E0BF8
* func_800E0634
* func_800E05C4
* func_800E0CBC
* func_800E0C80
* naming
* func_800E0BB4
* func_800E0AD8
* func_800E0E0C
* func_800E0EB4
* func_800E06CC
* Audio_AllocBankOrSeq
* Use true/false macros
* fixup
* Format
* comments
* review
* unk instrument -> sfx
* Reword comment
* Change AVOID_UB to a comment
Co-authored-by: zelda2774 <zelda2774@invalid>
Diffstat (limited to 'src/code/audio_effects.c')
| -rw-r--r-- | src/code/audio_effects.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/code/audio_effects.c b/src/code/audio_effects.c index 180f80aba..41f727771 100644 --- a/src/code/audio_effects.c +++ b/src/code/audio_effects.c @@ -21,7 +21,7 @@ void Audio_SequenceChannelProcessSound(SequenceChannel* seqChannel, s32 recalcul chanFreqScale = seqChannel->freqScale; if (b != 0) { chanFreqScale *= seqChannel->seqPlayer->unk_34; - seqChannel->changes.s.freqScale = 1; + seqChannel->changes.s.freqScale = true; } for (i = 0; i < 4; i++) { @@ -31,7 +31,7 @@ void Audio_SequenceChannelProcessSound(SequenceChannel* seqChannel, s32 recalcul layer->noteFreqScale = layer->freqScale * chanFreqScale; layer->noteVelocity = layer->velocitySquare2 * seqChannel->appliedVolume; layer->notePan = (seqChannel->pan + layer->pan * (0x80 - seqChannel->panChannelWeight)) >> 7; - layer->notePropertiesNeedInit = 0; + layer->notePropertiesNeedInit = false; } else { if (seqChannel->changes.s.freqScale) { layer->noteFreqScale = layer->freqScale * chanFreqScale; @@ -53,7 +53,7 @@ void Audio_SequencePlayerProcessSound(SequencePlayer* seqPlayer) { if (seqPlayer->fadeTimer != 0) { seqPlayer->fadeVolume += seqPlayer->fadeVelocity; - seqPlayer->recalculateVolume = 1; + seqPlayer->recalculateVolume = true; if (seqPlayer->fadeVolume > 1.0f) { seqPlayer->fadeVolume = 1.0f; @@ -78,7 +78,7 @@ void Audio_SequencePlayerProcessSound(SequencePlayer* seqPlayer) { } } - seqPlayer->recalculateVolume = 0; + seqPlayer->recalculateVolume = false; } f32 Audio_GetPortamentoFreqScale(Portamento* p) { @@ -258,7 +258,7 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) { break; default: - adsr->delay *= gAudioContext.unk_286C; + adsr->delay *= gAudioContext.gAudioBufferParameters.unk_24; if (adsr->delay == 0) { adsr->delay = 1; } @@ -313,12 +313,12 @@ f32 Audio_AdsrUpdate(AdsrState* adsr) { if (adsr->action.s.decay) { adsr->action.s.state = ADSR_STATE_DECAY; - adsr->action.s.decay = 0; + adsr->action.s.decay = false; } if (adsr->action.s.release) { adsr->action.s.state = ADSR_STATE_RELEASE; - adsr->action.s.release = 0; + adsr->action.s.release = false; } if (adsr->current < 0.0f) { |
