bitDepth property

int get bitDepth

Gets the bit depth (number of bits per audio sample), either 8 or 16.

Implementation

int get bitDepth => _bitDepth;
set bitDepth (int value)

Sets the bit depth (number of bits per audio sample) to either 8 or 16.

Throws: ArgumentError: If the bit depth is not 8 or 16.

Implementation

set bitDepth(int value) {
  if (value != 8 && value != 16) {
    throw ArgumentError('Bit depth must be 8 or 16');
  }
  _bitDepth = value;
}