sampleRate property

int get sampleRate

Gets the sample rate (number of audio samples per second), either 8000 or 16000.

Implementation

int get sampleRate => _sampleRate;
set sampleRate (int value)

Sets the sample rate (number of audio samples per second) to either 8000 or 16000.

Throws: ArgumentError: If the sample rate is not 8000 or 16000.

Implementation

set sampleRate(int value) {
  if (value != 8000 && value != 16000) {
    throw ArgumentError('Sample rate must be 8000 or 16000');
  }
  _sampleRate = value;
}