Alchemy
Loading...
Searching...
No Matches

sound.h

Go to the documentation of this file.
1#ifndef ALCHEMY_UNIT_SOUND_SOUND_H
2#define ALCHEMY_UNIT_SOUND_SOUND_H
3
4#include "types.h"
5
11void MusicCommand_SetPitch(u16 pitch);
12void Audio_SetWorkPairB(u16 targetScale, u16 step);
13void MusicCommand_SetVolume(s16 volume);
14void Audio_SetMusicVolumeTargetAndStep(u16 targetVolume, u16 step);
22
23#endif
UNUSED s32 AudioCommand_GetWidth(s32 command)
Returns the mixer preset chosen by the cue dispatcher.
Definition sound.c:299
void MusicCommand_SetPitchAndUpdateFrequency(u16 tempoScale)
Sets the BGM tempo scale directly; 0x100 preserves its native tempo.
Definition sound.c:228
void MusicCommand_SetPitch(u16 pitch)
Applies a pitch offset to every active BGM track.
Definition sound.c:234
s32 AudioCommand_GetStateByte(void)
Returns the remaining delay before BGM can be restored after a fanfare.
Definition sound.c:261
void AudioCommand_Play(s32 id)
Dispatches a packed cue: fade controls, allocated sound effects, fanfares, or background music with a...
Definition sound.c:33
void Audio_InitializeRuntimeDefaults(void)
Starts the sound driver, resets the BGM ramps (gMusicVolume and its kin) and clears all player cue re...
Definition sound.c:201
s32 AudioCommand_GetSecondaryStateByte(void)
Returns the last BGM cue or fade state selected by AudioCommand_Play.
Definition sound.c:281
void AudioCommand_WaitForCompletion(void)
Waits a frame at a time for fanfare restoration, giving up after 300 frames.
Definition sound.c:286
void AudioCommand_ResumeAllPlayers(void)
Definition sound.c:266
void Audio_SetMusicVolumeTargetAndStep(u16 targetVolume, u16 step)
Sets the BGM volume target and its per-frame adjustment.
Definition sound.c:255
void MusicCommand_SetVolume(s16 volume)
Sets BGM volume immediately and cancels any outstanding volume ramp.
Definition sound.c:247
void AudioTest_RunParameterController(void)
Runs the audio test's three cue selectors and five mixer presets forever.
Definition sound.c:138
void Audio_SetWorkPairB(u16 targetScale, u16 step)
Sets the target and per-frame step of the combined BGM tempo/pitch ramp.
Definition sound.c:240
void AudioCommand_StopAllPlayers(void)
Stops every sound player while preserving its state for a later resume.
Definition sound.c:264
void AudioCommand_UpdateToggleMask(u32 command)
Replaces the audio command mask, or toggles its requested bits when flagged.
Definition sound.c:270
void MusicPlayer_StepVolumeAndPitchTowardTargets(void)
Restores BGM after a fanfare and steps its volume and combined tempo/pitch ramps once per VBlank,...
Definition sound.c:92
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13