139 s32 cues[3] = {0, 80, 100};
166 preset = (preset + 1) % 5;
223 }
while (remaining >= 0);
287 s32 framesWaited = 0;
UNUSED void Audio_ResumeAllPlayers(void)
Resumes every player. Nothing in ☀️ calls it.
void Audio_PlaySound(u16 songId)
Starts the song on the player selected by its song-table entry.
void Audio_Initialize(void)
Copies the RAM mixer to IWRAM, initializes the PCM and CGB paths and configures every player from gSo...
const struct PlayerSlot gSound_PlayerSlots[]
void MusicPlayer_StartSong(struct SoundPlayer *player, const struct SequenceHeader *header)
Starts a song when its priority permits, resetting its tracks and tempo.
UNUSED void Audio_StopAllPlayers(void)
Stops every player. Nothing in ☀️ calls it.
void MusicPlayer_FadeOut(struct SoundPlayer *player, u16 speed)
Begins the standard stop-and-clear fade.
const struct SongEntry gSound_SongTable[]
Declares nothing of its own: it only includes audio_engine_symbols.h and sound/audio_engine_types....
The sound driver's command masks, cue controls and the routines and globals it shares with the engine...
struct SoundPlayer gSound_Player3
struct SoundPlayer gMusicPlayerFanfare
struct SoundPlayer gMusicPlayerBgm
u16 gMusicPlayerVolumes[8]
The sound driver's types, registers and work.
The engine calls the debug menus import, and their palette swatch tiles.
void MusicPlayer_SetPitch(struct SoundPlayer *player, u16 mask, s16 pitch)
Sets the semitone and fractional pitch offsets of selected active tracks and marks their pitch for re...
void MusicPlayer_SetPitchAndUpdateFrequency(struct SoundPlayer *player, u16 scale)
Sets the tempo multiplier and updates the number of ticks advanced per frame.
void MusicPlayer_SetVolume(struct SoundPlayer *player, u16 mask, u16 volume)
Sets the volume scale of active tracks selected by the bit mask and marks their output for recalculat...
s32 Sound_LoadPresetParameters(s32 preset)
Copies the mixer code for sound preset preset (0 to 4; anything else is 0) from ROM into IwramSoundPr...
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
The screen blend's globals and the graphics routines.
The hardware's I/O registers and their bits, as pret names them.
The keypad state the VBlank interrupt keeps.
volatile u32 gKeysRepeat
Pressed keys, repeating while held: after 19 frames, then every 6.
The reel game's title lettering.
Song and sound effect ids, indices into gSound_SongTable.
void Sound_TickDmaRestartTimer(void)
s32 gBuildStamp[]
The build stamp System_CopyBuildStamp copies to IWRAM at power-on: twelve digits and a zero word,...
@ MUSIC_DEFAULT_RAMP_STEP
@ MUSIC_WAIT_TIMEOUT_FRAMES
@ MUSIC_RESTORE_DELAY_FRAMES
UNUSED s32 AudioCommand_GetWidth(s32 command)
Returns the mixer preset chosen by the cue dispatcher.
void MusicCommand_SetPitchAndUpdateFrequency(u16 tempoScale)
Sets the BGM tempo scale directly; 0x100 preserves its native tempo.
void MusicCommand_SetPitch(u16 pitch)
Applies a pitch offset to every active BGM track.
s32 AudioCommand_GetStateByte(void)
Returns the remaining delay before BGM can be restored after a fanfare.
void AudioCommand_Play(s32 id)
Dispatches a packed cue: fade controls, allocated sound effects, fanfares, or background music with a...
void Audio_InitializeRuntimeDefaults(void)
Starts the sound driver, resets the BGM ramps (gMusicVolume and its kin) and clears all player cue re...
s32 AudioCommand_GetSecondaryStateByte(void)
Returns the last BGM cue or fade state selected by AudioCommand_Play.
void AudioCommand_WaitForCompletion(void)
Waits a frame at a time for fanfare restoration, giving up after 300 frames.
void AudioCommand_ResumeAllPlayers(void)
void Audio_SetMusicVolumeTargetAndStep(u16 targetVolume, u16 step)
Sets the BGM volume target and its per-frame adjustment.
void MusicCommand_SetVolume(s16 volume)
Sets BGM volume immediately and cancels any outstanding volume ramp.
void AudioTest_RunParameterController(void)
Runs the audio test's three cue selectors and five mixer presets forever.
void Audio_SetWorkPairB(u16 targetScale, u16 step)
Sets the target and per-frame step of the combined BGM tempo/pitch ramp.
void AudioCommand_StopAllPlayers(void)
Stops every sound player while preserving its state for a later resume.
void AudioCommand_UpdateToggleMask(u32 command)
Replaces the audio command mask, or toggles its requested bits when flagged.
void MusicPlayer_StepVolumeAndPitchTowardTargets(void)
Restores BGM after a fanfare and steps its volume and combined tempo/pitch ramps once per VBlank,...
u16 slot
Index into gSound_PlayerSlots; AudioCommand_Play gives slot 7's songs the first player from 7 down to...
u32 status
bits: 31 paused | 15..0 tracks active after the last tick.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
The integer types, TRUE, UNUSED and the fixed-address macros.