Expand description
AVTP audio streams for talker and listener entities: AAF and AM824 frames built and read (IEEE 1722-2016, 7 and 6.4), sent paced on gPTP time and received into a buffer the audio device plays, with audio from and to the computer’s devices through cpal, a test tone or nothing; and media clock streams, CRF (10), on the same time.
The media clock is gPTP’s: a talker sends its samples at the nominal rate of gPTP time, as gptpd gives it for the interface, and the audio device, on its own clock, is kept in step by resampling between the two, the ratio steered by the fill of a buffer between them.
Re-exports§
pub use clock::MediaClock;pub use listener::GroupListener;pub use listener::Listener;pub use listener::ListenerConfig;pub use listener::ListenerGroup;pub use listener::ListenerStats;pub use recovered::RecoveredClock;pub use talker::GroupConfig;pub use talker::GroupStream;pub use talker::GroupTalker;pub use talker::Talker;pub use talker::TalkerConfig;pub use talker::TalkerGroup;pub use talker::TalkerStats;
Modules§
- aaf
- AAF PDUs (IEEE 1722-2016, 7.2): the header and interleaved PCM samples, big endian.
- am824
- IEC 61883-6 AM824 PDUs (IEEE 1722-2016, 6.4): the 61883 header, the CIP header and data blocks of one labeled quadlet per channel, each a 24-bit sample after the multi-bit linear audio label.
- audio
- Where a talker’s samples come from and where a listener’s go: the computer’s audio devices through cpal, a test tone, or nothing.
- clock
- gPTP time as the media clock: the grandmaster’s time as gptpd gives it for the interface, a line against the monotonic clock the threads sleep on, read again ten times a second. gptpd moves no clock to carry the grandmaster’s time. A new line that does not carry the last one on, as from a grandmaster with time of its own, is a discontinuity the streams start again across, once records in a row confirm it; one that does, as gptpd restarting or taking over as grandmaster, is not, whatever gptpd numbers it. The line is read only while something asks for the time; one nothing read for a while has drifted, and the next record replaces it at once, as the first does.
- crf
- CRF PDUs (IEEE 1722-2016, 10): a media clock as the gPTP times of every so many of its events, 64 bits each, after a header.
- formats
- The stream formats an endpoint offers, the same for every program on these crates: the AVB community’s Basic and Extended Audio profiles’ AAF, in SR class A and B at 48, 96 and 192 kHz, and IEC 61883-6 AM824 in class A, as MOTU’s, Apple’s and PreSonus’s endpoints send; each stream size where its frame fits one Ethernet frame.
- listener
- Listeners of AAF or AM824: the frames of a stream, their samples played on the sink, counted as Milan’s stream input counters count them; and of a media clock, CRF, its frames counted alike.
- media
- The ways a stream carries samples, AAF and AM824, and a media clock, CRF, behind one layout: building a talker’s PDUs and reading a listener’s.
- realtime
- Real-time scheduling for the threads that pace and take frames, asked of RealtimeKit as PipeWire asks it, so a busy computer does not hold them up: no privileges needed in a desktop session. Without it they run as any thread does.
- recovered
- A media clock recovered from a CRF stream: the gPTP times its timestamps give its events, fitted to a line that a talker group’s samples then follow.
- talker
- Talkers of AAF or AM824: one frame each class interval, paced on gPTP time, its presentation time the max transit time ahead.