pub enum Playback {
Idle,
Prepared,
Playing,
}Expand description
The DAC has one playback system, which buffers data and sends it to the analog output hardware at its current point rate. At any given time, the playback system is connected to a source. Usually the source is the network streamer, which uses this protocol. However, other sources exist, such as a built-in abstract generator and file playback from SD card. The playback system is in one of the following states.
Variants§
Idle
The default state:
- No points may be added to the buffer.
- No output is generated.
- All analog outputs are at 0v.
- The shutter is controlled by the data source.
Prepared
The buffer will accept points.
The output is the same as the Idle state
Playing
Points are being sent to the output.
Implementations§
Source§impl Playback
impl Playback
Sourcepub fn from_protocol(state: u8) -> Option<Self>
pub fn from_protocol(state: u8) -> Option<Self>
Create a Playback enum from the lower-level protocol representation.
Returns None if the given state byte is not known.
Sourcepub fn to_protocol(&self) -> u8
pub fn to_protocol(&self) -> u8
Convert the LightEngine enum to its lower-level protocol representation.
Trait Implementations§
impl Copy for Playback
impl Eq for Playback
impl StructuralPartialEq for Playback
Auto Trait Implementations§
impl Freeze for Playback
impl RefUnwindSafe for Playback
impl Send for Playback
impl Sync for Playback
impl Unpin for Playback
impl UnsafeUnpin for Playback
impl UnwindSafe for Playback
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more