10 if (
voice->donePending) {
27 voice->envDuration = 0;
28 voice->envTimeLeft = 0;
29 voice->envIntervalIndex = 0;
31 voice->envelopeFlags = 0;
74 if (*(
s8*)
voice->cmdPtr++ < 0) {
91 current =
voice->envTarget;
96 current =
voice->envTarget;
101 if (
voice->envTimeLeft == -1) {
110 if (
voice->envTimeLeft <= 0) {
114 voice->envelopeFlags = 0;
119 voice->envTimeLeft = -1;
120 voice->envDuration = -1;
123 voice->envDelta = 0.0f;
133 if (
voice->envDuration != 0) {
136 voice->envDelta = 0.0f;
145 current =
voice->envTarget;
150 current =
voice->envTarget;
164 current =
voice->envTarget;
192 voice->envelope.cmdListRelease =
envData->cmdListRelease;
197 voice->envelopeFlags = 0;
198 voice->envInitial = 0;
206 if (
voice->envDuration != 0) {
209 voice->envDelta = 0.0f;
235 }
else if (
voice->envScale < 0) {
245 if (
voice->loopCounter == 0 || --
voice->loopCounter != 0) {
BSS s32 PopupMenu_SelectedIndex
#define VOL_MULT_4(a, b, c, d)
s32 AuEnvelopeIntervals[]
#define VOL_MULT_3(a, b, c)
@ AU_VOICE_SYNC_FLAG_PARAMS
@ AU_VOICE_ENV_FLAG_KEY_RELEASED
@ AU_VOICE_ENV_FLAG_RELEASING
@ AU_VOICE_ENV_FLAG_VOL_CHANGED
@ AU_VOICE_ENV_FLAG_HANDLED_VOL_CHANGE
void au_syn_stop_voice(u8 voiceIdx)
void au_init_voices(AuGlobals *globals)
Initializes all voices in the audio system.
void au_voice_after_volume_change(AuVoice *voice)
Applies volume update after a client-side volume change.
s32 au_voice_get_delta(s32 usecs)
Converts envelope step duration from microseconds to num samples delta.
void au_voice_set_vol_changed(AuVoice *voice)
(UNUSED) Force recalculation of voice envelope volume during next update.
void au_update_voices(AuGlobals *globals)
Main envelope system update, called once per frame.
void au_voice_start(AuVoice *voice, EnvelopeData *envData)
Starts a new voice with the given envelope data.
void au_flush_finished_voices(AuGlobals *globals)
(UNUSED) Immediately flush all voices which have finished playing.
u8 au_voice_step(AuVoice *voice)
Parses and executes envelope commands until a time interval is found.