Food.
The τ Player API
Food
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:
This example shows how to play Live data, without Back Pressure from Flutter Sound
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 ...