Struct web_audio_api::context::AudioContext [−][src]
This interface represents an audio graph whose AudioDestinationNode is routed to a real-time output device that produces a signal directed at the user.
Implementations
impl AudioContext
[src]
pub fn new() -> Self
[src]
Creates and returns a new AudioContext object. This will play live audio on the default output
pub fn suspend(&self)
[src]
Suspends the progression of time in the audio context, temporarily halting audio hardware access and reducing CPU/battery usage in the process.
pub fn resume(&self)
[src]
Resumes the progression of time in an audio context that has previously been suspended/paused.
Trait Implementations
impl AsBaseAudioContext for AudioContext
[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]
impl Default for AudioContext
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AudioContext
impl !Send for AudioContext
impl !Sync for AudioContext
impl Unpin for AudioContext
impl !UnwindSafe for AudioContext
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>,