pub struct PanProcessor<SampleType> { /* private fields */ }Expand description
An AudioProcessor that applies panning on its input.
Does not perform any bounds checking.
Implementations§
Source§impl<SampleType: Float> PanProcessor<SampleType>
impl<SampleType: Float> PanProcessor<SampleType>
Sourcepub fn new(panning: SampleType) -> Self
pub fn new(panning: SampleType) -> Self
Create a processor with panning. -1 represents using the left channel only, 1 represents using the right channel only.
Sourcepub fn panning(&self) -> SampleType
pub fn panning(&self) -> SampleType
-1 represents using the left channel only, 1 represents using the right channel only.
Sourcepub fn set_panning(&mut self, panning: SampleType)
pub fn set_panning(&mut self, panning: SampleType)
Set the panning.
-1 represents using the left channel only, 1 represents using the right channel only.
Trait Implementations§
Source§impl<SampleType> AudioProcessor for PanProcessor<SampleType>
impl<SampleType> AudioProcessor for PanProcessor<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 PanProcessor<SampleType>where
SampleType: Freeze,
impl<SampleType> RefUnwindSafe for PanProcessor<SampleType>where
SampleType: RefUnwindSafe,
impl<SampleType> Send for PanProcessor<SampleType>where
SampleType: Send,
impl<SampleType> Sync for PanProcessor<SampleType>where
SampleType: Sync,
impl<SampleType> Unpin for PanProcessor<SampleType>where
SampleType: Unpin,
impl<SampleType> UnwindSafe for PanProcessor<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