FakeAudioSource

Struct FakeAudioSource 

Source
pub struct FakeAudioSource;

Trait Implementations§

Source§

impl AudioSource for FakeAudioSource

Source§

fn rate_hz(&self) -> f64

Source§

fn gain(&self) -> f64

Source§

fn take_samples(&mut self, _mclk: i64) -> Vec<(i32, i32)>

Stereo samples produced up to mclk since the last call.
Source§

fn applies_gain(&self) -> bool

True when the source’s samples already carry its gain (the PSG): the mixer must not apply it a second time.
Source§

impl Default for FakeAudioSource

Source§

fn default() -> FakeAudioSource

Returns the “default value” for a type. Read more
Source§

impl DeviceState for FakeAudioSource

Source§

fn save_state(&self) -> Vec<u8> ⓘ

Everything of the device that changes as the console runs.
Source§

fn load_state(&mut self, data: &[u8]) -> Result<(), String>

Put the device in a saved state. A device without state accepts only an empty one.
Source§

fn state_identity(&self) -> String

What the device is and which media it holds (a card’s ROM by its SHA-1, a disc by its table of contents): a state is refused by a system whose device answers otherwise.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.