Skip to main content

Module audio_player

Module audio_player 

Source
Expand description

A player for one piece of audio, over a transport this crate does not own.

§What this component will not do

It does not play anything. Every control asks the MediaTransport and reports what the transport answered. A refused command leaves the state that still holds, because the next frame draws the transport’s snapshot rather than what the control wished for.

It does not run a clock. The position is the transport’s, read once per frame. A player with no transport draws no scrubber at all: a track with a head at zero would say playback exists and has not started, and neither half of that is true.

It does not draw a waveform it did not measure. Peaks are a caller input, the way an image’s natural size is. A player given none shows the transport and nothing above it, rather than a decorative envelope that would read as the shape of this particular sound.

It does not format a time. Elapsed and remaining are the host’s own strings, exactly as TransportBar takes them.

It says where its facts came from. A fixture transport is published as one and drawn as one.

Structs§

AudioPlayer
A player for one piece of audio.