Functions | |
| void | create_audio_system (void) |
| void | nuAuMgr (void *arg) |
| s32 | nuAuDmaCallBack (s32 addr, s32 len, void *state, u8 useDma) |
| DMA callback for audio sample streaming; manages a DMA buffer cache. | |
| void | au_release_voice (u8 index) |
| void | au_engine_init (s32 outputRate) |
| void | au_update_clients_for_video_frame (void) |
| this is called once per video frame update (50 or 60 times per second) | |
| void | au_update_clients_for_audio_frame (void) |
| this is called per audio frame generated by alAudioFrame (every 184 audio samples) there will be multiuple of these per video frame | |
| void | au_syn_begin_audio_frame (AuGlobals *globals) |
| void | au_reset_nonfree_voice (AuVoice *arg0, u8 arg1) |
| void | au_reset_voice (AuVoice *voice, u8 voiceIdx) |
| 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_fade_init (Fade *fade, s32 time, s32 startValue, s32 endValue) |
| void | au_fade_clear (Fade *fade) |
| void | au_fade_update (Fade *fade) |
| void | au_fade_set_volume (u8 arg0, u16 arg1, s32 arg2) |
| void | au_fade_flush (Fade *fade) |
| void | au_fade_set_envelope (Fade *fade, s16 value) |
| void | au_fade_calc_envelope (Fade *fade, u32 arg1, s32 target) |
| void | au_fade_update_envelope (Fade *fade) |
| 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 raw access into AuGlobals::bankSets. | |
| void | au_get_bgm_player_and_file (u32 playerIndex, BGMHeader **outCurrentTrackData, BGMPlayer **outPlayer) |
| void | au_get_bgm_player (u32 playerIndex, BGMPlayer **outPlayer) |
| AuResult | au_load_song_files (u32 arg0, BGMHeader *arg1, BGMPlayer *arg2) |
| AuResult | au_reload_song_files (s32 songID, BGMHeader *arg1) |
| BGMPlayer * | au_get_snapshot_by_index (s32 index) |
| AuResult | au_ambient_load (u32 arg0) |
| BGMPlayer * | au_get_client_by_priority (u8 arg0) |
| void | au_load_INIT (AuGlobals *arg0, s32 romAddr, ALHeap *heap) |
| AuResult | au_fetch_SBN_file (u32 fileIdx, AuFileFormat format, SBNFileEntry *arg2) |
| void | au_load_PER (AuGlobals *globals, s32 romAddr) |
| void | au_load_PRG (AuGlobals *arg0, s32 romAddr) |
| InstrumentBank * | au_get_BK_instruments (BankSet bankSet, u32 bankIndex) |
| 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. | |
| 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 RAM pointers. | |
| 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), and sets up instrument pointers. | |
| s32 | au_load_aux_bank (s32 bkFileOffset, s32 bankIndex) |
| void | au_clear_instrument_group (s32 bankIndex, BankSet bankSet) |
| unused. resets all instruments in (bankIndex, bankSet) to default | |
| void | au_set_bus_volume_level (s32 arg0, u32 idx) |
| s32 | au_set_reverb_type (s32 arg0, s32 arg1) |
| void | au_sync_channel_delay_enabled (u32 arg0) |
| void | au_read_rom (s32 romAddr, void *buffer, u32 size) |
| void | au_memset (void *dst, s32 size, u8 value) |
| void | au_copy_bytes (s8 *src, s8 *dest, s32 size) |
| void | au_copy_words (void *src, void *dst, s32 size) |
| void | au_driver_init (AuSynDriver *driver, ALConfig *config) |
| void | au_driver_release (void) |
| void | au_use_global_volume (void) |
| void | au_set_global_volume (s16 arg0) |
| s16 | au_get_global_volume (void) |
| void | au_set_stereo_enabled (b8 enabled) |
| void | au_bus_set_volume (u8 busID, u16 value) |
| u16 | au_bus_get_volume (u8 busID) |
| void | au_bus_set_effect (u8 busID, u8 effectID) |
| void | au_bus_set_fx_params (u8 busID, s16 arg1, s16 arg2, s32 arg3) |
| void | au_pvoice_set_bus (u8 voiceIdx, s8 busID) |
| void | au_syn_stop_voice (u8 voiceIdx) |
| void | au_syn_start_voice (u8 index) |
| void | au_syn_start_voice_params (u8 index, u8 reverbType, Instrument *table, f32 pitch, s16 vol, u8 pan, u8 fxMix, s32 delta) |
| void | au_syn_set_wavetable (u8 voiceIdx, Instrument *table) |
| 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) |
| void | au_syn_set_pan_fxmix (u8 voiceIdx, u8 arg1, u8 arg2) |
| void | au_syn_set_volume_delta (u8 voiceIdx, s16 arg1, s32 arg2) |
| void | au_syn_set_pan (u8 voiceIdx, u8 pan) |
| void | au_syn_set_fxmix (u8 voiceIdx, u8 dryAmt) |
| s32 | au_syn_get_playing (u8 voiceIdx) |
| s32 | au_syn_get_bus (u8 voiceIdx) |
| f32 | au_syn_get_pitch (u8 voiceIdx) |
| u8 | au_syn_get_pan (u8 voiceIdx) |
| s16 | au_syn_get_dryamt (u8 voiceIdx) |
| s16 | au_syn_get_wetamt (u8 voiceIdx) |
| s32 | au_syn_get_volume_left (u8 voiceIdx) |
| s32 | au_syn_get_volume_right (u8 voiceIdx) |
| void | au_set_delay_time (s32 arg0) |
| void | au_delay_left_channel (u8 arg0) |
| void | au_delay_right_channel (u8 arg0) |
| void | au_disable_channel_delay (void) |
| void | au_init_delay_channel (s16 arg0) |
| void * | alHeapAlloc (ALHeap *heap, s32 count, s32 size) |
| void | au_flush_finished_voices (AuGlobals *globals) |
| (UNUSED) Immediately flush all voices which have finished playing. | |
| void | au_init_voices (AuGlobals *globals) |
| Initializes all voices in the audio system. | |
| void | au_update_voices (AuGlobals *globals) |
| Main envelope system update, called once per frame. | |
| 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_start (AuVoice *voice, EnvelopeData *envData) |
| Starts a new voice with the given envelope data. | |
| u8 | au_voice_step (AuVoice *voice) |
| Parses and executes envelope commands until a time interval is found. | |
| void | au_voice_set_vol_changed (AuVoice *voice) |
| (UNUSED) Force recalculation of voice envelope volume during next update. | |
| Acmd * | au_pull_voice (AuPVoice *pvoice, Acmd *cmdBufPos) |
| void | au_fx_create (AuFX *fx, u8 mode, ALHeap *heap) |
| void | au_filter_create (AuFilter *filter, ALHeap *heap) |
| void | au_filter_init (AuFilter *filter, s16 arg1, s16 arg2, s16 fc) |
| void | au_fx_load_preset (AuFX *fx, u8 effectType) |
| Acmd * | au_pull_fx (AuFX *fx, Acmd *cmdBusPos, s16, s16) |
| Applies a chain of delay-line based effects to audio and mixes into output. | |
| s32 | au_fx_param_hdl (AuFX *fx, s16 index, s16 paramID, s32 value) |
| void * alHeapAlloc | ( | ALHeap * | heap, |
| s32 | count, | ||
| s32 | size ) |
| AuResult au_ambient_load | ( | u32 | arg0 | ) |
Referenced by snd_load_ambient().
| u16 au_bus_get_volume | ( | u8 | busID | ) |
| void au_bus_set_effect | ( | u8 | busID, |
| u8 | effectID ) |
Referenced by au_syn_begin_audio_frame().
| void au_bus_set_fx_params | ( | u8 | busID, |
| s16 | arg1, | ||
| s16 | arg2, | ||
| s32 | arg3 ) |
| void au_bus_set_volume | ( | u8 | busID, |
| u16 | value ) |
Referenced by au_fade_set_volume().
| void au_clear_instrument_group | ( | s32 | bankIndex, |
| BankSet | bankSet ) |
unused. resets all instruments in (bankIndex, bankSet) to default
| f32 au_compute_pitch_ratio | ( | s32 | tuning | ) |
Converts a linear pitch value (in cents) into a frequency ratio suitable for adjusting playback speed.
This function computes the playback rate corresponding to a pitch shift (up or down) in cents. Positive values increase pitch (higher frequency), and negative values decrease it. Recall 100 cents = 1 semitone, and therefore 1200 cents = 1 octave.
| tuning | The pitch offset in cents, from +4095 (~ 40.95 semitones up) to -16383 (~ 163.83 semitones down) |
Referenced by au_bgm_player_update_playing(), au_mseq_player_update(), and au_mseq_restore_voices().
| void au_copy_bytes | ( | s8 * | src, |
| s8 * | dest, | ||
| s32 | size ) |
| void au_copy_words | ( | void * | src, |
| void * | dst, | ||
| s32 | size ) |
Referenced by au_bgm_process_suspend(), au_bgm_restore_copied_player(), au_load_PER(), and au_load_PRG().
| void au_delay_left_channel | ( | u8 | arg0 | ) |
Referenced by au_syn_begin_audio_frame().
| void au_delay_right_channel | ( | u8 | arg0 | ) |
Referenced by au_syn_begin_audio_frame().
| void au_disable_channel_delay | ( | void | ) |
Referenced by au_syn_begin_audio_frame().
| void au_driver_init | ( | AuSynDriver * | driver, |
| ALConfig * | config ) |
Referenced by create_audio_system().
| void au_driver_release | ( | void | ) |
| void au_engine_init | ( | s32 | outputRate | ) |
Referenced by create_audio_system().
| void au_fade_calc_envelope | ( | Fade * | fade, |
| u32 | arg1, | ||
| s32 | target ) |
Referenced by au_bgm_adjust_volume().
| void au_fade_clear | ( | Fade * | fade | ) |
| void au_fade_flush | ( | Fade * | fade | ) |
Referenced by au_set_bus_volume_level().
| void au_fade_init | ( | Fade * | fade, |
| s32 | time, | ||
| s32 | startValue, | ||
| s32 | endValue ) |
Referenced by au_bgm_process_init_song(), au_bgm_restore_copied_player(), and au_sfx_init().
| void au_fade_set_envelope | ( | Fade * | fade, |
| s16 | value ) |
Referenced by au_bgm_player_init().
| void au_fade_set_volume | ( | u8 | arg0, |
| u16 | arg1, | ||
| s32 | arg2 ) |
Referenced by au_bgm_update_bus_volumes(), au_sfx_init(), and au_update_clients_for_audio_frame().
| void au_fade_update | ( | Fade * | fade | ) |
Referenced by au_update_clients_for_audio_frame().
| void au_fade_update_envelope | ( | Fade * | fade | ) |
Referenced by au_update_clients_for_audio_frame().
| AuResult au_fetch_SBN_file | ( | u32 | fileIdx, |
| AuFileFormat | format, | ||
| SBNFileEntry * | arg2 ) |
Referenced by au_engine_init(), au_load_BK_headers(), au_load_song_files(), and au_reload_song_files().
| void au_filter_create | ( | AuFilter * | filter, |
| ALHeap * | heap ) |
| void au_filter_init | ( | AuFilter * | filter, |
| s16 | arg1, | ||
| s16 | arg2, | ||
| s16 | fc ) |
Referenced by au_filter_create().
| void au_flush_finished_voices | ( | AuGlobals * | globals | ) |
(UNUSED) Immediately flush all voices which have finished playing.
These are normally released automatically during the start of each audio frame.
| void au_fx_create | ( | AuFX * | fx, |
| u8 | effectType, | ||
| ALHeap * | heap ) |
| effectType | from enum AuEffectType |
Referenced by au_driver_init().
| void au_fx_load_preset | ( | AuFX * | fx, |
| u8 | effectType ) |
Referenced by au_bus_set_effect(), and au_fx_create().
| s32 au_fx_param_hdl | ( | AuFX * | fx, |
| s16 | index, | ||
| s16 | paramID, | ||
| s32 | value ) |
Referenced by au_bus_set_fx_params().
| void au_get_bgm_player | ( | u32 | playerIndex, |
| BGMPlayer ** | outPlayer ) |
| void au_get_bgm_player_and_file | ( | u32 | playerIndex, |
| BGMHeader ** | outCurrentTrackData, | ||
| BGMPlayer ** | outPlayer ) |
Referenced by snd_song_load().
| InstrumentBank * au_get_BK_instruments | ( | BankSet | bankSet, |
| u32 | bankIndex ) |
Referenced by au_clear_instrument_group(), au_load_BK_to_bank(), and au_load_static_BK_to_bank().
| BGMPlayer * au_get_client_by_priority | ( | u8 | arg0 | ) |
Referenced by au_bgm_process_resume().
| s16 au_get_global_volume | ( | void | ) |
Referenced by nuAuPreNMIProc().
| Instrument * au_get_instrument | ( | AuGlobals * | globals, |
| BankSetIndex | bank, | ||
| s32 | patch, | ||
| EnvelopeData * | envData ) |
Note that bank is supplied as BankSetIndex and not BankSet, which means it will be used to perform a raw access into AuGlobals::bankSets.
This does not affect values above 3, but 1 and 2 differ.
Referenced by au_bgm_player_update_playing(), au_BGMCmd_E8_TrackOverridePatch(), au_BGMCmd_F5_UseInstrument(), and au_mseq_player_update().
| BGMPlayer * au_get_snapshot_by_index | ( | s32 | index | ) |
Referenced by au_bgm_process_resume(), and au_bgm_process_suspend().
| void au_init_delay_channel | ( | s16 | arg0 | ) |
Referenced by au_engine_init().
| void au_init_voices | ( | AuGlobals * | globals | ) |
Initializes all voices in the audio system.
Sets default values and clears previous envelope state.
Referenced by au_engine_init().
| s32 au_load_aux_bank | ( | s32 | bkFileOffset, |
| s32 | bankIndex ) |
Referenced by au_ambient_load(), au_load_BGM(), au_load_song_files(), and au_reload_song_files().
| 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.
Instruments in the bank will be configured to use DMA streaming for sample/codebook data. This is the standard loader for streamed instrument banks.
Referenced by au_load_aux_bank(), and au_load_BK_headers().
| void au_load_INIT | ( | AuGlobals * | arg0, |
| s32 | romAddr, | ||
| ALHeap * | heap ) |
Referenced by au_engine_init().
| void au_load_PER | ( | AuGlobals * | globals, |
| s32 | romAddr ) |
Referenced by au_engine_init().
| void au_load_PRG | ( | AuGlobals * | arg0, |
| s32 | romAddr ) |
Referenced by au_engine_init().
Referenced by snd_song_load().
| BKFileBuffer * au_load_static_BK_to_bank | ( | s32 * | inAddr, |
| void * | outAddr, | ||
| s32 | bankIndex, | ||
| BankSet | bankSet ) |
UNUSED Loads an instrument bank file from ROM to a given buffer (allocates if needed), and sets up instrument pointers.
Instruments are configured to always bypass DMA: sample and codebook data is assumed to be already present in RAM. Use this only for banks whose sample data is guaranteed to be preloaded, not for standard streaming.
| void au_memset | ( | void * | dst, |
| s32 | size, | ||
| u8 | value ) |
Referenced by au_mseq_manager_init(), and au_mseq_play_sequence().
| Acmd * au_pull_fx | ( | AuFX * | fx, |
| Acmd * | ptr, | ||
| s16 | wetDmem, | ||
| s16 | tempDmem ) |
Applies a chain of delay-line based effects to audio and mixes into output.
For each delay tap in the FX chain:
| fx | Pointer to FX state (delay taps, buffers, etc.) |
| ptr | Pointer to the current audio command list position. |
| wetDmem | DMEM offset to mix wet output into. |
| tempDmem | Base DMEM offset for temporary working buffers. |
Referenced by alAudioFrame().
| Acmd * au_pull_voice | ( | AuPVoice * | pvoice, |
| Acmd * | cmdBufPos ) |
Referenced by alAudioFrame().
| void au_pvoice_set_bus | ( | u8 | voiceIdx, |
| s8 | busID ) |
Referenced by au_engine_init().
| void au_read_rom | ( | s32 | romAddr, |
| void * | buffer, | ||
| u32 | size ) |
| void au_release_voice | ( | u8 | index | ) |
Referenced by au_pull_voice().
Referenced by au_bgm_process_resume().
| void au_reset_nonfree_voice | ( | AuVoice * | arg0, |
| u8 | arg1 ) |
| void au_reset_voice | ( | AuVoice * | voice, |
| u8 | voiceIdx ) |
| void au_set_bus_volume_level | ( | s32 | arg0, |
| u32 | idx ) |
Referenced by snd_set_bgm_volume(), and snd_set_sfx_volume().
| void au_set_delay_time | ( | s32 | arg0 | ) |
Referenced by au_syn_begin_audio_frame().
| void au_set_global_volume | ( | s16 | arg0 | ) |
Referenced by nuAuPreNMIProc().
| s32 au_set_reverb_type | ( | s32 | arg0, |
| s32 | arg1 ) |
Referenced by snd_set_sfx_reverb_type().
| void au_set_stereo_enabled | ( | b8 | enabled | ) |
Referenced by snd_set_mono(), and snd_set_stereo().
| void au_swizzle_BK_instruments | ( | s32 | bkFileOffset, |
| BKFileBuffer * | file, | ||
| InstrumentBank | instruments, | ||
| u32 | instrumentCount, | ||
| u8 | useDma ) |
Fixes up (swizzles) instrument pointers in a loaded bank, converting file-relative offsets to valid RAM pointers.
Sets whether each instrument uses DMA streaming or not, and updates pitch ratios to match output rate. Replaces nullptr instruments with a default instrument to ensure all loaded patches point to valid data.
Referenced by au_load_BK_to_bank(), and au_load_static_BK_to_bank().
| void au_syn_begin_audio_frame | ( | AuGlobals * | globals | ) |
Referenced by au_update_clients_for_audio_frame().
| s32 au_syn_get_bus | ( | u8 | voiceIdx | ) |
| s16 au_syn_get_dryamt | ( | u8 | voiceIdx | ) |
| u8 au_syn_get_pan | ( | u8 | voiceIdx | ) |
| f32 au_syn_get_pitch | ( | u8 | voiceIdx | ) |
| s32 au_syn_get_playing | ( | u8 | voiceIdx | ) |
| s32 au_syn_get_volume_left | ( | u8 | voiceIdx | ) |
| s32 au_syn_get_volume_right | ( | u8 | voiceIdx | ) |
| s16 au_syn_get_wetamt | ( | u8 | voiceIdx | ) |
| void au_syn_set_fxmix | ( | u8 | voiceIdx, |
| u8 | dryAmt ) |
| void au_syn_set_mixer_params | ( | u8 | voiceIdx, |
| s16 | volume, | ||
| s32 | arg2, | ||
| u8 | arg3, | ||
| u8 | arg4 ) |
Referenced by au_syn_begin_audio_frame().
| void au_syn_set_pan | ( | u8 | voiceIdx, |
| u8 | pan ) |
Referenced by alAudioFrame().
| void au_syn_set_pan_fxmix | ( | u8 | voiceIdx, |
| u8 | arg1, | ||
| u8 | arg2 ) |
Referenced by au_syn_begin_audio_frame().
| void au_syn_set_pitch | ( | u8 | voiceIdx, |
| f32 | pitchRatio ) |
Referenced by au_syn_begin_audio_frame().
| void au_syn_set_volume_delta | ( | u8 | voiceIdx, |
| s16 | arg1, | ||
| s32 | arg2 ) |
Referenced by au_reset_nonfree_voice(), and au_reset_voice().
| void au_syn_set_wavetable | ( | u8 | voiceIdx, |
| Instrument * | table ) |
Referenced by au_engine_init().
| void au_syn_start_voice | ( | u8 | index | ) |
| void au_syn_start_voice_params | ( | u8 | index, |
| u8 | reverbType, | ||
| Instrument * | table, | ||
| f32 | pitch, | ||
| s16 | vol, | ||
| u8 | pan, | ||
| u8 | fxMix, | ||
| s32 | delta ) |
Referenced by au_syn_begin_audio_frame().
| void au_syn_stop_voice | ( | u8 | voiceIdx | ) |
Referenced by au_flush_finished_voices(), and au_syn_begin_audio_frame().
| void au_sync_channel_delay_enabled | ( | u32 | arg0 | ) |
Referenced by snd_set_mono(), and snd_set_stereo().
| void au_update_clients_for_audio_frame | ( | void | ) |
this is called per audio frame generated by alAudioFrame (every 184 audio samples) there will be multiuple of these per video frame
this is called per audio frame generated by alAudioFrame (every 184 audio samples) there will be multiuple of these per video frame
Updates MSEQ, SFX, and BGM players for the current audio frame.
Referenced by alAudioFrame().
| void au_update_clients_for_video_frame | ( | void | ) |
this is called once per video frame update (50 or 60 times per second)
Referenced by alAudioFrame().
| void au_update_voices | ( | AuGlobals * | globals | ) |
Main envelope system update, called once per frame.
Progresses envelope state for all active voices.
Referenced by au_update_clients_for_audio_frame().
| void au_use_global_volume | ( | void | ) |
Referenced by nuAuPreNMIProc().
| void au_voice_after_volume_change | ( | AuVoice * | voice | ) |
Applies volume update after a client-side volume change.
This is deferred to avoid modifying envelope state mid-step.
Referenced by au_update_voices().
| s32 au_voice_get_delta | ( | s32 | usecs | ) |
Converts envelope step duration from microseconds to num samples delta.
Uses AU_FRAME_USEC as the base time slice, returning the number of audio samples corresponding to the provided duration.
| msecs | Time duration in microseconds. |
Referenced by au_update_voices(), au_voice_after_volume_change(), and au_voice_start().
| void au_voice_set_vol_changed | ( | AuVoice * | voice | ) |
(UNUSED) Force recalculation of voice envelope volume during next update.
| void au_voice_start | ( | AuVoice * | voice, |
| EnvelopeData * | envData ) |
Starts a new voice with the given envelope data.
Initializes envelope state and prepares the press phase for playback.
| voice | Pointer to the voice being started. |
| envData | Envelope command lists (press and release) to use. |
Referenced by au_syn_begin_audio_frame().
| u8 au_voice_step | ( | AuVoice * | voice | ) |
Parses and executes envelope commands until a time interval is found.
Commands include setting multipliers, loop control, etc.
Referenced by au_update_voices(), and au_voice_start().
| void create_audio_system | ( | void | ) |
Referenced by create_audio_system_obfuscated().
| s32 nuAuDmaCallBack | ( | s32 | addr, |
| s32 | len, | ||
| void * | state, | ||
| u8 | useDma ) |
DMA callback for audio sample streaming; manages a DMA buffer cache.
Referenced by nuAuDmaNew().
| void nuAuMgr | ( | void * | arg | ) |
Referenced by create_audio_system().