The Data Object holds the compressed audio. Packets are all the same size, the size in the File Properties Object; a packet shorter than that is padded. All numbers are little-endian.
Data Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 24 | common fields | GUID 75B22636-668E-11CF-A6D9-00AA0062CE6C and size |
| 24 | 16 | file ID | the same as in File Properties |
| 40 | 8 | total data packets | |
| 48 | 2 | reserved | 0101 |
| 50 | varies | data packets | as below |
Error correction data
A packet may start with a flags byte. If bit 7 of the first byte is 0 there is no error correction data and the byte is the length type flags below.
| Bits | Field | Meaning |
|---|---|---|
| 0–3 | error correction data length | when bits 5–6 are 0: the number of bytes following |
| 4 | opaque data present | |
| 5–6 | error correction length type | 0 means the length is in bits 0–3 |
| 7 | error correction present |
In practice the value is 82, followed by two zero bytes.
Payload parsing information
| Size | Field | Meaning |
|---|---|---|
| 1 | length type flags | below |
| 1 | property flags | below |
| 0–4 | packet length | width from packet length type; if absent, the fixed packet size |
| 0–4 | sequence | width from sequence type |
| 0–4 | padding length | width from padding length type |
| 4 | send time | milliseconds |
| 2 | duration | milliseconds |
The two-bit length codes used throughout mean: 0 the field is absent, 1 a byte, 2 two bytes, 3 four bytes. An absent field takes a default of 0, except packet length.
| Bits of length type flags | Field |
|---|---|
| 0 | multiple payloads present |
| 1–2 | sequence type |
| 3–4 | padding length type |
| 5–6 | packet length type |
| 7 | error correction present |
| Bits of property flags | Field |
|---|---|
| 0–1 | replicated data length type |
| 2–3 | offset into media object length type |
| 4–5 | media object number length type |
| 6–7 | stream number length type (always 1, one byte) |
Payloads
A packet has one payload, or several when multiple payloads is set. With several, a payload flags byte comes first.
| Bits of payload flags | Field |
|---|---|
| 0–5 | number of payloads |
| 6–7 | payload length type |
Each payload is then:
| Size | Field | Meaning |
|---|---|---|
| 1 | stream number | bits 0–6 the stream, bit 7 set for a key frame |
| 0–4 | media object number | width from the property flags |
| 0–4 | offset into media object | byte offset of this fragment; holds the presentation time for compressed payloads |
| 0–4 | replicated data length | width from the property flags |
| varies | replicated data | below |
| 0–4 | payload length | only with multiple payloads; width from the payload flags |
| varies | payload data | the WMA data; see codecs |
Replicated data
| Replicated data length | Meaning |
|---|---|
| 0 | none |
| 1 | a compressed payload: the single byte is a presentation time delta (see below) |
| 2–7 | invalid |
| 8 or more | media object size (4), presentation time in milliseconds (4), then payload extension data, if any |
A compressed payload packs several small media objects into one. Its offset field gives the first presentation time, and the delta is added for each. The payload data is a run of sub-payloads, each a length byte and that many bytes of data.