| // Copyright 2020 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // https://github.com/WICG/web-codecs |
| [ |
| Exposed=(Window,DedicatedWorker), |
| RuntimeEnabled=WebCodecs |
| ] interface AudioData { |
| [RaisesException] constructor(AudioDataInit init); |
| |
| // Creates identical AudioData, which needs to be independently closed. |
| [RaisesException] AudioData clone(); |
| |
| void close(); |
| |
| [RaisesException] unsigned long allocationSize(AudioDataCopyToOptions options); |
| [RaisesException] void copyTo([AllowShared] BufferSource destination, |
| AudioDataCopyToOptions options); |
| |
| readonly attribute AudioSampleFormat format; |
| readonly attribute unsigned long sampleRate; |
| readonly attribute unsigned long numberOfFrames; |
| readonly attribute unsigned long numberOfChannels; |
| readonly attribute unsigned long long duration; |
| readonly attribute long long timestamp; // microseconds |
| }; |