[−][src]Trait spectrusty::audio::AudioFrame
A common trait for controllers rendering square-wave audio pulses.
This trait defines common methods to interface Blep implementations.
Required methods
pub fn ensure_audio_frame_time(
&self,
blep: &mut B,
sample_rate: u32,
cpu_hz: f64
)
[src]
&self,
blep: &mut B,
sample_rate: u32,
cpu_hz: f64
)
Sets up the Blep time rate and ensures there is enough room for the single frame's audio data.
sample_rate
is the number of samples per second of the rendered audio,cpu_hz
is the number of the emulated CPU cycles (T-states) per second.
pub fn get_audio_frame_end_time(&self) -> i32
[src]
Returns a timestamp to be passed to Blep to end the frame.
Panics
Panics if the current frame execution didn't get to the near of end-of-frame. To check if you can actually call this method, invoke FrameState::is_frame_over.
Provided methods
pub fn end_audio_frame(&self, blep: &mut B) -> usize
[src]
Calls Blep::end_frame to finalize the frame and prepare it for rendition.
Returns a number of samples ready to be rendered in a single channel.
Panics
Panics if the current frame execution didn't get to the near of end-of-frame. To check if you can actually call this method, invoke FrameState::is_frame_over.
Implementors
impl<A, M, B, X, V> AudioFrame<A> for Scld<M, B, X, V> where
A: Blep,
M: PagedMemory8k,
Ula<M, B, X, V>: AudioFrame<A>,
[src]
A: Blep,
M: PagedMemory8k,
Ula<M, B, X, V>: AudioFrame<A>,
pub fn ensure_audio_frame_time(
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)
[src]
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)
pub fn get_audio_frame_end_time(&self) -> FTs
[src]
impl<A, M, B, X, V> AudioFrame<A> for Ula<M, B, X, V> where
A: Blep,
V: VideoFrame,
[src]
A: Blep,
V: VideoFrame,
pub fn ensure_audio_frame_time(
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)
[src]
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)
pub fn get_audio_frame_end_time(&self) -> FTs
[src]
impl<A, U> AudioFrame<A> for UlaPlus<U> where
A: Blep,
U: Video + AudioFrame<A>,
[src]
A: Blep,
U: Video + AudioFrame<A>,
pub fn ensure_audio_frame_time(
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)
[src]
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)
pub fn get_audio_frame_end_time(&self) -> FTs
[src]
impl<B, D, X> AudioFrame<B> for Ula3<D, X> where
B: Blep,
Ula<Memory128kPlus, D, X, Ula3VidFrame>: AudioFrame<B>,
[src]
B: Blep,
Ula<Memory128kPlus, D, X, Ula3VidFrame>: AudioFrame<B>,
pub fn ensure_audio_frame_time(
&self,
blep: &mut B,
sample_rate: u32,
cpu_hz: f64
)
[src]
&self,
blep: &mut B,
sample_rate: u32,
cpu_hz: f64
)
pub fn get_audio_frame_end_time(&self) -> FTs
[src]
impl<B, D, X> AudioFrame<B> for Ula128<D, X> where
B: Blep,
Ula<Memory128k, D, X, Ula128VidFrame>: AudioFrame<B>,
[src]
B: Blep,
Ula<Memory128k, D, X, Ula128VidFrame>: AudioFrame<B>,
pub fn ensure_audio_frame_time(
&self,
blep: &mut B,
sample_rate: u32,
cpu_hz: f64
)
[src]
&self,
blep: &mut B,
sample_rate: u32,
cpu_hz: f64
)
pub fn get_audio_frame_end_time(&self) -> FTs
[src]
impl<P, A: Blep> AudioFrame<A> for AyPlayer<P>
[src]
pub fn ensure_audio_frame_time(
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)
[src]
&self,
blep: &mut A,
sample_rate: u32,
cpu_hz: f64
)