mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-16 04:44:44 +00:00
Cleanup NotePlaybackState (#1255)
* Audio Cleanup * more * missed one * Audio docs imported from MM * Suggestions from Discord * Small fix * Fix sizes in z64audio.h * numSamples * Cleanup comments * Revert overlap with soundFont PR * revert Audio_AdsrUpdate cleanup (move to different PR) * PR Suggestion * Mainly typos * PR suggestion, vol -> volume * Better description * Name sampling frequency * A good number of PR suggestions * Missed a suggestion * More PR Suggestions * Cleanup NotePlaybackState * one more * Add comments for new variable names * Reverb samplePosInt * Missed one * Remove `Always set to 0`
This commit is contained in:
parent
1a41694d58
commit
bd4912a1bd
4 changed files with 15 additions and 16 deletions
|
@ -174,11 +174,11 @@ f32 Audio_GetVibratoFreqScale(VibratoState* vib) {
|
|||
}
|
||||
|
||||
void Audio_NoteVibratoUpdate(Note* note) {
|
||||
if (note->portamento.mode != 0) {
|
||||
note->playbackState.portamentoFreqScale = Audio_GetPortamentoFreqScale(¬e->portamento);
|
||||
if (note->playbackState.portamento.mode != 0) {
|
||||
note->playbackState.portamentoFreqScale = Audio_GetPortamentoFreqScale(¬e->playbackState.portamento);
|
||||
}
|
||||
if (note->vibratoState.active) {
|
||||
note->playbackState.vibratoFreqScale = Audio_GetVibratoFreqScale(¬e->vibratoState);
|
||||
if (note->playbackState.vibratoState.active) {
|
||||
note->playbackState.vibratoFreqScale = Audio_GetVibratoFreqScale(¬e->playbackState.vibratoState);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ void Audio_NoteVibratoInit(Note* note) {
|
|||
|
||||
note->playbackState.vibratoFreqScale = 1.0f;
|
||||
|
||||
vib = ¬e->vibratoState;
|
||||
vib = ¬e->playbackState.vibratoState;
|
||||
|
||||
vib->active = 1;
|
||||
vib->time = 0;
|
||||
|
@ -212,7 +212,7 @@ void Audio_NoteVibratoInit(Note* note) {
|
|||
|
||||
void Audio_NotePortamentoInit(Note* note) {
|
||||
note->playbackState.portamentoFreqScale = 1.0f;
|
||||
note->portamento = note->playbackState.parentLayer->portamento;
|
||||
note->playbackState.portamento = note->playbackState.parentLayer->portamento;
|
||||
}
|
||||
|
||||
void Audio_AdsrInit(AdsrState* adsr, AdsrEnvelope* envelope, s16* volOut) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue