arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

The Ï„ Player API

Food.

hashtag
Food

  • Dart API: foodarrow-up-right.

  • Dart API: .

  • Dart API: .

This are the objects that you can add to foodSink The Food class has two others inherited classes :

  • FoodData (the buffers that you want to play)

  • FoodEvent (a call back to be called after a resynchronisation)

Example:

shows how to play Live data, without Back Pressure from Flutter Sound

</div>

foodDataarrow-up-right
foodarrow-up-right
This examplearrow-up-right
Dart
Javascript

await myPlayer.startPlayerFromStream(codec: Codec.pcm16, numChannels: 1, sampleRate: 48000);

myPlayer.foodSink.add(FoodData(aBuffer));
myPlayer.foodSink.add(FoodData(anotherBuffer));
myPlayer.foodSink.add(FoodData(myOtherBuffer));
myPlayer.foodSink.add(FoodEvent(()async {await _mPlayer.stopPlayer(); setState((){});}));

        Lorem ipsum ...