-
Notifications
You must be signed in to change notification settings - Fork 4
WAVELIB
WAVELIB0.XLD contains wave libraries of random sound fx for the different environments (e.g. the jungle sounds on Nakiridaani, or the dripping water in dungeons).
These are loaded in conjunction with files from SONGS0.XLD at the start of every map, however, note that there is no 1:1 correlation between the index numbers of the subfiles in the two XLDs.
Interestingly, the sound setting in the header of the mapdata controls which subfiles from WAVELIB0.XLD and SONGS0.XLD should be used, but the actual combination seems to be hard-coded in MAIN.EXE.
Each wave library starts with 512 headers of 0×20 bytes for every audio file (0×4000 bytes total), followed by the raw data.
The length and offset of the data is defined in the headers.
Generally most of the headers are empty / place-holders, and only a few are actually used.
Offset | Length | Description |
0 | 4 | Unknown |
4 | 4 | Index number |
8 | 4 | Unknown |
12 | 4 | Start offset raw audio |
16 | 4 | Length raw audio |
20 | 4 | Unknown |
24 | 4 | Unknown |
28 | 4 | Sample rate |