Struct web_audio_api::buffer::AudioBuffer [−][src]
pub struct AudioBuffer { /* fields omitted */ }
Expand description
Memory-resident audio asset, basically a matrix of channels * samples
An AudioBuffer has copy-on-write semantics, so it is cheap to clone.
- MDN documentation: https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer
- specification: https://webaudio.github.io/web-audio-api/#AudioBuffer
- see also:
AsBaseAudioContext::create_buffer
Implementations
Allocate a silent audiobuffer with AudioBufferOptions
Convert raw samples to an AudioBuffer
The outer Vec determine the channels. The inner Vecs should have the same length.
Panics
This function will panic if samples
is an empty Vec or if any of its elements have
different lengths.
Number of channels in this AudioBuffer
Sample rate of this AudioBuffer
in Hertz
Copy data from a given channel to the given Vec
Copy data from a given channel to the given Vec
starting at offset
Copy data from a given source to the given channel.
Copy data from a given source to the given channel starting at offset
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AudioBuffer
impl Send for AudioBuffer
impl Sync for AudioBuffer
impl Unpin for AudioBuffer
impl UnwindSafe for AudioBuffer
Blanket Implementations
Mutably borrows from an owned value. Read more