include/sound/sound_driver_symbols.h
What the game sets over the sound driver: the music's player, the sound numbers sySoundPlay takes and their ranges, the music players by row, the mixer's reverb codes, and the music's volume and tempo ramps.
Included by battle_internal.h, lobby.c, sound.c, sound_test.c and system_internal.h.
Structures
| Name | Description | |
|---|---|---|
struct | SoundVBlankState | How the tick wait and the VBlank handler share the sound driver's update, so that it runs once a VBlank, from whichever reaches it first. |
Macros
| Name | Description | |
|---|---|---|
#define | SOUND_MODE_FREQ_GAME 0x00090000 | Rate 9, 31536 samples a second, as the rate bits of a sound mode word (SOUND_MODE_FREQ): the rate sySoundInit fixes for the game (pret's SOUND_MODE_FREQ_31536). |
Enumerations
| Name | Description | |
|---|---|---|
enum | AudioCommandMask { AUDIO_COMMAND_TOGGLE, AUDIO_COMMAND_MASK } | sySoundUpdateCommandMask's command: the new SoundCommandMask, or with AUDIO_COMMAND_TOGGLE the bits to flip in it. |
enum | SoundControl { SOUND_NUM_MASK, SOUND_FLAGS_MASK, SOUND_FLAG_FADE_IN, SOUND_ … } | A sound for sySoundPlay: bits 11..0 the sound number, 15..12 flags. |
enum | MusicPlayerId { MUSIC_PLAYER_JINGLE, MUSIC_PLAYER_BGM, MUSIC_PLAYER_MENU_SE, … } | The music players by their row in MPlayTable (sound/music_player_table.c), as a song table row names them (Song.slot). |
enum | SoundReverbCode { SOUND_REVERB_MONO, SOUND_REVERB_CROSSED, SOUND_REVERB_NORMAL … } | The mixer's reverb codes. |
Description
What the game sets over the sound driver: the music's player, the sound
numbers sySoundPlay takes and their ranges, the music players by row, the
mixer's reverb codes, and the music's volume and tempo ramps.
Macros in detail
SOUND_MODE_FREQ_GAME
#define SOUND_MODE_FREQ_GAME 0x00090000
Rate 9, 31536 samples a second, as the rate bits of a sound mode word
(SOUND_MODE_FREQ): the rate sySoundInit fixes for the game (pret's
SOUND_MODE_FREQ_31536).
Referenced by sySoundInit().
Definition at line 25 of file sound_driver_symbols.h.
Enumerations in detail
AudioCommandMask
enum AudioCommandMask
sySoundUpdateCommandMask's command: the new SoundCommandMask, or with
AUDIO_COMMAND_TOGGLE the bits to flip in it. Nothing sends one.
| Enumerator | Value | Description |
|---|---|---|
AUDIO_COMMAND_TOGGLE | 0x80 | |
AUDIO_COMMAND_MASK | 0x7f |
Definition at line 16 of file sound_driver_symbols.h.
SoundControl
enum SoundControl
A sound for sySoundPlay: bits 11..0 the sound number, 15..12 flags.
SOUND_FADE_OUT_BGM, SOUND_KEEP_BGM, SOUND_FADE_OUT_ACTION_SE and
SOUND_FADE_OUT_EXIT_SE are rows of the song table, in sounds.h.
| Enumerator | Value | Description |
|---|---|---|
SOUND_NUM_MASK | 0xfff | |
SOUND_FLAGS_MASK | 0xf000 | |
SOUND_FLAG_FADE_IN | 0x1000 | Music fades in over 64 frames. |
SOUND_JINGLE_FIRST | MUS_PUZZLE_SOLVED | Sounds from here to SOUND_SE_FIRST are jingles; those below are music, but for SOUND_FADE_OUT_BGM and SOUND_KEEP_BGM. |
SOUND_SE_FIRST | SE_BELL | Sounds from here to SOUND_SE_END, but for the two fades, each play on the player SongTable names for them. |
SOUND_SE_END | MUS_VILLAGE_THEME | Sounds from here on are music again. |
Definition at line 30 of file sound_driver_symbols.h.
MusicPlayerId
enum MusicPlayerId
The music players by their row in MPlayTable (sound/music_player_table.c), as
a song table row names them (Song.slot). A sound on MUSIC_PLAYER_SE_LAST
takes the first idle player from there down to MUSIC_PLAYER_SE_FIRST, else
MUSIC_PLAYER_SE_LAST itself (sySoundPlay).
| Enumerator | Value | Description |
|---|---|---|
MUSIC_PLAYER_JINGLE | 0 | MPlayInfoJingle |
MUSIC_PLAYER_BGM | 1 | MPlayInfoBGM |
MUSIC_PLAYER_MENU_SE | 2 | MPlayInfoMenuSE |
MUSIC_PLAYER_ACTION_SE | 3 | MPlayInfoActionSE |
MUSIC_PLAYER_SE_FIRST | 4 | lowest player MUSIC_PLAYER_SE_LAST may borrow |
MUSIC_PLAYER_SE5 | 5 | MPlayInfoSE5 |
MUSIC_PLAYER_SE_LAST | 7 | borrows first idle player down to MUSIC_PLAYER_SE_FIRST |
Definition at line 52 of file sound_driver_symbols.h.
SoundReverbCode
enum SoundReverbCode
The mixer's reverb codes. sySoundLoadReverbCode loads none of them, and
sySoundGetReverbCode gives every music SOUND_REVERB_LONG.
| Enumerator | Value | Description |
|---|---|---|
SOUND_REVERB_MONO | ||
SOUND_REVERB_CROSSED | ||
SOUND_REVERB_NORMAL | ||
SOUND_REVERB_LONG | ||
SOUND_REVERB_NONE |
Definition at line 66 of file sound_driver_symbols.h.