Skip to main content

Module source

Module source 

Source
Expand description

Where blocks come from and where they go.

An AudioSource fills a caller buffer with exactly one block; an AudioSink consumes one. A PDM microphone, an I2S codec, a UDP socket and a WAV file are all one of these, so a pipeline never knows which.

Structs§

CountingSink
Counts what it is given and remembers where the stream has got to.
SineSource
A deterministic test tone: a sine at freq_hz and peak amplitude, the same on every channel, with timestamps that advance by block duration.

Traits§

AudioSink
Consumes blocks of PCM.
AudioSource
Produces fixed-size blocks of PCM into caller memory.