feed method
Feeds the player with raw PCM data
block
Throws an Exception if the player is not initialized
The format of data
must comply with the pcmType
used to initialize the player.
And the size of data
should not be too small to cause underrun
Implementation
Future<void> feed(Uint8List data) async {
// print('RS:---> feed');
await _lock.synchronized(() async {
_ensureInited();
var state = await RawSoundPlayerPlatform.instance.feed(
this,
data,
);
_playState = PlayState.values[state];
});
// print('RS:<--- feed');
}