pub struct ConcreteBaseAudioContext { /* private fields */ }
Expand description

The struct that corresponds to the Javascript BaseAudioContext object.

Please note that in rust, we need to differentiate between the BaseAudioContext trait and the ConcreteBaseAudioContext concrete implementation.

This object is returned from the base() method on AudioContext and OfflineAudioContext, or the context() method on AudioNodes.

The ConcreteBaseAudioContext allows for cheap cloning (using an Arc internally).

Implementations

The sample rate (in sample-frames per second) at which the AudioContext handles audio.

The raw sample rate of the AudioContext (which has more precision than the float sample_rate() value).

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.

Number of channels for the audio destination

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

retrieves the ConcreteBaseAudioContext associated with this AudioContext

Decode an AudioBuffer from a given input stream. Read more

Create an new “in-memory” AudioBuffer with the given number of channels, length (i.e. number of samples per channel) and sample rate. Read more

Creates a AnalyserNode

Creates an BiquadFilterNode which implements a second order filter

Creates an AudioBufferSourceNode

Creates an ConstantSourceNode, a source representing a constant value

Creates a ChannelMergerNode

Creates a ChannelSplitterNode

Creates a DelayNode, delaying the audio signal

Creates an GainNode, to control audio volume

Creates an IirFilterNode Read more

Creates a MediaStreamAudioSourceNode from a MediaStream

Creates a MediaStreamAudioDestinationNode

Creates an OscillatorNode, a source representing a periodic waveform.

Creates a PannerNode

Creates a periodic wave

Creates an StereoPannerNode to pan a stereo output

Creates a WaveShaperNode

Create an AudioParam. Read more

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

Returns the AudioListener which is used for 3D spatialization

The sample rate (in sample-frames per second) at which the AudioContext handles audio.

The raw sample rate of the AudioContext (which has more precision than the float sample_rate() value). Read more

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.