Basic audio data container. Provides lightweight Web Audio API AudioBuffer implementation. Useful instead of Buffer in audio streams, @audiojs components and other audio applications. Can be used as a ponyfill.
Create audio buffer for audio
context based on
context is audio-context singleton.
null context can be used to indicate context-free buffer instance, eg. in nodejs.
length— number of samples, minimum is 1.
sampleRate— default sample rate is 44100.
numberOfChannels— default number of channels is 1.
Duration of the underlying audio data, in seconds.
Number of samples per channel.
Default sample rate is 44100.
Default number of channels is 1.
Get array containing the data for the channel (not copied).
Place data from channel to destination Float32Array.
Place data from source Float32Array to the channel.