startStream method

Future<Stream<Uint8List>> startStream(
  1. RecordConfig config
)

Implementation

Future<Stream<Uint8List>> startStream(
  RecordConfig config,
) async {
  switch (config.encoder) {
    case AudioEncoder.pcm16bits:
      await _delegate?.dispose();
      _delegate = MicRecorderDelegate(onStateChanged: _updateState);
      return _delegate!.startStream(config);
    default:
      throw Exception('Stream not supported.');
  }
}