Opus constructor

Opus(
  1. AudioFormat audioFormat
)

Implementation

/* ctor */ Opus(
  AudioFormat audioFormat,
) {
  this.audioFormat = audioFormat;
  switch (audioFormat) {
    case AudioFormat.ogg:
      deprecatedCodec = Codec.opusOGG;
      break;
    case AudioFormat.caf:
      deprecatedCodec = Codec.opusCAF;
      break;
    case AudioFormat.webm:
      deprecatedCodec = Codec.opusWebM;
      break;
    default:
      throw Exception('Bad Audio Format');
  }
}