Skip to content

Fix audio build errors

The build checks your audio files and stops at the first problem. It prints a line in the form file: message, so the file name tells you where to look. Messages about a table entry start with the kind of entry and its name, such as Sound 'ShopBell': .... This page lists the common messages, grouped by the file you're editing.

File names

MessageCause and fix
...: this file must be named songs.xmlAudio files use snake case names. Rename Songs.xml to songs.xml. The same message appears for banks.xml, ambient_sounds.xml, sound_effects.xml, presets.xml, drums.xml, sfx/envelopes.xml, and bank/NAME/sound_bank.xml, each with the new name.
tables merge by entry; delete entries with delete="true"A .meta file tries to delete a table file. Delete the entries with delete="true" instead.

Any table

MessageCause and fix
the name must start with a letter and contain only letters, digits, and underscoresRename the entry. A hyphen or space isn't allowed.
Sound 'NAME' is listed more than onceThe same file has two entries with one name. Keep one. The message starts with Song, AmbientSound, or Bank for those tables.
Song 'NAME': ID 2 is already used by 'OTHER'Two entries use the same id. Remove the id attribute from your entry to let the build pick a free one.
Song 'NAME': there are no free IDsAll 256 song IDs are used. Delete a song you don't use. The same message applies to AmbientSound.
NAME and OTHER both become SOUND_NAMETwo names produce the same constant, such as ShopBell and Shop_Bell. Rename one.

Sound effects

MessageCause and fix
OneShot: no bank in banks.xml has an instrument named NAMEThe wav name doesn't match an instrument in an always-loaded bank. Check the spelling, and check that the bank is listed in audio/banks.xml. SetInstrument in a sequence or in an ambient sequence gives the same message with its own name in front. Samples in a song bank aren't available to sound effects.
Sound 'NAME': a sound must have exactly one of src, empty, or OneShotA Sound entry needs one of src="sfx/...", empty="true", or a OneShot child.
Sound 'NAME': a sequence needs a Routing elementAn entry with src needs a Routing child.
Sound 'NAME': there is no sfx/NAME.xml file in any layerThe src path doesn't match a file in any layer.
Sound 'NAME': ID 0009 is already used by 'MenuShowChoice'Two sounds use the same id. Remove the id attribute from your entry.
Sound 'NAME': ID 00C5 is a direct slot, but the sound has RoutingThe id you pinned is a slot that can't hold a sound with Routing. Remove the id attribute.
Sound 'NAME': there are no free routed sound slotsThe game has no free ID of the kind the sound needs. Delete a sound you don't use.

Banks and samples

MessageCause and fix
Bank 'NAME': there is no bank/NAME/sample.wav file in any layerThe wav attribute of an Instrument names a file that isn't in the bank's folder in any layer. Add the WAV file.
Bank 'NAME': there is no bank/NAME/sound_bank.xml file in any layerA bank folder needs a sound_bank.xml file in at least one layer.
the WAV file has 2 channels; only mono is supportedExport the sample as mono.
the WAV file has 24-bit samples; only 16-bit is supportedExport the sample as 16-bit PCM. The floating-point WAV files are not supported; use 16-bit PCM and the WAV file is not uncompressed PCM; use 16-bit PCM messages have the same fix.
Instrument is missing required attribute: keyBaseAdd keyBase="4800" to the instrument.
a bank has at most 16 instruments, but there are 17Move instruments to another bank.
the sample name NAME is also used by bank OTHERRename one of the WAV files and its wav attributes.
a bank name must be 4 characters or fewer: NAMERename the bank's folder, and its entry in audio/banks.xml and audio/songs.xml.
Bank 'NAME.bk': there is no bank/NAME directory or bank/NAME.bk file in any layerAn entry in audio/banks.xml doesn't match a folder in audio/bank/. The bank's name is its folder name plus .bk.
group 6 index 2 is used by another bankTwo banks in audio/banks.xml share a slot. Remove group and index from yours, or choose a free slot.
there are 80 banks, but the engine loads at most 79Delete an always-loaded bank you don't need, or move a bank to a song.
the layer has both this directory and NAME.bk; use only oneA layer has both bank/NAME/ and bank/NAME.bk. Delete one.
Song 'NAME': bank NAME is used as an auxiliary bank, but its header is ...A bank that a song loads has too many instruments or envelopes. Split it into two banks.
the archive is ...Your audio is too large for the game to load. Use shorter samples or lower sample rates.

Songs and ambient sounds

MessageCause and fix
Song 'NAME': there is no songs/meadow_theme.bgm file in any layerThe bgm attribute must match a file in audio/songs/, including the extension.
Song 'NAME': there is no bank/NAME directory or bank/NAME.bk file in any layerA bk1, bk2, or bk3 attribute names a bank that doesn't exist.
AmbientSound 'NAME': there is no mseq/NAME.xml or mseq/NAME.mseq file in any layerThe mseq attribute must match a file in audio/mseq/, without the extension.
command 12, EndLoop: loop 0 repeats forever without a DelayAdd a Delay inside the loop in the MSEQ file.

Compiler errors after a deletion

If you delete an entry that C code or an EVT script still uses, the audio build succeeds but the compiler reports that the constant is undeclared:

error: 'SONG_TOAD_TOWN' undeclared (first use in this function)

Search your code for the constant that the error names, and remove or change each use.