1
0
Fork 0
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:
engineer124 2022-06-05 05:29:01 +10:00 committed by GitHub
parent 1a41694d58
commit bd4912a1bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 16 deletions

View file

@ -174,11 +174,11 @@ f32 Audio_GetVibratoFreqScale(VibratoState* vib) {
}
void Audio_NoteVibratoUpdate(Note* note) {
if (note->portamento.mode != 0) {
note->playbackState.portamentoFreqScale = Audio_GetPortamentoFreqScale(&note->portamento);
if (note->playbackState.portamento.mode != 0) {
note->playbackState.portamentoFreqScale = Audio_GetPortamentoFreqScale(&note->playbackState.portamento);
}
if (note->vibratoState.active) {
note->playbackState.vibratoFreqScale = Audio_GetVibratoFreqScale(&note->vibratoState);
if (note->playbackState.vibratoState.active) {
note->playbackState.vibratoFreqScale = Audio_GetVibratoFreqScale(&note->playbackState.vibratoState);
}
}
@ -188,7 +188,7 @@ void Audio_NoteVibratoInit(Note* note) {
note->playbackState.vibratoFreqScale = 1.0f;
vib = &note->vibratoState;
vib = &note->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) {