Struct web_audio_api::context::BaseAudioContext [−][src]
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]
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]
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 channels(&self) -> u32
[src]
Number of channels for the audio destination
pub fn register<'a, T: AudioNode, F: FnOnce(AudioContextRegistration<'a>) -> (T, Box<dyn AudioProcessor>)>(
&'a self,
f: F
) -> T
[src]
&'a self,
f: F
) -> T
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]
fn base(&self) -> &BaseAudioContext
[src]
fn create_oscillator(&self) -> OscillatorNode<'_>
[src]
fn create_gain(&self) -> GainNode<'_>
[src]
fn create_constant_source(&self) -> ConstantSourceNode<'_>
[src]
fn create_delay(&self) -> DelayNode<'_>
[src]
fn create_channel_splitter(
&self,
number_of_outputs: u32
) -> ChannelSplitterNode<'_>
[src]
&self,
number_of_outputs: u32
) -> ChannelSplitterNode<'_>
fn create_channel_merger(&self, number_of_inputs: u32) -> ChannelMergerNode<'_>
[src]
fn create_media_stream_source<M: MediaStream>(
&self,
media: M
) -> MediaStreamAudioSourceNode<'_>
[src]
&self,
media: M
) -> MediaStreamAudioSourceNode<'_>
fn create_media_element_source<M: MediaStream>(
&self,
media: MediaElement<M>
) -> MediaElementAudioSourceNode<'_>
[src]
&self,
media: MediaElement<M>
) -> MediaElementAudioSourceNode<'_>
fn create_buffer_source(&self) -> AudioBufferSourceNode<'_>
[src]
fn create_panner(&self) -> PannerNode<'_>
[src]
fn create_audio_param(
&self,
opts: AudioParamOptions,
dest: &AudioNodeId
) -> (AudioParam<'_>, AudioParamId)
[src]
&self,
opts: AudioParamOptions,
dest: &AudioNodeId
) -> (AudioParam<'_>, AudioParamId)
fn destination(&self) -> DestinationNode<'_>
[src]
fn listener(&self) -> AudioListener<'_>
[src]
fn sample_rate(&self) -> SampleRate
[src]
fn current_time(&self) -> f64
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,