Skip to main content Link Menu Expand (external link) Document Search Copy Copied
int16Sink property - FlutterSoundPlayer class - player library - Dart API
menu
int16Sink

int16Sink property

StreamSink<List<Int16List>>? get int16Sink

Getter of one of the three StreamSink that you may use to feed a player from Stream.


This stream is used when you have NOT interleaved audio data and you don't want a flow control. You can look to this small guide if you need precisions.

Return

The StreamSink that you may use to feed the player

example

await myPlayer.startPlayerFromStream
(
    codec: Codec.pcm16
    numChannels: 2
    sampleRate: 48100
    interleaved: false,
);

myPlayer.int16Sink.add(myData);

See also


Implementation

StreamSink<List<Int16List>>? get int16Sink =>
    _pcmInt16Controller != null ? _pcmInt16Controller!.sink : null;
flutter_sound 9.25.3