Struct web_audio_api::context::BaseAudioContext [−][src]
pub struct BaseAudioContext { /* fields omitted */ }
Expand description
The BaseAudioContext interface represents an audio-processing graph built from audio modules linked together, each represented by an AudioNode. An audio context controls both the creation of the nodes it contains and the execution of the audio processing, or decoding.
Implementations
impl BaseAudioContext
[src]
impl BaseAudioContext
[src]pub fn sample_rate(&self) -> SampleRate
[src]
pub fn sample_rate(&self) -> SampleRate
[src]The sample rate (in sample-frames per second) at which the AudioContext handles audio.
pub fn current_time(&self) -> f64
[src]
pub fn current_time(&self) -> f64
[src]This is the time in seconds of the sample frame immediately following the last sample-frame in the block of audio most recently processed by the context’s rendering graph.
pub fn register<T: AudioNode, F: FnOnce(AudioContextRegistration) -> (T, Box<dyn AudioProcessor>)>(
&self,
f: F
) -> T
[src]
pub fn register<T: AudioNode, F: FnOnce(AudioContextRegistration) -> (T, Box<dyn AudioProcessor>)>(
&self,
f: F
) -> T
[src]Construct a new pair of node::AudioNode
and AudioProcessor
The AudioNode lives in the user-facing control thread. The Processor is sent to the render thread.
Trait Implementations
impl AsBaseAudioContext for BaseAudioContext
[src]
impl AsBaseAudioContext for BaseAudioContext
[src]fn base(&self) -> &BaseAudioContext
[src]
fn create_oscillator(&self) -> OscillatorNode
[src]
fn create_oscillator(&self) -> OscillatorNode
[src]Creates an OscillatorNode, a source representing a periodic waveform. It basically generates a tone. Read more
fn create_gain(&self) -> GainNode
[src]
fn create_gain(&self) -> GainNode
[src]Creates an GainNode, to control audio volume
fn create_constant_source(&self) -> ConstantSourceNode
[src]
fn create_constant_source(&self) -> ConstantSourceNode
[src]Creates an ConstantSourceNode, a source representing a constant value
fn create_delay(&self, max_delay_time: f32) -> DelayNode
[src]
fn create_delay(&self, max_delay_time: f32) -> DelayNode
[src]Creates a DelayNode, delaying the audio signal
fn create_channel_splitter(&self, number_of_outputs: u32) -> ChannelSplitterNode
[src]
fn create_channel_splitter(&self, number_of_outputs: u32) -> ChannelSplitterNode
[src]Creates a ChannelSplitterNode
fn create_channel_merger(&self, number_of_inputs: u32) -> ChannelMergerNode
[src]
fn create_channel_merger(&self, number_of_inputs: u32) -> ChannelMergerNode
[src]Creates a ChannelMergerNode
fn create_media_stream_source<M: MediaStream>(
&self,
media: M
) -> MediaStreamAudioSourceNode
[src]
fn create_media_stream_source<M: MediaStream>(
&self,
media: M
) -> MediaStreamAudioSourceNode
[src]Creates a MediaStreamAudioSourceNode from a MediaElement
fn create_media_element_source(
&self,
media: MediaElement
) -> MediaElementAudioSourceNode
[src]
fn create_media_element_source(
&self,
media: MediaElement
) -> MediaElementAudioSourceNode
[src]Creates a MediaElementAudioSourceNode from a MediaElement Read more
fn create_buffer_source(&self) -> AudioBufferSourceNode
[src]
fn create_buffer_source(&self) -> AudioBufferSourceNode
[src]Creates an AudioBufferSourceNode Read more
fn create_panner(&self) -> PannerNode
[src]
fn create_panner(&self) -> PannerNode
[src]Creates a PannerNode
fn create_analyser(&self) -> AnalyserNode
[src]
fn create_analyser(&self) -> AnalyserNode
[src]Creates a AnalyserNode
fn create_audio_param(
&self,
opts: AudioParamOptions,
dest: &AudioNodeId
) -> (AudioParam, AudioParamId)
[src]
fn create_audio_param(
&self,
opts: AudioParamOptions,
dest: &AudioNodeId
) -> (AudioParam, AudioParamId)
[src]Create an AudioParam. Read more
fn destination(&self) -> DestinationNode
[src]
fn destination(&self) -> DestinationNode
[src]Returns an AudioDestinationNode representing the final destination of all audio in the context. It can be thought of as the audio-rendering device. Read more
fn listener(&self) -> AudioListener
[src]
fn listener(&self) -> AudioListener
[src]Returns the AudioListener which is used for 3D spatialization
fn sample_rate(&self) -> SampleRate
[src]
fn sample_rate(&self) -> SampleRate
[src]The sample rate (in sample-frames per second) at which the AudioContext handles audio.
fn current_time(&self) -> f64
[src]
fn current_time(&self) -> f64
[src]This is the time in seconds of the sample frame immediately following the last sample-frame in the block of audio most recently processed by the context’s rendering graph. Read more
impl Clone for BaseAudioContext
[src]
impl Clone for BaseAudioContext
[src]fn clone(&self) -> BaseAudioContext
[src]
fn clone(&self) -> BaseAudioContext
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for BaseAudioContext
impl Send for BaseAudioContext
impl Sync for BaseAudioContext
impl Unpin for BaseAudioContext
impl UnwindSafe for BaseAudioContext
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more