[][src]Enum ether_dream::dac::Playback

pub enum Playback {
    Idle,
    Prepared,
    Playing,
}

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.

Methods

impl Playback[src]

pub fn from_protocol(state: u8) -> Option<Self>[src]

Create a Playback enum from the lower-level protocol representation.

Returns None if the given state byte is not known.

pub fn to_protocol(&self) -> u8[src]

Convert the LightEngine enum to its lower-level protocol representation.

Trait Implementations

impl Clone for Playback[src]

impl Copy for Playback[src]

impl Debug for Playback[src]

impl Eq for Playback[src]

impl Hash for Playback[src]

impl PartialEq<Playback> for Playback[src]

impl StructuralEq for Playback[src]

impl StructuralPartialEq for Playback[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.