-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I'm trying to decode opus audio data by trying to copy that part of the example in the documentation. However I can't even get it to compile. I'm assuming I'm doing something wrong, but since it's practically a simplified copy, don't know what.
import 'package:opus_flutter/opus_flutter.dart' as opus_flutter;
import 'package:opus_dart/opus_dart.dart';
static Future<Uint8List> decodeOpus(
Stream<Uint8List> input, int sampleRate) async {
List<Uint8List> output = [];
await input.transform(StreamOpusDecoder.bytes(
floatOutput: false,
sampleRate: sampleRate,
channels: 1,
copyOutput: true,
forwardErrorCorrection: false))
.cast<Uint8List>()
.forEach(output.add);
return output[0];
}
the error is
The argument type 'StreamOpusDecoder' can't be assigned to the parameter type 'StreamTransformer<Uint8List, dynamic>'.
Metadata
Metadata
Assignees
Labels
No labels