Trait spectrusty_peripherals::bus::ay::AyAudioBusDevice
source · pub trait AyAudioBusDevice: BusDevice {
fn render_ay_audio<L: AmpLevels<B::SampleDelta>, B: Blep>(
&mut self,
blep: &mut B,
end_ts: <Self as BusDevice>::Timestamp,
frame_tstates: FTs,
chans: [usize; 3]
);
}
Expand description
This trait is being used by AyAudioFrame implementations to render AY-3-8910
audio with bus devices.
Allows for rendering audio frame using AyAudioFrame directly on the ControlUnit without the need to “locate” the Ay3_891xBusDevice in the daisy chain.
This trait is implemented autmatically for all BusDevices which implement PassByAyAudioBusDevice.
Required Methods§
Implementations on Foreign Types§
source§impl<D, N> AyAudioBusDevice for Box<OptionalBusDevice<D, N>>where
OptionalBusDevice<D, N>: AyAudioBusDevice + BusDevice,
impl<D, N> AyAudioBusDevice for Box<OptionalBusDevice<D, N>>where
OptionalBusDevice<D, N>: AyAudioBusDevice + BusDevice,
source§impl<D, N> AyAudioBusDevice for OptionalBusDevice<D, N>where
<D as BusDevice>::Timestamp: Into<FTs> + Copy,
D: AyAudioBusDevice + BusDevice,
N: AyAudioBusDevice + BusDevice<Timestamp = D::Timestamp>,
impl<D, N> AyAudioBusDevice for OptionalBusDevice<D, N>where
<D as BusDevice>::Timestamp: Into<FTs> + Copy,
D: AyAudioBusDevice + BusDevice,
N: AyAudioBusDevice + BusDevice<Timestamp = D::Timestamp>,
source§fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: D::Timestamp,
frame_tstates: FTs,
chans: [usize; 3]
)where
B: Blep,
L: AmpLevels<B::SampleDelta>,
fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: D::Timestamp,
frame_tstates: FTs,
chans: [usize; 3]
)where
B: Blep,
L: AmpLevels<B::SampleDelta>,
Note
If a device is being attached to an optional device the call will be forwarded to both: an optional device and to the next bus device.
source§impl<T> AyAudioBusDevice for dyn NamedBusDevice<T>where
T: Into<FTs> + Copy + Debug + 'static,
impl<T> AyAudioBusDevice for dyn NamedBusDevice<T>where
T: Into<FTs> + Copy + Debug + 'static,
source§fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: T,
frame_tstates: FTs,
chans: [usize; 3]
)where
L: AmpLevels<B::SampleDelta>,
B: Blep,
fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: T,
frame_tstates: FTs,
chans: [usize; 3]
)where
L: AmpLevels<B::SampleDelta>,
B: Blep,
Note
Because we need to guess the concrete type of the dynamic BusDevice
we can currently handle
only the most common cases: Ay3_891xMelodik and Ay3_891xFullerBox. If you use a customized
Ay3_891xBusDevice for a dynamic BusDevice
you need to render audio directly on the device
downcasted to your custom type.
source§impl<D> AyAudioBusDevice for Box<DynamicBus<D>>where
DynamicBus<D>: AyAudioBusDevice + BusDevice,
D: BusDevice,
impl<D> AyAudioBusDevice for Box<DynamicBus<D>>where
DynamicBus<D>: AyAudioBusDevice + BusDevice,
D: BusDevice,
source§impl<D> AyAudioBusDevice for DynamicBus<D>where
<D as BusDevice>::Timestamp: Into<FTs> + Copy + Debug + 'static,
D: AyAudioBusDevice + BusDevice,
impl<D> AyAudioBusDevice for DynamicBus<D>where
<D as BusDevice>::Timestamp: Into<FTs> + Copy + Debug + 'static,
D: AyAudioBusDevice + BusDevice,
source§fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: D::Timestamp,
frame_tstates: FTs,
chans: [usize; 3]
)where
B: Blep,
L: AmpLevels<B::SampleDelta>,
fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: D::Timestamp,
frame_tstates: FTs,
chans: [usize; 3]
)where
B: Blep,
L: AmpLevels<B::SampleDelta>,
Note
This implementation forwards a call to any recognizable Ay3_891xBusDevice device in a dynamic daisy-chain as well as to an upstream device.
source§impl<SD, D> AyAudioBusDevice for Box<DynamicSerdeBus<SD, D>>where
DynamicSerdeBus<SD, D>: AyAudioBusDevice + BusDevice,
D: BusDevice,
impl<SD, D> AyAudioBusDevice for Box<DynamicSerdeBus<SD, D>>where
DynamicSerdeBus<SD, D>: AyAudioBusDevice + BusDevice,
D: BusDevice,
source§impl<SD, D> AyAudioBusDevice for DynamicSerdeBus<SD, D>where
<D as BusDevice>::Timestamp: Into<FTs> + Copy + Debug + 'static,
D: AyAudioBusDevice + BusDevice,
impl<SD, D> AyAudioBusDevice for DynamicSerdeBus<SD, D>where
<D as BusDevice>::Timestamp: Into<FTs> + Copy + Debug + 'static,
D: AyAudioBusDevice + BusDevice,
source§fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: D::Timestamp,
frame_tstates: FTs,
chans: [usize; 3]
)where
B: Blep,
L: AmpLevels<B::SampleDelta>,
fn render_ay_audio<L, B>(
&mut self,
blep: &mut B,
end_ts: D::Timestamp,
frame_tstates: FTs,
chans: [usize; 3]
)where
B: Blep,
L: AmpLevels<B::SampleDelta>,
Note
This implementation forwards a call to any recognizable Ay3_891xBusDevice device in a dynamic daisy-chain as well as to an upstream device.