Expand description
WAV, BWF, RF64 and AIFF audio as a table of sample frames. The file is memory-mapped
and a chunk walker finds the format and samples; row i is at
data_offset + i * frame_bytes, so any window decodes from its own bytes (a 20 GB
recording reads a screenful). Every stated length is checked against the file
before use, so a hostile header errors rather than panics or over-allocates. The row
count comes from the file size, letting a still-recording file grow
([AudioSource::extend]): recorders write a placeholder data size until they stop.
Structs§
- Audio
Header - What the header says: the format, where the samples are, and everything else the Info panel shows.
- Audio
Source - An open audio file: its header and a map of its bytes, read a window at a time.
- Marker
- A marker or region from a
cue(withLIST adtllabels) orMARKchunk. - Signal
Report - What
AudioSource::signal_reportmeasured of one channel.
Enums§
Constants§
- CLIP_
RUN - The shortest run of samples at full scale that counts as clipping. One sample there is a loud peak; three in a row is the waveform flattened against the limit.
- FRAME
- The name of the frame-number column.
- SECONDS
- The name of the column of each frame’s time from the start, in seconds. A float
rather than a Duration: it charts, compares and reads as a plain number
(
12.345625), where a Duration displays as mixed units.
Functions§
- detail
- The Audio tab: the file’s format, size and length, then its metadata (
bext, iXML,LIST INFO, AIFF text) and markers, markers last. - looks_
like_ audio - Whether the first bytes are a WAV, RF64, BW64 or AIFF file.
- read_
header - Read the header of a whole file’s bytes.