Pcm constructor
Pcm(
- AudioFormat audioFormat, {
- required Depth? depth,
- required Endianness? endianness,
- required NbChannels? nbChannels,
- required int? sampleRate,
Implementation
/* ctor */ Pcm(
AudioFormat audioFormat, {
required this.depth,
required this.endianness,
required this.nbChannels,
required this.sampleRate,
}) {
this.audioFormat = audioFormat;
switch (audioFormat) {
case AudioFormat.wav:
deprecatedCodec = Codec.pcm16WAV;
break;
case AudioFormat.aiff:
deprecatedCodec = Codec.pcm16AIFF;
break;
case AudioFormat.webm:
deprecatedCodec = Codec.pcmWebM;
break;
case AudioFormat.caf:
deprecatedCodec = Codec.pcm16CAF;
break;
case AudioFormat.raw:
deprecatedCodec = Codec.pcm16;
break;
default:
throw Exception('Bad Audio Format');
}
}