Note: This feature is available in Dedicated Web Workers.
The AudioData() constructor creates a new AudioData object which represents an individual audio sample.
new AudioData(init)initAn object containing the following:
formatOne of:
sampleRateA decimal containing the sample rate in Hz.
numberOfFramesAn integer containing the number of frames in this sample.
numberOfChannelsAn integer containing the number of channels in this sample.
timestampAn integer indicating the data's time in microseconds.
dataA typed array of the audio data for this sample.
transferAn array of ArrayBuffers that AudioData will detach and take ownership of. If the array contains the ArrayBuffer backing data, AudioData will use that buffer directly instead of copying from it.
TypeErrorThrown if init is in an incorrect format.