Trait oddio::Signal [−][src]
An audio signal
This interface is intended for use only from the code actually generating an audio signal for
output. For example, in a real-time application, Signal
s will typically be owned by the
real-time audio thread and not directly accessible from elsewhere. Access to an active signal
for other purposes (e.g. to adjust parameters) is generally through Handle
,
using signal-specific interfaces that implement wait-free inter-thread communication.
To ensure glitch-free audio, none of these methods should perform any operation that may wait. This includes locks, memory allocation or freeing, and even unbounded compare-and-swap loops.
Associated Types
Loading content...Required methods
fn sample(&self, interval: f32, out: &mut [Self::Frame])
[src]
Sample every interval
seconds starting at offset
from the cursor
interval
and offset
may be negative.
Provided methods
fn remaining(&self) -> f32
[src]
Seconds until data runs out
May be infinite for unbounded signals, or negative after advancing past the end.
fn into_stereo(self) -> MonoToStereo<Self> where
Self: Signal<Frame = Sample> + Sized,
[src]
Self: Signal<Frame = Sample> + Sized,
Convert a signal from mono to stereo by duplicating its output across both channels
fn with_gain(self) -> Gain<Self> where
Self: Sized,
[src]
Self: Sized,
Apply a dynamic gain control
Implementors
impl Signal for Sine
[src]
impl Signal for SpatialScene
[src]
type Frame = [Sample; 2]
fn sample(&self, interval: f32, out: &mut [[Sample; 2]])
[src]
fn remaining(&self) -> f32
[src]
impl Signal for Stream
[src]
type Frame = Sample
fn sample(&self, interval: f32, out: &mut [Sample])
[src]
fn remaining(&self) -> f32
[src]
impl<S: ?Sized> Signal for SplitSignal<S> where
S: Signal,
[src]
S: Signal,
type Frame = S::Frame
fn sample(&self, interval: f32, out: &mut [Self::Frame])
[src]
fn remaining(&self) -> f32
[src]
impl<T: Frame + Copy> Signal for Cycle<T>
[src]
impl<T: Frame + Copy> Signal for FramesSignal<T>
[src]
impl<T: Frame> Signal for Mixer<T>
[src]
impl<T: Signal + ?Sized> Signal for Stop<T>
[src]
type Frame = T::Frame
fn sample(&self, interval: f32, out: &mut [T::Frame])
[src]
fn remaining(&self) -> f32
[src]
impl<T: Signal> Signal for Gain<T> where
T::Frame: Frame,
[src]
T::Frame: Frame,
type Frame = T::Frame
fn sample(&self, interval: f32, out: &mut [T::Frame])
[src]
fn remaining(&self) -> f32
[src]
impl<T: Signal> Signal for Reinhard<T> where
T::Frame: Frame,
[src]
T::Frame: Frame,
type Frame = T::Frame
fn sample(&self, interval: f32, out: &mut [T::Frame])
[src]
fn remaining(&self) -> f32
[src]
impl<T: Signal> Signal for Speed<T> where
T::Frame: Frame,
[src]
T::Frame: Frame,