Expand description
Multi-channel audio buffers in interleaved or deinterleaved layout. Multi-channel audio buffers.
A buffer is a flat slice of samples plus a BufferInfo recording how many channels and
frames it holds. The layout is a type parameter: Interleaved stores
one sample per channel per frame (what most audio APIs use), while
Deinterleaved stores each channel contiguously.
Encoding a layout in the type rather than a runtime flag means indexing is resolved at compile
time and the two cannot be mixed up. FromBytes and ToByteBufferRef convert to and from
raw bytes in a caller-chosen endianness.
Re-exports§
pub use info::BufferInfo;pub use layout::BufferLayout;
Modules§
Structs§
- Buffer
- Buffer multi-channel interlaced Audio.
- Buffer
Ref - A borrowed view of multi-channel audio: samples of type
Tin layoutL.
Enums§
- Error
- Errors from converting between buffers and raw bytes.
Traits§
- From
Bytes - Decodes a buffer from raw little- or big-endian bytes.
- ToByte
Buffer Ref - Encodes a buffer into raw bytes in a caller-chosen endianness.