Macros | |
#define | SBN_ROM_OFFSET 0xF00000 |
#define | TUNE_SCALING_ARR_AMPLIFY_FINE 0 |
#define | TUNE_SCALING_ARR_AMPLIFY_COARSE 128 |
#define | TUNE_SCALING_ARR_ATTENUATE_FINE 160 |
#define | TUNE_SCALING_ARR_ATTENUATE_COARSE 288 |
#define | SBN_EXTRA_LOOKUP(i, fmt, e) (au_fetch_SBN_file(globals->extraFileList[AmbientSoundIDtoMSEQFileIndex[i]], fmt, &e)) |
#define | AL_HEADER_SIG_BK 0x424B |
#define | AL_HEADER_SIG_CR 0x4352 |
#define | AL_HEADER_SIG_DR 0x4452 |
#define | AL_HEADER_SIG_SR 0x5352 |
Enumerations | |
enum | BKParseState { BK_READ_DONE = 0 , BK_READ_FETCH_HEADER = 11 , BK_READ_FETCH_DATA = 21 , BK_READ_SWIZZLE = 31 , BK_READ_PROCESS_CR = 101 , BK_READ_SWIZZLE_CR = 111 , BK_READ_PROCESS_DR = 201 , BK_READ_UNK_DR = 211 , BK_READ_PROCESS_SR = 301 , BK_READ_UNK_SR = 311 } |
Variables | |
AuCallback | BeginSoundUpdateCallback |
BGMPlayer * | gBGMPlayerA |
BGMPlayer * | gBGMPlayerB |
BGMPlayer * | gBGMPlayerC |
SoundManager * | gSoundManager |
AuGlobals * | gSoundGlobals |
AmbienceManager * | gAuAmbienceManager |
u16 | PerceptualVolumeLevels [9] |
Volume steps use squared values so each level represents linear power increase, matching loudness perception. | |
u8 | EnvelopePressDefault [] |
u8 | EnvelopeReleaseDefault [] |
f32 | AlTuneScaling [] |
#define AL_HEADER_SIG_BK 0x424B |
Referenced by au_load_BK_to_bank(), and au_load_static_BK_to_bank().
#define AL_HEADER_SIG_CR 0x4352 |
Referenced by au_load_BK_to_bank(), and au_load_static_BK_to_bank().
#define AL_HEADER_SIG_DR 0x4452 |
Referenced by au_load_BK_to_bank().
#define AL_HEADER_SIG_SR 0x5352 |
Referenced by au_load_BK_to_bank().
#define SBN_EXTRA_LOOKUP | ( | i, | |
fmt, | |||
e ) (au_fetch_SBN_file(globals->extraFileList[AmbientSoundIDtoMSEQFileIndex[i]], fmt, &e)) |
Referenced by au_ambient_load().
#define SBN_ROM_OFFSET 0xF00000 |
Referenced by au_engine_init().
#define TUNE_SCALING_ARR_AMPLIFY_COARSE 128 |
Referenced by au_compute_pitch_ratio().
#define TUNE_SCALING_ARR_AMPLIFY_FINE 0 |
Referenced by au_compute_pitch_ratio().
#define TUNE_SCALING_ARR_ATTENUATE_COARSE 288 |
Referenced by au_compute_pitch_ratio().
#define TUNE_SCALING_ARR_ATTENUATE_FINE 160 |
Referenced by au_compute_pitch_ratio().
Referenced by snd_load_ambient().
unused. resets all instruments in (bankIndex, bankSet) to default
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().
Referenced by au_bgm_process_suspend(), au_bgm_restore_copied_player(), au_load_PER(), and au_load_PRG().
Referenced by create_audio_system().
Referenced by au_bgm_adjust_volume().
Referenced by au_set_bus_volume_level().
Referenced by au_bgm_process_init_song(), au_bgm_restore_copied_player(), and au_sfx_init().
Referenced by au_bgm_player_init().
Referenced by au_bgm_update_bus_volumes(), au_sfx_init(), and au_update_clients_for_audio_frame().
Referenced by au_update_clients_for_audio_frame().
Referenced by au_update_clients_for_audio_frame().
AuResult au_fetch_SBN_file | ( | u32 | fileIdx, |
AuFileFormat | format, | ||
SBNFileEntry * | outEntry ) |
Referenced by au_engine_init(), au_load_BK_headers(), au_load_song_files(), and au_reload_song_files().
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().
Referenced by au_bgm_process_resume().
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().
Referenced by au_bgm_process_resume(), and au_bgm_process_suspend().
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().
Referenced by au_engine_init().
Referenced by au_engine_init().
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.
Referenced by au_mseq_manager_init(), and au_mseq_play_sequence().
Referenced by au_pull_voice().
Referenced by au_bgm_process_resume().
Referenced by snd_set_bgm_volume(), and snd_set_sfx_volume().
Referenced by snd_set_sfx_reverb_type().
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 NULL 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().
Referenced by au_update_clients_for_audio_frame().
Referenced by snd_set_mono(), and snd_set_stereo().
Called exactly once per audio frame (every 5.75ms at 32kHz).
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().
this is called once per video frame update (50 or 60 times per second)
Referenced by alAudioFrame().
|
extern |
Referenced by au_compute_pitch_ratio().
AuCallback BeginSoundUpdateCallback |
Referenced by au_update_clients_for_video_frame().
|
extern |
Referenced by au_get_instrument().
|
extern |
AmbienceManager* gAuAmbienceManager |
Referenced by au_ambient_load(), au_engine_init(), and au_update_clients_for_audio_frame().
BGMPlayer* gBGMPlayerA |
BGMPlayer* gBGMPlayerB |
BGMPlayer* gBGMPlayerC |
Referenced by au_engine_init().
AuGlobals* gSoundGlobals |
Referenced by au_ambient_load(), au_clear_instrument_group(), au_engine_init(), au_fetch_SBN_file(), au_get_bgm_player_and_file(), au_get_BK_instruments(), au_get_snapshot_by_index(), au_load_aux_bank(), au_load_BGM(), au_load_song_files(), au_release_voice(), au_reload_song_files(), au_swizzle_BK_instruments(), au_sync_channel_delay_enabled(), au_update_clients_for_audio_frame(), and au_update_clients_for_video_frame().
SoundManager* gSoundManager |
|
extern |
Volume steps use squared values so each level represents linear power increase, matching loudness perception.
This makes each step sound evenly spaced.
Referenced by au_set_bus_volume_level().