chromium/third_party/blink/renderer/modules/webcodecs/audio_decoder_config.idl

// Copyright 2020 The Chromium Authors
// 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

// NOTE: Keep this strucutre in sync with CopyConfig() defined in
// audio_decoder.cc.

dictionary AudioDecoderConfig {
  required DOMString codec;

  // Rate of samples per second. 44100, 48000, etc.
  required [EnforceRange] unsigned long sampleRate;

  // 1, 2, etc.
  required [EnforceRange] unsigned long numberOfChannels;

  // Optional byte data required to initialize audio decoders such as Vorbis
  // codebooks.
  AllowSharedBufferSource description;

  [RuntimeEnabled=MediaSourceExtensionsForWebCodecs] DOMString encryptionScheme;
};