getChannels method

  1. @override
int getChannels(
  1. Uint8List bytes
)
override

Gets the number of channels in the WAV file from the header bytes.

Implementation

@override
int getChannels(Uint8List bytes) {
  final data = ByteData.sublistView(bytes);

  return data.getUint16(
    22,
    Endian.little,
  );
}