removeProcessedBytes method

void removeProcessedBytes(
  1. int count
)

Remove the first N bytes from buffer (after processing)

Implementation

void removeProcessedBytes(int count) {
  if (count >= _audioBuffer.length) {
    _audioBuffer.clear();
  } else {
    _audioBuffer.removeRange(0, count);
  }
  debugPrint(
      'Removed $count bytes, buffer now: ${_audioBuffer.length} bytes');
}