Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
sound.c File Reference
#include "engine/game.h"
#include "libsnd.h"
Include dependency graph for sound.c:

Go to the source code of this file.

Functions

s32 findSoundBank (s32 id)
 The slot (0-2) that holds bank id, or -1.
 
short playSound (s32 packed)
 Plays a packed sound id (see engine/sound.h); returns the voice of a key-on.
 
void stopAllSounds (void)
 Stops every track of the loaded banks and every voice.
 
void stopSound (s32 packed)
 Stops a sequence sound (key-on sounds are left alone)
 
void fadeOutSound (s32 packed)
 Fades a sequence sound out over a second (key-on sounds are left alone)
 
s32 isSoundLoading (void)
 Whether a bank is still being loaded.
 
void loadSoundBankInto (s32 slot, s32 id)
 Closes what slot slot holds and starts loading bank id into it.
 
void loadSoundBank (s32 id)
 Loads a bank into slot 1 or 2, whichever was not used last.
 
void updateSoundLoading (void)
 Header: copied to the slot's buffer, then the body goes to the SPU.
 
short soundKeyOn (s32 slot, short prog, short note)
 Plays one note of a program from the bank in slot slot; returns the voice.
 
void soundKeyOff (s32 packed, s16 voice)
 Releases the voice that a key-on sound id started.
 
void initSound (void)
 Starts libsnd, gives each slot its buffers and loads the system sounds (bank 1) into slot 0.
 

Variables

SoundFiles SOUND_FILES_01 = {384, 371, 0x1730000, 0x1800000, {0x1730001, 0x1730002, 0}}
 Each bank's files (SOUND_BANK_FILES[id]), numbered in the Japanese disc as in the USA one.
 
SoundFiles SOUND_FILES_02 = {375, 362, 0x16A0000, 0x1770000, {0x16A0001, 0}}
 
SoundFiles SOUND_FILES_03 = {1138, 1136, 0x4700000, 0x4720000, {0x4700001, 0}}
 
SoundFiles SOUND_FILES_04 = {376, 363, 0x16B0000, 0x1780000, {0x16B0001, 0}}
 
SoundFiles SOUND_FILES_05 = {377, 364, 0x16C0000, 0x1790000, {0x16C0001, 0}}
 
SoundFiles SOUND_FILES_06 = {529, 527, 0x20F0000, 0x2110000, {0x20F0001, 0}}
 
SoundFiles SOUND_FILES_07 = {378, 365, 0x16D0000, 0x17A0000, {0x16D0001, 0}}
 
SoundFiles SOUND_FILES_08 = {379, 366, 0x16E0000, 0x17B0000, {0x16E0001, 0}}
 
SoundFiles SOUND_FILES_09 = {380, 367, 0x16F0000, 0x17C0000, {0x16F0001, 0}}
 
SoundFiles SOUND_FILES_0A = {537, 534, 0x2160000, 0x2190000, {0x2160001, 0}}
 
SoundFiles SOUND_FILES_0B = {381, 368, 0x1700000, 0x17D0000, {0x1700001, 0}}
 
SoundFiles SOUND_FILES_0C = {382, 369, 0x1710000, 0x17E0000, {0x1710001, 0}}
 
SoundFiles SOUND_FILES_0D = {555, 549, 0x2250000, 0x22B0000, {0x2250001, 0}}
 
SoundFiles SOUND_FILES_0E = {568, 567, 0x2370000, 0x2380000, {0x2370001, 0}}
 
SoundFiles SOUND_FILES_0F = {578, 577, 0x2410000, 0x2420000, {0x2410001, 0}}
 
SoundFiles SOUND_FILES_10 = {583, 582, 0x2460000, 0x2470000, {0x2460001, 0}}
 
SoundFiles SOUND_FILES_11 = {603, 602, 0x25A0000, 0x25B0000, {0x25A0001, 0}}
 
SoundFiles SOUND_FILES_12 = {609, 608, 0x2600000, 0x2610000, {0x2600001, 0}}
 
SoundFiles SOUND_FILES_13 = {665, 664, 0x2980000, 0x2990000, {0x2980001, 0}}
 
SoundFiles SOUND_FILES_14 = {628, 627, 0x2730000, 0x2740000, {0x2730001, 0}}
 
SoundFiles SOUND_FILES_15 = {716, 712, 0x2C80000, 0x2CC0000, {0x2C80001, 0}}
 
SoundFiles SOUND_FILES_16 = {532, 531, 0x2130000, 0x2140000, {0x2130001, 0}}
 
SoundFiles SOUND_FILES_17 = {820, 819, 0x3330000, 0x3340000, {0x3330001, 0}}
 
SoundFiles SOUND_FILES_18 = {556, 551, 0x2270000, 0x22C0000, {0x2270001, 0}}
 
SoundFiles SOUND_FILES_19 = {717, 713, 0x2C90000, 0x2CD0000, {0x2C90001, 0}}
 
SoundFiles SOUND_FILES_1A = {718, 714, 0x2CA0000, 0x2CE0000, {0x2CA0001, 0}}
 
SoundFiles SOUND_FILES_1B = {383, 370, 0x1720000, 0x17F0000, {0x1720001, 0}}
 
SoundFiles SOUND_FILES_1C = {1080, 1078, 0x4360000, 0x4380000, {0x4360001, 0}}
 
SoundFiles SOUND_FILES_1D = {636, 635, 0x27B0000, 0x27C0000, {0x27B0001, 0}}
 
SoundFiles SOUND_FILES_1E = {719, 715, 0x2CB0000, 0x2CF0000, {0x2CB0001, 0}}
 
SoundFiles SOUND_FILES_1F = {530, 528, 0x2100000, 0x2120000, {0x2100001, 0}}
 
SoundFiles SOUND_FILES_20 = {515, 513, 0x2010000, 0x2030000, {0x2010001, 0}}
 
SoundFiles SOUND_FILES_21 = {735, 734, 0x2DE0000, 0x2DF0000, {0x2DE0001, 0}}
 
SoundFiles SOUND_FILES_22 = {557, 552, 0x2280000, 0x22D0000, {0x2280001, 0}}
 
SoundFiles SOUND_FILES_23 = {1139, 1137, 0x4710000, 0x4730000, {0x4710001, 0}}
 
SoundFiles SOUND_FILES_24 = {1376, 1375, 0x55F0000, 0x5600000, {0x55F0001, 0}}
 
SoundFiles SOUND_FILES_25 = {1994, 1964, 0x7AC0000, 0x7CA0000, {0x7AC0001, 0}}
 
SoundFiles SOUND_FILES_26 = {1995, 1991, 0x7C70000, 0x7CB0000, {0x7C70001, 0}}
 
SoundFiles SOUND_FILES_27 = {1116, 1115, 0x45B0000, 0x45C0000, {0x45B0001, 0}}
 
SoundFiles SOUND_FILES_28 = {1227, 1226, 0x4CA0000, 0x4CB0000, {0x4CA0001, 0}}
 
SoundFiles SOUND_FILES_29 = {385, 372, 0x1740000, 0x1810000, {0x1740001, 0}}
 
SoundFiles SOUND_FILES_2A = {864, 862, 0x35E0000, 0x3600000, {0x35E0001, 0}}
 
SoundFiles SOUND_FILES_2B = {865, 863, 0x35F0000, 0x3610000, {0x35F0001, 0}}
 
SoundFiles SOUND_FILES_2C = {558, 553, 0x2290000, 0x22E0000, {0x2290001, 0}}
 
SoundFiles SOUND_FILES_2D = {386, 373, 0x1750000, 0x1820000, {0x1750001, 0}}
 
SoundFiles SOUND_FILES_2E = {897, 895, 0x37F0000, 0x3810000, {0x37F0001, 0}}
 
SoundFiles SOUND_FILES_2F = {898, 896, 0x3800000, 0x3820000, {0x3800001, 0}}
 
SoundFiles SOUND_FILES_30 = {943, 938, 0x3AA0000, 0x3AF0000, {0x3AA0001, 0}}
 
SoundFiles SOUND_FILES_31 = {944, 939, 0x3AB0000, 0x3B00000, {0x3AB0001, 0}}
 
SoundFiles SOUND_FILES_32 = {387, 374, 0x1760000, 0x1830000, {0x1760001, 0}}
 
SoundFiles SOUND_FILES_33 = {516, 514, 0x2020000, 0x2040000, {0x2020001, 0}}
 
SoundFiles SOUND_FILES_34 = {945, 940, 0x3AC0000, 0x3B10000, {0x3AC0001, 0}}
 
SoundFiles SOUND_FILES_35 = {946, 941, 0x3AD0000, 0x3B20000, {0x3AD0001, 0}}
 
SoundFiles SOUND_FILES_36 = {947, 942, 0x3AE0000, 0x3B30000, {0x3AE0001, 0}}
 
SoundFiles SOUND_FILES_37 = {958, 955, 0x3BB0000, 0x3BE0000, {0x3BB0001, 0}}
 
SoundFiles SOUND_FILES_38 = {959, 956, 0x3BC0000, 0x3BF0000, {0x3BC0001, 0}}
 
SoundFiles SOUND_FILES_39 = {960, 957, 0x3BD0000, 0x3C00000, {0x3BD0001, 0}}
 
SoundFiles SOUND_FILES_3A = {1014, 1008, 0x3F00000, 0x3F60000, {0x3F00001, 0}}
 
SoundFiles SOUND_FILES_3B = {1015, 1009, 0x3F10000, 0x3F70000, {0x3F10001, 0}}
 
SoundFiles SOUND_FILES_3C = {1016, 1010, 0x3F20000, 0x3F80000, {0x3F20001, 0}}
 
SoundFiles SOUND_FILES_3D = {1017, 1011, 0x3F30000, 0x3F90000, {0x3F30001, 0}}
 
SoundFiles SOUND_FILES_3E = {1018, 1012, 0x3F40000, 0x3FA0000, {0x3F40001, 0}}
 
SoundFiles SOUND_FILES_3F = {1019, 1013, 0x3F50000, 0x3FB0000, {0x3F50001, 0}}
 
SoundFiles SOUND_FILES_40 = {1081, 1079, 0x4370000, 0x4390000, {0x4370001, 0}}
 
SoundFiles SOUND_FILES_41 = {1594, 1593, 0x6390000, 0x63A0000, {0x6390001, 0}}
 
SoundFiles SOUND_FILES_42 = {559, 554, 0x22A0000, 0x22F0000, {0x22A0001, 0}}
 
SoundFiles SOUND_FILES_43 = {1954, 1953, 0x7A10000, 0x7A20000, {0x7A10001, 0}}
 
SoundFiles SOUND_FILES_44 = {2104, 2103, 0x8370000, 0x8380000, {0x8370001, 0}}
 
SoundFiles SOUND_FILES_45 = {1842, 1840, 0x7300000, 0x7320000, {0x7300001, 0}}
 
SoundFiles SOUND_FILES_46 = {1843, 1841, 0x7310000, 0x7330000, {0x7310001, 0}}
 
SoundFiles SOUND_FILES_47 = {2203, 2202, 0x89A0001, 0x89B0000, {0x89A0000, 0}}
 
SoundFiles * SOUND_BANK_FILES [72]
 The banks by id: bits 18-24 of a sound id.
 
s32 SOUND_HEAD_BUFFER_0 [14336]
 Each slot's buffer for the VAB header and the SEPs, in this unit's .bss (see the Makefile)
 
s32 SOUND_HEAD_BUFFER_1 [10240]
 
s32 SOUND_HEAD_BUFFER_2 [10240]
 
void * SOUND_HEAD_BUFFERS [3] = {SOUND_HEAD_BUFFER_0, SOUND_HEAD_BUFFER_1, SOUND_HEAD_BUFFER_2}
 Each slot's buffer, and its SPU address.
 
s32 SOUND_SPU_ADDRS [3] = {0x1010, 0x49C10, 0x62410}
 
SoundState SOUND
 rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall in seqTable
 

Function Documentation

◆ findSoundBank()

s32 findSoundBank ( s32  id)

The slot (0-2) that holds bank id, or -1.

Definition at line 200 of file sound.c.

Referenced by fadeOutSound(), playSound(), soundKeyOff(), and stopSound().

Here is the caller graph for this function:

◆ playSound()

short playSound ( s32  packed)

Plays a packed sound id (see engine/sound.h); returns the voice of a key-on.

Definition at line 212 of file sound.c.

Here is the call graph for this function:

◆ stopAllSounds()

void stopAllSounds ( void  )

Stops every track of the loaded banks and every voice.

Definition at line 251 of file sound.c.

◆ stopSound()

void stopSound ( s32  packed)

Stops a sequence sound (key-on sounds are left alone)

Definition at line 272 of file sound.c.

Here is the call graph for this function:

◆ fadeOutSound()

void fadeOutSound ( s32  packed)

Fades a sequence sound out over a second (key-on sounds are left alone)

Definition at line 288 of file sound.c.

Here is the call graph for this function:

◆ isSoundLoading()

s32 isSoundLoading ( void  )

Whether a bank is still being loaded.

Definition at line 309 of file sound.c.

Referenced by initSound().

Here is the caller graph for this function:

◆ loadSoundBankInto()

void loadSoundBankInto ( s32  slot,
s32  id 
)

Closes what slot slot holds and starts loading bank id into it.

Definition at line 314 of file sound.c.

Referenced by initSound(), and loadSoundBank().

Here is the caller graph for this function:

◆ loadSoundBank()

void loadSoundBank ( s32  id)

Loads a bank into slot 1 or 2, whichever was not used last.

Definition at line 338 of file sound.c.

Here is the call graph for this function:

◆ updateSoundLoading()

void updateSoundLoading ( void  )

Header: copied to the slot's buffer, then the body goes to the SPU.

Definition at line 351 of file sound.c.

Referenced by initSound().

Here is the caller graph for this function:

◆ soundKeyOn()

short soundKeyOn ( s32  slot,
short  prog,
short  note 
)

Plays one note of a program from the bank in slot slot; returns the voice.

Definition at line 403 of file sound.c.

◆ soundKeyOff()

void soundKeyOff ( s32  packed,
s16  voice 
)

Releases the voice that a key-on sound id started.

Definition at line 408 of file sound.c.

Here is the call graph for this function:

◆ initSound()

void initSound ( void  )

Starts libsnd, gives each slot its buffers and loads the system sounds (bank 1) into slot 0.

Definition at line 421 of file sound.c.

Here is the call graph for this function:

Variable Documentation

◆ SOUND_FILES_01

SoundFiles SOUND_FILES_01 = {384, 371, 0x1730000, 0x1800000, {0x1730001, 0x1730002, 0}}

Each bank's files (SOUND_BANK_FILES[id]), numbered in the Japanese disc as in the USA one.

Definition at line 79 of file sound.c.

◆ SOUND_FILES_02

SoundFiles SOUND_FILES_02 = {375, 362, 0x16A0000, 0x1770000, {0x16A0001, 0}}

Definition at line 80 of file sound.c.

◆ SOUND_FILES_03

SoundFiles SOUND_FILES_03 = {1138, 1136, 0x4700000, 0x4720000, {0x4700001, 0}}

Definition at line 81 of file sound.c.

◆ SOUND_FILES_04

SoundFiles SOUND_FILES_04 = {376, 363, 0x16B0000, 0x1780000, {0x16B0001, 0}}

Definition at line 82 of file sound.c.

◆ SOUND_FILES_05

SoundFiles SOUND_FILES_05 = {377, 364, 0x16C0000, 0x1790000, {0x16C0001, 0}}

Definition at line 83 of file sound.c.

◆ SOUND_FILES_06

SoundFiles SOUND_FILES_06 = {529, 527, 0x20F0000, 0x2110000, {0x20F0001, 0}}

Definition at line 84 of file sound.c.

◆ SOUND_FILES_07

SoundFiles SOUND_FILES_07 = {378, 365, 0x16D0000, 0x17A0000, {0x16D0001, 0}}

Definition at line 85 of file sound.c.

◆ SOUND_FILES_08

SoundFiles SOUND_FILES_08 = {379, 366, 0x16E0000, 0x17B0000, {0x16E0001, 0}}

Definition at line 86 of file sound.c.

◆ SOUND_FILES_09

SoundFiles SOUND_FILES_09 = {380, 367, 0x16F0000, 0x17C0000, {0x16F0001, 0}}

Definition at line 87 of file sound.c.

◆ SOUND_FILES_0A

SoundFiles SOUND_FILES_0A = {537, 534, 0x2160000, 0x2190000, {0x2160001, 0}}

Definition at line 88 of file sound.c.

◆ SOUND_FILES_0B

SoundFiles SOUND_FILES_0B = {381, 368, 0x1700000, 0x17D0000, {0x1700001, 0}}

Definition at line 89 of file sound.c.

◆ SOUND_FILES_0C

SoundFiles SOUND_FILES_0C = {382, 369, 0x1710000, 0x17E0000, {0x1710001, 0}}

Definition at line 90 of file sound.c.

◆ SOUND_FILES_0D

SoundFiles SOUND_FILES_0D = {555, 549, 0x2250000, 0x22B0000, {0x2250001, 0}}

Definition at line 91 of file sound.c.

◆ SOUND_FILES_0E

SoundFiles SOUND_FILES_0E = {568, 567, 0x2370000, 0x2380000, {0x2370001, 0}}

Definition at line 92 of file sound.c.

◆ SOUND_FILES_0F

SoundFiles SOUND_FILES_0F = {578, 577, 0x2410000, 0x2420000, {0x2410001, 0}}

Definition at line 93 of file sound.c.

◆ SOUND_FILES_10

SoundFiles SOUND_FILES_10 = {583, 582, 0x2460000, 0x2470000, {0x2460001, 0}}

Definition at line 94 of file sound.c.

◆ SOUND_FILES_11

SoundFiles SOUND_FILES_11 = {603, 602, 0x25A0000, 0x25B0000, {0x25A0001, 0}}

Definition at line 95 of file sound.c.

◆ SOUND_FILES_12

SoundFiles SOUND_FILES_12 = {609, 608, 0x2600000, 0x2610000, {0x2600001, 0}}

Definition at line 96 of file sound.c.

◆ SOUND_FILES_13

SoundFiles SOUND_FILES_13 = {665, 664, 0x2980000, 0x2990000, {0x2980001, 0}}

Definition at line 97 of file sound.c.

◆ SOUND_FILES_14

SoundFiles SOUND_FILES_14 = {628, 627, 0x2730000, 0x2740000, {0x2730001, 0}}

Definition at line 98 of file sound.c.

◆ SOUND_FILES_15

SoundFiles SOUND_FILES_15 = {716, 712, 0x2C80000, 0x2CC0000, {0x2C80001, 0}}

Definition at line 99 of file sound.c.

◆ SOUND_FILES_16

SoundFiles SOUND_FILES_16 = {532, 531, 0x2130000, 0x2140000, {0x2130001, 0}}

Definition at line 100 of file sound.c.

◆ SOUND_FILES_17

SoundFiles SOUND_FILES_17 = {820, 819, 0x3330000, 0x3340000, {0x3330001, 0}}

Definition at line 101 of file sound.c.

◆ SOUND_FILES_18

SoundFiles SOUND_FILES_18 = {556, 551, 0x2270000, 0x22C0000, {0x2270001, 0}}

Definition at line 102 of file sound.c.

◆ SOUND_FILES_19

SoundFiles SOUND_FILES_19 = {717, 713, 0x2C90000, 0x2CD0000, {0x2C90001, 0}}

Definition at line 103 of file sound.c.

◆ SOUND_FILES_1A

SoundFiles SOUND_FILES_1A = {718, 714, 0x2CA0000, 0x2CE0000, {0x2CA0001, 0}}

Definition at line 104 of file sound.c.

◆ SOUND_FILES_1B

SoundFiles SOUND_FILES_1B = {383, 370, 0x1720000, 0x17F0000, {0x1720001, 0}}

Definition at line 105 of file sound.c.

◆ SOUND_FILES_1C

SoundFiles SOUND_FILES_1C = {1080, 1078, 0x4360000, 0x4380000, {0x4360001, 0}}

Definition at line 106 of file sound.c.

◆ SOUND_FILES_1D

SoundFiles SOUND_FILES_1D = {636, 635, 0x27B0000, 0x27C0000, {0x27B0001, 0}}

Definition at line 107 of file sound.c.

◆ SOUND_FILES_1E

SoundFiles SOUND_FILES_1E = {719, 715, 0x2CB0000, 0x2CF0000, {0x2CB0001, 0}}

Definition at line 108 of file sound.c.

◆ SOUND_FILES_1F

SoundFiles SOUND_FILES_1F = {530, 528, 0x2100000, 0x2120000, {0x2100001, 0}}

Definition at line 109 of file sound.c.

◆ SOUND_FILES_20

SoundFiles SOUND_FILES_20 = {515, 513, 0x2010000, 0x2030000, {0x2010001, 0}}

Definition at line 110 of file sound.c.

◆ SOUND_FILES_21

SoundFiles SOUND_FILES_21 = {735, 734, 0x2DE0000, 0x2DF0000, {0x2DE0001, 0}}

Definition at line 111 of file sound.c.

◆ SOUND_FILES_22

SoundFiles SOUND_FILES_22 = {557, 552, 0x2280000, 0x22D0000, {0x2280001, 0}}

Definition at line 112 of file sound.c.

◆ SOUND_FILES_23

SoundFiles SOUND_FILES_23 = {1139, 1137, 0x4710000, 0x4730000, {0x4710001, 0}}

Definition at line 113 of file sound.c.

◆ SOUND_FILES_24

SoundFiles SOUND_FILES_24 = {1376, 1375, 0x55F0000, 0x5600000, {0x55F0001, 0}}

Definition at line 114 of file sound.c.

◆ SOUND_FILES_25

SoundFiles SOUND_FILES_25 = {1994, 1964, 0x7AC0000, 0x7CA0000, {0x7AC0001, 0}}

Definition at line 115 of file sound.c.

◆ SOUND_FILES_26

SoundFiles SOUND_FILES_26 = {1995, 1991, 0x7C70000, 0x7CB0000, {0x7C70001, 0}}

Definition at line 116 of file sound.c.

◆ SOUND_FILES_27

SoundFiles SOUND_FILES_27 = {1116, 1115, 0x45B0000, 0x45C0000, {0x45B0001, 0}}

Definition at line 117 of file sound.c.

◆ SOUND_FILES_28

SoundFiles SOUND_FILES_28 = {1227, 1226, 0x4CA0000, 0x4CB0000, {0x4CA0001, 0}}

Definition at line 118 of file sound.c.

◆ SOUND_FILES_29

SoundFiles SOUND_FILES_29 = {385, 372, 0x1740000, 0x1810000, {0x1740001, 0}}

Definition at line 119 of file sound.c.

◆ SOUND_FILES_2A

SoundFiles SOUND_FILES_2A = {864, 862, 0x35E0000, 0x3600000, {0x35E0001, 0}}

Definition at line 120 of file sound.c.

◆ SOUND_FILES_2B

SoundFiles SOUND_FILES_2B = {865, 863, 0x35F0000, 0x3610000, {0x35F0001, 0}}

Definition at line 121 of file sound.c.

◆ SOUND_FILES_2C

SoundFiles SOUND_FILES_2C = {558, 553, 0x2290000, 0x22E0000, {0x2290001, 0}}

Definition at line 122 of file sound.c.

◆ SOUND_FILES_2D

SoundFiles SOUND_FILES_2D = {386, 373, 0x1750000, 0x1820000, {0x1750001, 0}}

Definition at line 123 of file sound.c.

◆ SOUND_FILES_2E

SoundFiles SOUND_FILES_2E = {897, 895, 0x37F0000, 0x3810000, {0x37F0001, 0}}

Definition at line 124 of file sound.c.

◆ SOUND_FILES_2F

SoundFiles SOUND_FILES_2F = {898, 896, 0x3800000, 0x3820000, {0x3800001, 0}}

Definition at line 125 of file sound.c.

◆ SOUND_FILES_30

SoundFiles SOUND_FILES_30 = {943, 938, 0x3AA0000, 0x3AF0000, {0x3AA0001, 0}}

Definition at line 126 of file sound.c.

◆ SOUND_FILES_31

SoundFiles SOUND_FILES_31 = {944, 939, 0x3AB0000, 0x3B00000, {0x3AB0001, 0}}

Definition at line 127 of file sound.c.

◆ SOUND_FILES_32

SoundFiles SOUND_FILES_32 = {387, 374, 0x1760000, 0x1830000, {0x1760001, 0}}

Definition at line 128 of file sound.c.

◆ SOUND_FILES_33

SoundFiles SOUND_FILES_33 = {516, 514, 0x2020000, 0x2040000, {0x2020001, 0}}

Definition at line 129 of file sound.c.

◆ SOUND_FILES_34

SoundFiles SOUND_FILES_34 = {945, 940, 0x3AC0000, 0x3B10000, {0x3AC0001, 0}}

Definition at line 130 of file sound.c.

◆ SOUND_FILES_35

SoundFiles SOUND_FILES_35 = {946, 941, 0x3AD0000, 0x3B20000, {0x3AD0001, 0}}

Definition at line 131 of file sound.c.

◆ SOUND_FILES_36

SoundFiles SOUND_FILES_36 = {947, 942, 0x3AE0000, 0x3B30000, {0x3AE0001, 0}}

Definition at line 132 of file sound.c.

◆ SOUND_FILES_37

SoundFiles SOUND_FILES_37 = {958, 955, 0x3BB0000, 0x3BE0000, {0x3BB0001, 0}}

Definition at line 133 of file sound.c.

◆ SOUND_FILES_38

SoundFiles SOUND_FILES_38 = {959, 956, 0x3BC0000, 0x3BF0000, {0x3BC0001, 0}}

Definition at line 134 of file sound.c.

◆ SOUND_FILES_39

SoundFiles SOUND_FILES_39 = {960, 957, 0x3BD0000, 0x3C00000, {0x3BD0001, 0}}

Definition at line 135 of file sound.c.

◆ SOUND_FILES_3A

SoundFiles SOUND_FILES_3A = {1014, 1008, 0x3F00000, 0x3F60000, {0x3F00001, 0}}

Definition at line 136 of file sound.c.

◆ SOUND_FILES_3B

SoundFiles SOUND_FILES_3B = {1015, 1009, 0x3F10000, 0x3F70000, {0x3F10001, 0}}

Definition at line 137 of file sound.c.

◆ SOUND_FILES_3C

SoundFiles SOUND_FILES_3C = {1016, 1010, 0x3F20000, 0x3F80000, {0x3F20001, 0}}

Definition at line 138 of file sound.c.

◆ SOUND_FILES_3D

SoundFiles SOUND_FILES_3D = {1017, 1011, 0x3F30000, 0x3F90000, {0x3F30001, 0}}

Definition at line 139 of file sound.c.

◆ SOUND_FILES_3E

SoundFiles SOUND_FILES_3E = {1018, 1012, 0x3F40000, 0x3FA0000, {0x3F40001, 0}}

Definition at line 140 of file sound.c.

◆ SOUND_FILES_3F

SoundFiles SOUND_FILES_3F = {1019, 1013, 0x3F50000, 0x3FB0000, {0x3F50001, 0}}

Definition at line 141 of file sound.c.

◆ SOUND_FILES_40

SoundFiles SOUND_FILES_40 = {1081, 1079, 0x4370000, 0x4390000, {0x4370001, 0}}

Definition at line 142 of file sound.c.

◆ SOUND_FILES_41

SoundFiles SOUND_FILES_41 = {1594, 1593, 0x6390000, 0x63A0000, {0x6390001, 0}}

Definition at line 143 of file sound.c.

◆ SOUND_FILES_42

SoundFiles SOUND_FILES_42 = {559, 554, 0x22A0000, 0x22F0000, {0x22A0001, 0}}

Definition at line 144 of file sound.c.

◆ SOUND_FILES_43

SoundFiles SOUND_FILES_43 = {1954, 1953, 0x7A10000, 0x7A20000, {0x7A10001, 0}}

Definition at line 145 of file sound.c.

◆ SOUND_FILES_44

SoundFiles SOUND_FILES_44 = {2104, 2103, 0x8370000, 0x8380000, {0x8370001, 0}}

Definition at line 146 of file sound.c.

◆ SOUND_FILES_45

SoundFiles SOUND_FILES_45 = {1842, 1840, 0x7300000, 0x7320000, {0x7300001, 0}}

Definition at line 147 of file sound.c.

◆ SOUND_FILES_46

SoundFiles SOUND_FILES_46 = {1843, 1841, 0x7310000, 0x7330000, {0x7310001, 0}}

Definition at line 148 of file sound.c.

◆ SOUND_FILES_47

SoundFiles SOUND_FILES_47 = {2203, 2202, 0x89A0001, 0x89B0000, {0x89A0000, 0}}

Definition at line 149 of file sound.c.

◆ SOUND_BANK_FILES

SoundFiles* SOUND_BANK_FILES[72]
Initial value:
= {
((void *)0) ,
}
SoundFiles SOUND_FILES_3D
Definition sound.c:139
SoundFiles SOUND_FILES_24
Definition sound.c:114
SoundFiles SOUND_FILES_41
Definition sound.c:143
SoundFiles SOUND_FILES_0D
Definition sound.c:91
SoundFiles SOUND_FILES_14
Definition sound.c:98
SoundFiles SOUND_FILES_39
Definition sound.c:135
SoundFiles SOUND_FILES_47
Definition sound.c:149
SoundFiles SOUND_FILES_38
Definition sound.c:134
SoundFiles SOUND_FILES_2F
Definition sound.c:125
SoundFiles SOUND_FILES_3B
Definition sound.c:137
SoundFiles SOUND_FILES_1D
Definition sound.c:107
SoundFiles SOUND_FILES_42
Definition sound.c:144
SoundFiles SOUND_FILES_0B
Definition sound.c:89
SoundFiles SOUND_FILES_2C
Definition sound.c:122
SoundFiles SOUND_FILES_0A
Definition sound.c:88
SoundFiles SOUND_FILES_2A
Definition sound.c:120
SoundFiles SOUND_FILES_04
Definition sound.c:82
SoundFiles SOUND_FILES_13
Definition sound.c:97
SoundFiles SOUND_FILES_3F
Definition sound.c:141
SoundFiles SOUND_FILES_23
Definition sound.c:113
SoundFiles SOUND_FILES_21
Definition sound.c:111
SoundFiles SOUND_FILES_46
Definition sound.c:148
SoundFiles SOUND_FILES_22
Definition sound.c:112
SoundFiles SOUND_FILES_2D
Definition sound.c:123
SoundFiles SOUND_FILES_12
Definition sound.c:96
SoundFiles SOUND_FILES_35
Definition sound.c:131
SoundFiles SOUND_FILES_1C
Definition sound.c:106
SoundFiles SOUND_FILES_0E
Definition sound.c:92
SoundFiles SOUND_FILES_3C
Definition sound.c:138
SoundFiles SOUND_FILES_28
Definition sound.c:118
SoundFiles SOUND_FILES_06
Definition sound.c:84
SoundFiles SOUND_FILES_40
Definition sound.c:142
SoundFiles SOUND_FILES_10
Definition sound.c:94
SoundFiles SOUND_FILES_3E
Definition sound.c:140
SoundFiles SOUND_FILES_3A
Definition sound.c:136
SoundFiles SOUND_FILES_05
Definition sound.c:83
SoundFiles SOUND_FILES_17
Definition sound.c:101
SoundFiles SOUND_FILES_19
Definition sound.c:103
SoundFiles SOUND_FILES_29
Definition sound.c:119
SoundFiles SOUND_FILES_33
Definition sound.c:129
SoundFiles SOUND_FILES_1E
Definition sound.c:108
SoundFiles SOUND_FILES_16
Definition sound.c:100
SoundFiles SOUND_FILES_0F
Definition sound.c:93
SoundFiles SOUND_FILES_36
Definition sound.c:132
SoundFiles SOUND_FILES_2B
Definition sound.c:121
SoundFiles SOUND_FILES_0C
Definition sound.c:90
SoundFiles SOUND_FILES_25
Definition sound.c:115
SoundFiles SOUND_FILES_44
Definition sound.c:146
SoundFiles SOUND_FILES_26
Definition sound.c:116
SoundFiles SOUND_FILES_02
Definition sound.c:80
SoundFiles SOUND_FILES_15
Definition sound.c:99
SoundFiles SOUND_FILES_09
Definition sound.c:87
SoundFiles SOUND_FILES_1F
Definition sound.c:109
SoundFiles SOUND_FILES_07
Definition sound.c:85
SoundFiles SOUND_FILES_18
Definition sound.c:102
SoundFiles SOUND_FILES_1A
Definition sound.c:104
SoundFiles SOUND_FILES_32
Definition sound.c:128
SoundFiles SOUND_FILES_45
Definition sound.c:147
SoundFiles SOUND_FILES_37
Definition sound.c:133
SoundFiles SOUND_FILES_20
Definition sound.c:110
SoundFiles SOUND_FILES_03
Definition sound.c:81
SoundFiles SOUND_FILES_2E
Definition sound.c:124
SoundFiles SOUND_FILES_27
Definition sound.c:117
SoundFiles SOUND_FILES_43
Definition sound.c:145
SoundFiles SOUND_FILES_30
Definition sound.c:126
SoundFiles SOUND_FILES_1B
Definition sound.c:105
SoundFiles SOUND_FILES_34
Definition sound.c:130
SoundFiles SOUND_FILES_31
Definition sound.c:127
SoundFiles SOUND_FILES_11
Definition sound.c:95
SoundFiles SOUND_FILES_08
Definition sound.c:86
SoundFiles SOUND_FILES_01
Each bank's files (SOUND_BANK_FILES[id]), numbered in the Japanese disc as in the USA one.
Definition sound.c:79

The banks by id: bits 18-24 of a sound id.

Definition at line 153 of file sound.c.

Referenced by loadSoundBankInto().

◆ SOUND_HEAD_BUFFER_0

s32 SOUND_HEAD_BUFFER_0[14336]

Each slot's buffer for the VAB header and the SEPs, in this unit's .bss (see the Makefile)

Definition at line 170 of file sound.c.

◆ SOUND_HEAD_BUFFER_1

s32 SOUND_HEAD_BUFFER_1[10240]

Definition at line 171 of file sound.c.

◆ SOUND_HEAD_BUFFER_2

s32 SOUND_HEAD_BUFFER_2[10240]

Definition at line 172 of file sound.c.

◆ SOUND_HEAD_BUFFERS

void* SOUND_HEAD_BUFFERS[3] = {SOUND_HEAD_BUFFER_0, SOUND_HEAD_BUFFER_1, SOUND_HEAD_BUFFER_2}

Each slot's buffer, and its SPU address.

Definition at line 175 of file sound.c.

Referenced by initSound().

◆ SOUND_SPU_ADDRS

s32 SOUND_SPU_ADDRS[3] = {0x1010, 0x49C10, 0x62410}

Definition at line 176 of file sound.c.

Referenced by initSound().

◆ SOUND

SoundState SOUND
Initial value:
= {
{0},
{{0}},
0,
0,
{ ((void *)0) },
}
void stopSound(s32 packed)
Stops a sequence sound (key-on sounds are left alone)
Definition sound.c:272
void loadSoundBankInto(s32 slot, s32 id)
Closes what slot slot holds and starts loading bank id into it.
Definition sound.c:314
short soundKeyOn(s32 slot, short prog, short note)
Plays one note of a program from the bank in slot slot; returns the voice.
Definition sound.c:403
short playSound(s32 packed)
Plays a packed sound id (see engine/sound.h); returns the voice of a key-on.
Definition sound.c:212
void fadeOutSound(s32 packed)
Fades a sequence sound out over a second (key-on sounds are left alone)
Definition sound.c:288
s32 isSoundLoading(void)
Whether a bank is still being loaded.
Definition sound.c:309
void loadSoundBank(s32 id)
Loads a bank into slot 1 or 2, whichever was not used last.
Definition sound.c:338
void soundKeyOff(s32 packed, s16 voice)
Releases the voice that a key-on sound id started.
Definition sound.c:408
void stopAllSounds(void)
Stops every track of the loaded banks and every voice.
Definition sound.c:251
void updateSoundLoading(void)
Header: copied to the slot's buffer, then the body goes to the SPU.
Definition sound.c:351
void initSound(void)
Starts libsnd, gives each slot its buffers and loads the system sounds (bank 1) into slot 0.
Definition sound.c:421

rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall in seqTable

Definition at line 180 of file sound.c.

Referenced by addNewDigimon(), answerQuitQuestion(), applyEntranceExtras(), browseOpponentRow(), browseOwnRow(), browsePlayedRow(), CARDGAME_chooseCard(), CARDGAME_chooseDeck(), CARDGAME_closeMenuWindow(), CARDGAME_closeMessage(), CARDGAME_closeWindow(), CARDGAME_confirmMenuWindow(), CARDGAME_confirmMessage(), CARDGAME_countSlotValues(), CARDGAME_createBattle(), CARDGAME_drawFirstPlayer(), CARDGAME_flySprite(), CARDGAME_moveHandHighlight(), CARDGAME_movePileSelection(), CARDGAME_moveSelection(), CARDGAME_moveSprite(), CARDGAME_moveTableHighlight(), CARDGAME_openMenuWindow(), CARDGAME_openMessage(), CARDGAME_openWindow(), CARDGAME_pickTableCard(), CARDGAME_readChooseInput(), CARDGAME_readCountInput(), CARDGAME_showPlayedCard(), CARDGAME_startSlotEffects(), CARDGAME_startSpriteBlink(), CARDGAME_startSpriteFlip(), CARDGAME_startSpriteJitter(), CARDGAME_startSpriteMove(), CARDGAME_startSpriteRecovery(), CARDGAME_startSpriteShake(), CARDGAME_stepColorValue(), CARDGAME_stepPileChoice(), CARDGAME_stepPreviousCardChoice(), CARDGAME_stepRoundEnd(), CARDGAME_stepTally(), CARDGAME_stepTargetSlots(), CARDGAME_stepTotals(), CARDGAME_switchCoinCard(), CARDGAME_updateBattle(), checkBattleWinner(), chooseFieldMenuOption(), chooseInnAnswer(), closeDeckWindow(), closeMessage(), CNTY_SEL_start(), CNTY_SEL_tickMenu(), CNTY_SEL_tickScreen(), confirmSwitchIn(), countRoundWin(), createCommand838(), createCommand852(), createCommand853(), createMessageBoxFrame(), endBattleOnKnockOut(), fadeOutSound(), FIELDSTG_playBattleTransition(), FIELDSTG_playClimbSounds(), FIELDSTG_playCutsceneAnim(), FIELDSTG_playStepSounds(), FIELDSTG_runChoice(), FIELDSTG_runGauge(), FIELDSTG_runLaunch(), FIELDSTG_scrollCamera(), FIELDSTG_updateActor(), FIELDSTG_updateActorIcon(), FIELDSTG_updateBalloon(), FIELDSTG_updateCamera(), FIELDSTG_updateField(), FIELDSTG_updateLift(), FIELDSTG_updateSpotEffect(), FIGHTSTG_playBattleSound(), FIGHTSTG_stepConfusedMessage(), FIGHTSTG_stepMessage(), FIGHTSTG_updateBattleScript(), FIGHTSTG_updateBattleSound(), FIGHTSTG_updateCommandMenu(), FIGHTSTG_updateConfusedMenu(), FIGHTSTG_updateCursor(), FIGHTSTG_updateDigimonChange(), FIGHTSTG_updateDigivolveMenu(), FIGHTSTG_updateEntrance(), FIGHTSTG_updateHitEffect(), FIGHTSTG_updateItemMenu(), FIGHTSTG_updateStage(), FIGHTSTG_updateSwitchInMenu(), FIGHTSTG_updateSwitchMenu(), FIGHTSTG_updateTechMenu(), findSoundBank(), flyOrFloat(), handleCommand801(), handleCommand810(), handleCommand811(), handleCommand814(), handleCommand840(), handleCommand848(), handleCommand850(), handleCommand851(), initSound(), innStartPanel(), isSoundLoading(), loadEntranceExtras(), loadSoundBank(), loadSoundBankInto(), main(), moveDeckMarker(), moveMenuCursor(), moveSelection(), openDeckWindow(), pickBattleDigivolve(), pickInOpponentRow(), pickInOwnRow(), pickMember(), pickMenuOption(), pickPartner(), pickRecipeId(), pickSlotOption(), playCommandSound(), playComputerTurn(), playHeldSound(), playPlayerTurn(), playSound(), putPickedEntry(), raisePartnerLevel(), readConfirmInput(), readListMenuMessage(), readYesNoInput(), returnToBattle(), runDrop(), runGauge(), runOptions(), runPressStart(), runRecipeRow(), runSlide(), runStopSlide(), runTalk(), runUsed(), setUpBattle(), setUpPickState(), showChosenCards(), showDigimonLevelUp(), showFieldMenuOptions(), showNewTechPage(), soundKeyOff(), soundKeyOn(), SOUNDTST_loadBank(), SOUNDTST_playSounds(), startChooseState(), startDealState(), startEvent8000(), startEvent8001(), startEvent8002(), startFade(), startPanel(), startTween(), STCRDABM_browseAlbum(), STCRDABM_moveAlbumCursor(), STCRDABM_turnAlbumPage(), STCRDABM_updateGrid(), STCRDDEK_chooseDeck(), STCRDDEK_chooseDeckOption(), STCRDDEK_chooseListCard(), STCRDDEK_moveDeckCursor(), STCRDDEK_stepEditor(), STCRDSHP_chooseBuyCard(), STCRDSHP_chooseOption(), STCRDSHP_choosePack(), STCRDSHP_choosePackCard(), STCRDSHP_confirmBuyCard(), STCRDSHP_runBuy(), STCRDSHP_runShop(), STCRDSHP_turnBuyPage(), STCRDSHP_updateGrid(), STDGNAME_runMenu(), STDWTITL_startTitleLoaderTask(), STDWTITL_stepTitle(), STDWTITL_tickMovie(), STDWTITL_tickSplash(), STDWTITL_tickTitle(), STDWTITL_tickTitleLoader(), STFGTREP_runPartner(), STGDGLAB_answerMark(), STGDGLAB_pickSkill(), STGDGLAB_runEntryList(), STGDGLAB_runSlotScreen(), STGDGLAB_updateEntryPanel(), STGDGLAB_updateSkillPanel(), STGMCARD_answerError(), STGMCARD_cancelOverwrite(), STGMCARD_confirmMessage(), STGMCARD_createScreen(), STGMCARD_moveChoiceCursor(), STGMCARD_pickPort(), STGMCARD_pickSlot(), STGMCARD_runSaves(), STGMCARD_updateMenu(), STGMCARD_updateScreen(), STGMCARD_waitLoadedMessage(), STGTRAIN_answerToTrain(), STGTRAIN_askBonusTry(), STGTRAIN_closeNotice(), STGTRAIN_pickIntensity(), STGTRAIN_pickPartner(), STGTRAIN_pickTraining(), STGTRAIN_runTraining(), STGTRAIN_showGains(), STGTRAIN_startBonusTry(), STGTRAIN_takeBonusTry(), STGTRAIN_takeTry(), STGTRAIN_updateScreen(), STITSHOP_chooseBuyQuantity(), STITSHOP_chooseEquipPartner(), STITSHOP_chooseSellQuantity(), STITSHOP_chooseSellType(), STITSHOP_confirmBuy(), STITSHOP_confirmEquip(), STITSHOP_confirmSell(), STITSHOP_pickBuyItem(), STITSHOP_runBuy(), STITSHOP_runSell(), STITSHOP_runShop(), STITSHOP_turnInfoPage(), STITSHOP_updateItemList(), stopAllSounds(), stopFlightSound(), stopHeldSound(), stopSound(), STPLNMET_runChoice(), STPLNMET_runConfirm(), STPLNMET_updateScreen(), STSTATUS_answerDigivolveQuestion(), STSTATUS_chooseCardOption(), STSTATUS_chooseDemoOption(), STSTATUS_chooseDigivolveSlot(), STSTATUS_chooseEquipItem(), STSTATUS_chooseEquipSlot(), STSTATUS_chooseFirstToSwap(), STSTATUS_chooseItemList(), STSTATUS_chooseItemMember(), STSTATUS_chooseSecondToSwap(), STSTATUS_chooseStatusMember(), STSTATUS_chooseTech(), STSTATUS_chooseTechMember(), STSTATUS_chooseTechTarget(), STSTATUS_closeNoFieldTechs(), STSTATUS_closeShortMp(), STSTATUS_closeTechUsed(), STSTATUS_confirmItemUsed(), STSTATUS_moveItemListCursor(), STSTATUS_runDigivolvePanel(), STSTATUS_runItemList(), STSTATUS_runMapScreen(), STSTATUS_runStatusChoice(), STSTATUS_showMapArea(), STSTATUS_startLerp(), STSTATUS_unlockItemOptions(), STSTATUS_useItem(), STSTATUS_useTech(), STSTATUS_waitBattleMessage(), STSTATUS_waitPartnerTech(), switchConfusionMusic(), turnMessagePage(), updateDarkness(), updateEvent1510(), updateEvent1512(), updateEvent1514(), updateEvent1516(), updateEvent1518(), updateEvent1520(), updateEvent1602(), updateEvent1604(), updateEvent1616(), updateEvent1618(), updateEvent9(), updateEvent9015(), updateFaller(), updateFieldMenu(), updateFloater(), updateFrameTask(), updateGlow(), updateInnMenu(), updateKeyboard(), updateListMenu(), updateMenu(), updateMessageBox(), updateMover(), updateScroller(), updateSoundLoading(), updateSoundTile(), updateTalkBox(), updateTextWindow(), updateTileEffect(), updateTileGroup(), updateTileLift(), updateTileSeqs8(), updateTileSwitch(), updateTileTask(), updateTimer(), warpAway(), and WFIGHTMN_updateMenu().