91 lines
1.7 KiB
Plaintext
91 lines
1.7 KiB
Plaintext
meta:
|
|
id: wav
|
|
file-extension: wav
|
|
encoding: ascii
|
|
endian: le
|
|
seq:
|
|
- id: magic
|
|
type: str
|
|
size: 4
|
|
- id: size
|
|
type: u4
|
|
- id: wave_str
|
|
type: str
|
|
size: 4
|
|
- id: sections
|
|
type: section
|
|
repeat: eos
|
|
instances: {}
|
|
types:
|
|
section:
|
|
seq:
|
|
- id: name
|
|
type: str
|
|
size: 4
|
|
- id: size
|
|
type: u4
|
|
- id: content
|
|
size: size
|
|
type:
|
|
switch-on: name
|
|
cases:
|
|
'"fmt "': fmt
|
|
'"data"': data
|
|
'"fact"': fact
|
|
'"PEAK"': peak
|
|
fmt:
|
|
seq:
|
|
- id: type
|
|
type: u2
|
|
- id: channels
|
|
type: u2
|
|
- id: samplerate
|
|
type: u4
|
|
- id: datarate
|
|
type: u4
|
|
doc: Might also be datarate per channel
|
|
- id: bytes_per_sample
|
|
type: u2
|
|
- id: bits_per_unit
|
|
type: u2
|
|
instances:
|
|
combined_type:
|
|
value: type * 100 + bits_per_unit
|
|
data:
|
|
seq:
|
|
- id: content
|
|
type: sample
|
|
repeat: eos
|
|
types:
|
|
sample:
|
|
seq:
|
|
- id: data
|
|
type:
|
|
switch-on: _root.sections[0].content.\
|
|
as<fmt>.combined_type
|
|
cases:
|
|
332: f4
|
|
108: u1
|
|
116: s2
|
|
132: s4
|
|
repeat: expr
|
|
repeat-expr: _root.sections[0].content.\
|
|
as<fmt>.channels
|
|
fact:
|
|
seq:
|
|
- id: samples
|
|
type: u4
|
|
peak:
|
|
seq:
|
|
- id: unknown_0
|
|
type: u4
|
|
- id: timestamp
|
|
type: u4
|
|
- id: peak
|
|
type: f4
|
|
- id: index
|
|
type: u4
|
|
enums: {}
|
|
doc: Hello, world
|
|
doc-ref: https://example.com
|