start method

Future<void> start (
  1. Function listener,
  2. Function onError,
  3. {int sampleRate: 44000,
  4. int bufferSize: 5000}
)

Implementation

Future<void> start(Function listener, Function onError,
    {int sampleRate = 44000, int bufferSize = 5000}) async {
  if (_audioCaptureEventChannelSubscription != null) return;
  _audioCaptureEventChannelSubscription = _audioCaptureEventChannel
      .receiveBroadcastStream({
    "sampleRate": sampleRate,
    "bufferSize": bufferSize
  }).listen(listener, onError: onError);
}