pub struct SynthSourceImpl<Generator>{ /* private fields */ }Expand description
A synth source which runs an externally defined synth source generator.
Implementations§
Source§impl<Generator> SynthSourceImpl<Generator>
impl<Generator> SynthSourceImpl<Generator>
Trait Implementations§
Source§impl<Generator> Source for SynthSourceImpl<Generator>
impl<Generator> Source for SynthSourceImpl<Generator>
Source§fn channel_count(&self) -> usize
fn channel_count(&self) -> usize
The source’s output channel count.
Source§fn sample_rate(&self) -> u32
fn sample_rate(&self) -> u32
The source’s output sample rate.
Source§fn is_exhausted(&self) -> bool
fn is_exhausted(&self) -> bool
Returns whether the source finished playback. Exhausted sources should only return 0
on
write and may be removed from a source render graph.Source§fn weight(&self) -> usize
fn weight(&self) -> usize
Return a rough estimate of the processing costs for this source in range
~1..10,
where 1 means pretty lightweight and 10 very CPU intensive. This is used in parallel
processing to distribute work loads evenly before or without actual CPU measurements.Source§fn write(&mut self, output: &mut [f32], time: &SourceTime) -> usize
fn write(&mut self, output: &mut [f32], time: &SourceTime) -> usize
Write at most
output.len() samples into the interleaved output
The given SourceTime parameter specifies which absolute time this buffer in the
final output stream refers to. It can be used to schedule and apply real-time events.
Returns the number of written samples (not frames).Source§impl<Generator> SynthSource for SynthSourceImpl<Generator>
impl<Generator> SynthSource for SynthSourceImpl<Generator>
Source§fn synth_name(&self) -> String
fn synth_name(&self) -> String
Name of the synth for debugging or display purposes.
Source§fn playback_id(&self) -> PlaybackId
fn playback_id(&self) -> PlaybackId
A unique ID, which can be used to identify sources in
PlaybackStatusEventsSource§fn playback_options(&self) -> &SynthPlaybackOptions
fn playback_options(&self) -> &SynthPlaybackOptions
The synth source’s playback options
Source§fn playback_message_queue(&self) -> Arc<ArrayQueue<SynthPlaybackMessage>> ⓘ
fn playback_message_queue(&self) -> Arc<ArrayQueue<SynthPlaybackMessage>> ⓘ
Message queue to control this sources’s playback.
Source§fn playback_status_sender(&self) -> Option<SyncSender<PlaybackStatusEvent>>
fn playback_status_sender(&self) -> Option<SyncSender<PlaybackStatusEvent>>
Channel to receive file playback status from the synth.
fn set_playback_status_sender( &mut self, sender: Option<SyncSender<PlaybackStatusEvent>>, )
Source§fn playback_status_context(&self) -> Option<PlaybackStatusContext>
fn playback_status_context(&self) -> Option<PlaybackStatusContext>
Optional context passed along with the playback status.
fn set_playback_status_context( &mut self, context: Option<PlaybackStatusContext>, )
Auto Trait Implementations§
impl<Generator> !RefUnwindSafe for SynthSourceImpl<Generator>
impl<Generator> !UnwindSafe for SynthSourceImpl<Generator>
impl<Generator> Freeze for SynthSourceImpl<Generator>
impl<Generator> Send for SynthSourceImpl<Generator>
impl<Generator> Sync for SynthSourceImpl<Generator>
impl<Generator> Unpin for SynthSourceImpl<Generator>
impl<Generator> UnsafeUnpin for SynthSourceImpl<Generator>
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