files/en-us/web/api/audiodata/audiodata/index.md
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}
The AudioData() constructor creates a new {{domxref("AudioData")}} object which represents an individual audio sample.
new AudioData(init)
init
format
sampleRate
numberOfFrames
numberOfChannels
timestamp
data
transfer
AudioData will detach and take ownership of. If the array contains the {{jsxref("ArrayBuffer")}} backing data, AudioData will use that buffer directly instead of copying from it.init is in an incorrect format.{{Specifications}}
{{Compat}}