I'm trying to correctly encode a LIST
chunk of the INFO
type such that it follows standards. The original 1.0 IBM/Microsoft spec for RIFF (https://www.aelius.com/njh/wavemetatools/doc/riffmci.pdf) is confusing me.
The spec says:
The chunks listed below may only appear in an
INFO
list. Each chunk contains aZSTR
, or null-terminated text string.
...and then it lists a table of sub-chunks, e.g. IARL
, IART
, and so on.
If I take the spec statement as "each chunk only contains a ZSTR
", then there wouldn't be sub-chunk IDs encoded. On the decoding side, there'd be no way to identify what each text was meant to convey, e.g. IART
for artist.
So that can't be right. If I instead interpret the statement as "use the standard chunk header we defined earlier in our spec followed by a ZSTR
", then that means an 8-byte header with chunk ID
and chunk data size
followed by a null-terminated string. That might be right, but it seems redundant, and I've definitely seen implementations of wave encoding that don't use this. Still, I figure this is probably the right interpretation.
A third way I've seen that seems optimal is ChunkID
+ ZSTR
. But it may not be standard.
Is there a spec-supported way that is correct? Or if specification truly is ambiguous, is there a defacto standard (very popular way of doing it)?