getAudioInputStream method
Implementation
@override
Stream<Uint8List> getAudioInputStream() {
return eventChannel.receiveBroadcastStream().map((event) {
if (event is Uint8List) {
return event;
} else if (event is List<int>) {
return Uint8List.fromList(event);
} else {
throw Exception('Unexpected audio data type: ${event.runtimeType}');
}
});
}