pub struct MonoToStereoProcessor<SampleType> { /* private fields */ }Expand description
An AudioProcessor which will use a “source channel” as the output for all channels.
Does not perform bounds checking.
Implementations§
Source§impl<SampleType> MonoToStereoProcessor<SampleType>
impl<SampleType> MonoToStereoProcessor<SampleType>
Sourcepub fn new(source_channel: usize) -> Self
pub fn new(source_channel: usize) -> Self
Use channel source_channel as the source for all output channels
Sourcepub fn set_source_channel(&mut self, source_channel: usize)
pub fn set_source_channel(&mut self, source_channel: usize)
Set the source_channel to use as the source for output
Sourcepub fn source_channel(&self) -> usize
pub fn source_channel(&self) -> usize
Get the source_channel to use as the source for output
Trait Implementations§
Source§impl<SampleType> AudioProcessor for MonoToStereoProcessor<SampleType>
impl<SampleType> AudioProcessor for MonoToStereoProcessor<SampleType>
type SampleType = SampleType
Source§fn process(
&mut self,
_context: &mut AudioContext,
buffer: &mut AudioBuffer<SampleType>,
)
fn process( &mut self, _context: &mut AudioContext, buffer: &mut AudioBuffer<SampleType>, )
Process a block of samples by mutating the input
AudioBufferSource§fn prepare(&mut self, _context: &mut AudioContext)
fn prepare(&mut self, _context: &mut AudioContext)
Prepare for playback based on current audio settings
Auto Trait Implementations§
impl<SampleType> Freeze for MonoToStereoProcessor<SampleType>
impl<SampleType> RefUnwindSafe for MonoToStereoProcessor<SampleType>where
SampleType: RefUnwindSafe,
impl<SampleType> Send for MonoToStereoProcessor<SampleType>where
SampleType: Send,
impl<SampleType> Sync for MonoToStereoProcessor<SampleType>where
SampleType: Sync,
impl<SampleType> Unpin for MonoToStereoProcessor<SampleType>where
SampleType: Unpin,
impl<SampleType> UnwindSafe for MonoToStereoProcessor<SampleType>where
SampleType: UnwindSafe,
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