void MusicPlayer_Initialize(struct SoundPlayer *player, struct SoundTrack *tracks, u8 count)
Deactivates up to sixteen tracks and links the player into the mixer tick chain.
void MusicTrack_SetLfoSpeedFromCommand(struct SoundPlayer *player, struct SoundTrack *track)
struct SoundWork gSound_Work
void AudioEngine_Initialize(struct SoundWork *work)
Resets the sound hardware, clears the whole sound work block and installs the default PCM driver: sto...
void MusicTrack_ReleaseKey(struct SoundPlayer *player, struct SoundTrack *track)
void MusicTrack_OperateWorkByte(struct SoundPlayer *player, struct SoundTrack *track)
Executes a work-byte operation and consumes a branch address for comparisons.
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 AudioEngine_SetPcmRate(u32 mode)
Sets the PCM frame length (mode bits 16 to 19 pick a gSound_FrameLengths entry) and the rates derived...
void Cgb_UpdateChannels(void)
Steps CGB note envelopes and writes changed pitch, volume and trigger registers, once a frame.
void Audio_Initialize(void)
Copies the RAM mixer to IWRAM, initializes the PCM and CGB paths and configures every player from gSo...
void MusicTrack_CalcOutput(struct SoundPlayer *player, struct SoundTrack *track)
Recalculates dirty stereo volumes and pitch from track settings and modulation.
u32 Audio_UmulHigh32(u32 left, u32 right)
void CgbChannel_Mute(u8 channel)
Disables one CGB channel using its envelope or wave-control register.
void AudioEngine_RunMixerTick(void)
void MusicPlayer_Stop(struct SoundPlayer *player)
Pauses this player and stops all of its tracks, under the player's lock.
void MusicPlayer_StepFade(struct SoundPlayer *player)
Advances a due fade step, updating active track volumes, or at the end of a fade out stops (or pauses...
s32 Cgb_KeyToFrequency(u8 kind, u8 key, u8 fine)
Converts a key and fractional pitch to a CGB tone or noise-register value.
UNUSED void Audio_StopAllPlayers(void)
Stops every player. Nothing in ☀️ calls it.
void MusicTrack_Stop(struct SoundPlayer *player, struct SoundTrack *track)
u32 gSound_PcmFrequencySteps[]
Frequencies by note at octave zero, in 32-bit fixed point.
void AudioEngine_SetMode(u32 mode)
Applies the reverb, channel-count, volume, bias and sample-rate fields of mode to the sound work,...
void MusicPlayer_BeginFadeOut(struct SoundPlayer *player, u16 speed)
Begins a fade that stops and clears tracks when its volume reaches zero.
void MusicTrack_SetModulationFromCommand(struct SoundPlayer *player, struct SoundTrack *track)
u8 gSound_PcmPitchCodes[]
PCM pitches: the high four bits hold the octave, the low four the note.
void Audio_ResumePlayer(struct SoundPlayer *player)
Clears the player's paused flag while holding the player lock.
The sound driver's types, registers and work.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
const u16 gSound_FrameLengths[]
Samples per frame for each playback frequency setting.
const u8 gSound_CgbPitchCodes[]
CGB channel pitches.
const u8 gSound_Cgb3LevelCodes[]
CGB channel 3 waveform volumes.
void MusicTrack_HandleNote(u32 command, struct SoundPlayer *player, struct SoundTrack *track)
const s16 gSound_CgbFrequencySteps[]
Frequencies by note for CGB channels.
const u8 gSound_NoisePitchCodes[]
Noise channel pitches.
void AudioEngine_SuspendDirectSound(void)
Stops both FIFO transfers and clears their sample buffers, raising the work's lock until AudioEngine_...
void MusicPlayer_Tick(struct SoundPlayer *player)
void AudioEngine_ResumeDirectSound(void)
Restarts both FIFO transfers and releases the suspended-work lock.
void Sound_TickDmaRestartTimer(void)
s32 gBuildStamp[]
The build stamp System_CopyBuildStamp copies to IWRAM at power-on: twelve digits and a zero word,...
A player, which plays one song: its header and status, its tracks, its tempo and fade.
A track of a playing song: the song commands it runs, its voice and notes, and the pitch,...
The sound driver's work: its lock, the mixer's rate and buffers, the PCM and CGB notes,...
The integer types, TRUE, UNUSED and the fixed-address macros.