Struct audio_processor_utility::pan::PanProcessor
source · [−]pub struct PanProcessor<SampleType> { /* private fields */ }Expand description
An AudioProcessor that applies panning on its input.
Does not perform any bounds checking.
Implementations
sourceimpl<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
sourceimpl<SampleType: Float> Default for PanProcessor<SampleType>
impl<SampleType: Float> Default for PanProcessor<SampleType>
sourceimpl<SampleType> SimpleAudioProcessor for PanProcessor<SampleType>where
SampleType: Float + Sync + Send,
impl<SampleType> SimpleAudioProcessor for PanProcessor<SampleType>where
SampleType: Float + Sync + Send,
type SampleType = SampleType
sourcefn s_process_frame(&mut self, frame: &mut [SampleType])
fn s_process_frame(&mut self, frame: &mut [SampleType])
Process a multi-channel frame. Read more
sourcefn s_prepare(&mut self, _settings: AudioProcessorSettings)
fn s_prepare(&mut self, _settings: AudioProcessorSettings)
Prepare for playback based on current audio settings
sourcefn s_process(&mut self, sample: Self::SampleType) -> Self::SampleType
fn s_process(&mut self, sample: Self::SampleType) -> Self::SampleType
Process a single sample. If the input is mult-channel, will run for each channel by default.
If the processor is multi-channel, implement s_process_frame instead. Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more