Three chunks sit directly in the DLS form besides the lists: the
collection header colh, the optional version stamp vers and the
pool table ptbl. Fields are from sections 2.4, 2.14 and 2.13 of
Downloadable Sounds Level 2.2; Level 1 defines the same three. All numbers
are little-endian.
colh: the collection header
A colh chunk is typically (but not necessarily) the second chunk in the form.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | cInstruments | the number of instruments in the collection: the number of ins lists in lins |
The count lets a parser allocate memory in advance. If it does not match the
lins list, the specification says the file is in error and recommends that
tools let the user ignore the error and correct the field. The explorer reports a
mismatch.
vers: the version
An optional version stamp for the file’s contents (not the DLS level), used by setup
programs to decide whether to install a newer file over an older one. It has the
four-number form of the version stamps of executables and is copied from the
dwFileVersionMS and dwFileVersionLS fields of Microsoft’s
VS_FIXEDFILEINFO.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | dwVersionMS | the high 32 bits of the version: its high word and low word are the first two numbers |
| 4 | 4 | u32 | dwVersionLS | the low 32 bits: its high word and low word are the last two numbers |
The specification’s example: “VERSION 3,10,0,61” is dwVersionMS =
0x0003000A and dwVersionLS = 0x0000003D. The
explorer shows the four numbers separated by dots. A vers chunk is
typically near the top of the form so that installers find it quickly. If a file uses
both vers and dlid, changing the version means changing every
associated DLSID too (DLSID).
ptbl: the pool table
The pool table is a list of cross-references to the waves in the wave pool, so a
synthesiser can seek straight to any wave without walking the pool. A region’s
wlnk chunk names a wave by
the 0-based index of its cue in this table. Adding or deleting a wave then changes the
table, not every wave link.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | cbSize | the size of this header in bytes, not counting the cues (8); it lets the header grow |
| 4 | 4 | u32 | cCues | the number of cues that follow the header |
cbSize | 4 × cCues | u32[] | ulOffset | each cue: the absolute offset in bytes from the beginning of the wave pool data to the wave list |
The header file defines POOL_CUE_NULL as 0xFFFFFFFF without
saying more. “The beginning of the wave pool data” is the first byte after the
wvpl list type: offset 0 is the LIST header of the first
wave. The explorer checks every cue against the wave lists it found, in Apple’s
gs_instruments.dls (495 waves), Windows 2000’s W2P.DLS and the
DirectX 7 SDK files, and reports a cue that does not point at the start of a wave list,
a cCues larger than the chunk holds, a count that differs from the number
of waves, and a wlnk index past the end of the table.