files/en-us/web/api/audiodata/allocationsize/index.md
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}
The allocationSize() method of the {{domxref("AudioData")}} interface returns the size in bytes required to hold the current sample as filtered by options passed into the method.
allocationSize(options)
options
planeIndex
frameOffset {{optional_inline}}
0.frameCount {{optional_inline}}
frameOffset.An integer containing the number of bytes needed to hold the samples described by options.
The following example gets the size of the plane at index 1.
let size = AudioData.allocationSize({ planeIndex: 1 });
{{Specifications}}
{{Compat}}