22static void au_reset_instrument(
Instrument* instrument);
BSS s32 PopupMenu_SelectedIndex
BankSetIndex
The bank indices used by audio assets when choosing an intrument.
BankSet
corresponds with bank group IDs from INIT file bank list (InitBankEntry.bankSet)
Instrument * InstrumentBank[16]
Represents a dummy BK file large enough to hold everything except the wave data.
Structure for volume fading for SFX and BGM. Has independent controls for base and envelope volumes.
void au_reset_voice(AuVoice *voice, u8 voiceIdx)
u16 au_bus_get_volume(u8 busID)
AuResult au_reload_song_files(s32 songID, BGMHeader *arg1)
void au_set_global_volume(s16 arg0)
f32 au_syn_get_pitch(u8 voiceIdx)
void au_pvoice_set_bus(u8 voiceIdx, s8 busID)
void au_fade_set_envelope(Fade *fade, s16 value)
s32 au_fx_param_hdl(AuFX *fx, s16 index, s16 paramID, s32 value)
void au_use_global_volume(void)
void au_copy_bytes(s8 *src, s8 *dest, s32 size)
void au_disable_channel_delay(void)
s16 au_syn_get_wetamt(u8 voiceIdx)
AuResult au_fetch_SBN_file(u32 fileIdx, AuFileFormat format, SBNFileEntry *arg2)
BKFileBuffer * au_load_static_BK_to_bank(s32 *bkFileOffset, void *vaddr, s32 bankIndex, BankSet bankSet)
UNUSED Loads an instrument bank file from ROM to a given buffer (allocates if needed),...
void au_filter_create(AuFilter *filter, ALHeap *heap)
void au_swizzle_BK_instruments(s32 bkFileOffset, BKFileBuffer *bkFile, InstrumentBank instruments, u32 instrumentCount, u8 arg4)
Fixes up (swizzles) instrument pointers in a loaded bank, converting file-relative offsets to valid R...
void au_reset_nonfree_voice(AuVoice *arg0, u8 arg1)
void au_sync_channel_delay_enabled(u32 arg0)
void au_set_bus_volume_level(s32 arg0, u32 idx)
void au_syn_set_fxmix(u8 voiceIdx, u8 dryAmt)
void au_fade_update(Fade *fade)
s32 au_load_aux_bank(s32 bkFileOffset, s32 bankIndex)
void au_driver_init(AuSynDriver *driver, ALConfig *config)
void au_engine_init(s32 outputRate)
void au_init_voices(AuGlobals *globals)
Initializes all voices in the audio system.
void au_clear_instrument_group(s32 bankIndex, BankSet bankSet)
unused. resets all instruments in (bankIndex, bankSet) to default
void au_voice_after_volume_change(AuVoice *voice)
Applies volume update after a client-side volume change.
f32 au_compute_pitch_ratio(s32 tuning)
Converts a linear pitch value (in cents) into a frequency ratio suitable for adjusting playback speed...
void au_get_bgm_player(u32 playerIndex, BGMPlayer **outPlayer)
void au_syn_set_volume_delta(u8 voiceIdx, s16 arg1, s32 arg2)
Instrument * au_get_instrument(AuGlobals *globals, BankSetIndex bank, s32 patch, EnvelopeData *arg3)
Note that bank is supplied as BankSetIndex and not BankSet, which means it will be used to perform a ...
s32 au_voice_get_delta(s32 usecs)
Converts envelope step duration from microseconds to num samples delta.
u8 au_syn_get_pan(u8 voiceIdx)
void au_voice_set_vol_changed(AuVoice *voice)
(UNUSED) Force recalculation of voice envelope volume during next update.
void au_fade_flush(Fade *fade)
void au_read_rom(s32 romAddr, void *buffer, u32 size)
void au_update_clients_for_video_frame(void)
this is called once per video frame update (50 or 60 times per second)
void au_syn_stop_voice(u8 voiceIdx)
BGMPlayer * au_get_snapshot_by_index(s32 index)
void au_load_PRG(AuGlobals *arg0, s32 romAddr)
void au_update_voices(AuGlobals *globals)
Main envelope system update, called once per frame.
void au_syn_set_wavetable(u8 voiceIdx, Instrument *table)
void au_set_stereo_enabled(b8 enabled)
BGMPlayer * au_get_client_by_priority(u8 arg0)
void au_delay_left_channel(u8 arg0)
void au_memset(void *dst, s32 size, u8 value)
s32 nuAuDmaCallBack(s32 addr, s32 len, void *state, u8 useDma)
DMA callback for audio sample streaming; manages a DMA buffer cache.
void au_fade_init(Fade *fade, s32 time, s32 startValue, s32 endValue)
void au_delay_right_channel(u8 arg0)
void au_syn_start_voice_params(u8 index, u8 reverbType, Instrument *table, f32 pitch, s16 vol, u8 pan, u8 fxMix, s32 delta)
void au_update_clients_for_audio_frame(void)
this is called per audio frame generated by alAudioFrame (every 184 audio samples) there will be mult...
s32 au_syn_get_volume_right(u8 voiceIdx)
void au_syn_set_pan_fxmix(u8 voiceIdx, u8 arg1, u8 arg2)
void au_fade_calc_envelope(Fade *fade, u32 arg1, s32 target)
void au_voice_start(AuVoice *voice, EnvelopeData *envData)
Starts a new voice with the given envelope data.
void au_bus_set_volume(u8 busID, u16 value)
void au_bus_set_effect(u8 busID, u8 effectID)
BKFileBuffer * au_load_BK_to_bank(s32 bkFileOffset, BKFileBuffer *bkFile, s32 bankIndex, BankSet bankSet)
Loads an instrument bank file from ROM, allocates memory if needed, and sets up instrument pointers.
Acmd * au_pull_fx(AuFX *fx, Acmd *cmdBusPos, s16, s16)
Applies a chain of delay-line based effects to audio and mixes into output.
void create_audio_system(void)
void au_filter_init(AuFilter *filter, s16 arg1, s16 arg2, s16 fc)
void au_set_delay_time(s32 arg0)
InstrumentBank * au_get_BK_instruments(BankSet bankSet, u32 bankIndex)
void au_syn_set_pan(u8 voiceIdx, u8 pan)
void au_fx_create(AuFX *fx, u8 mode, ALHeap *heap)
void au_load_INIT(AuGlobals *arg0, s32 romAddr, ALHeap *heap)
void au_load_PER(AuGlobals *globals, s32 romAddr)
AuResult au_load_song_files(u32 arg0, BGMHeader *arg1, BGMPlayer *arg2)
s16 au_syn_get_dryamt(u8 voiceIdx)
void au_syn_set_pitch(u8 voiceIdx, f32 pitchRatio)
void au_syn_set_mixer_params(u8 voiceIdx, s16 volume, s32 arg2, u8 arg3, u8 arg4)
AuResult au_ambient_load(u32 arg0)
void * alHeapAlloc(ALHeap *heap, s32 count, s32 size)
void au_fade_set_volume(u8 arg0, u16 arg1, s32 arg2)
void au_driver_release(void)
void au_init_delay_channel(s16 arg0)
void au_get_bgm_player_and_file(u32 playerIndex, BGMHeader **outCurrentTrackData, BGMPlayer **outPlayer)
s32 au_set_reverb_type(s32 arg0, s32 arg1)
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.
s16 au_get_global_volume(void)
void au_fx_load_preset(AuFX *fx, u8 effectType)
void au_release_voice(u8 index)
Acmd * au_pull_voice(AuPVoice *pvoice, Acmd *cmdBufPos)
void au_bus_set_fx_params(u8 busID, s16 arg1, s16 arg2, s32 arg3)
void au_syn_begin_audio_frame(AuGlobals *globals)
void au_copy_words(void *src, void *dst, s32 size)
void au_fade_clear(Fade *fade)
s32 au_syn_get_bus(u8 voiceIdx)
void au_syn_start_voice(u8 index)
s32 au_syn_get_playing(u8 voiceIdx)
s32 au_syn_get_volume_left(u8 voiceIdx)
void au_fade_update_envelope(Fade *fade)