Expand description
PCM source and sink adapters for STREAM 6.
This crate keeps PCM I/O in library space. The in-memory source and sink
are deterministic test backends; stream observation still goes through
sim-lib-stream-core packets and spines.
Structs§
- Memory
PcmSink - In-memory
PcmSinkthat records every written buffer and flush. - Memory
PcmSource - In-memory
PcmSourcethat replays a fixed queue of buffers. - PcmBuffer
- Owned block of PCM audio: a
PcmSpecplus a frame count and the matching interleaved sample data. - PcmFormat
Descriptor - Runtime citizen that carries a
PcmSpecas astream/PcmFormatobject. - PcmPump
Summary - Tally of how much audio moved through a pump or stream-adapter run.
- PcmSpec
- Audio format description for a PCM stream: channel count, sample rate, and sample encoding.
Enums§
- PcmSample
Format - Sample encoding of a
PcmPacket.
Traits§
- PcmSink
- Push sink for PCM audio buffers in a fixed
PcmSpec. - PcmSource
- Pull source of PCM audio buffers in a fixed
PcmSpec.
Functions§
- f32_
interleaved_ to_ planar - Splits interleaved
f32samples into oneVecper channel. - f32_
planar_ to_ interleaved - Interleaves per-channel
f32planes into a single interleavedVec. - f32_
sample_ to_ i16 - Converts one normalized
f32sample toi16, clamping to[-1.0, 1.0]. - f32_
samples_ to_ i16 - Converts a slice of normalized
f32samples toi16viaf32_sample_to_i16. - i16_
interleaved_ to_ planar - Splits interleaved
i16samples into oneVecper channel. - i16_
planar_ to_ interleaved - Interleaves per-channel
i16planes into a single interleavedVec. - i16_
sample_ to_ f32 - Converts one
i16sample to the normalizedf32range[-1.0, 1.0]. - i16_
samples_ to_ f32 - Converts a slice of
i16samples to normalizedf32samples viai16_sample_to_f32. - pcm_
format_ class_ symbol - Returns the
stream/PcmFormatclass symbol under whichPcmFormatDescriptoris registered. - pcm_
source_ to_ stream - Drains a
PcmSourceinto a pull-modesim-lib-stream-coreStreamValue. - pump_
pcm - Drains
sourceintosink, then flushes the sink. - stream_
to_ pcm_ sink - Drains a
sim-lib-stream-coreStreamValueinto aPcmSink.