audioplayers
audioplayers copied to clipboard
fix: Fix lowLatency mode not working on Android (#1193)
Description
Low Latency mode does not work on Android. I think fix #1193 problem.
Here is sample code.
Work fine
final file = AssetSource("sounds/sound.mp3");
final player = AudioPlayer();
player.setPlayerMode(PlayerMode.lowLatency);
player.play(file);
Does not work
final file = AssetSource("sounds/sound.mp3");
final player = AudioPlayer();
await player.setPlayerMode(PlayerMode.lowLatency);
player.play(file);
Does not work
final file = AssetSource("sounds/sound.mp3");
final player = AudioPlayer();
player.play(file, mode: PlayerMode.lowLatency);
Checklist
- [x] The title of my PR starts with a [Conventional Commit] prefix (
fix:
,feat:
,docs:
,chore:
etc). - [x] I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
- [ ] I have updated/added tests for ALL new/updated/fixed functionality.
- [ ] I have updated/added relevant documentation and added dartdoc comments with
///
, where necessary. - [ ] I have updated/added relevant examples in [example].
Breaking Change
- [ ] Yes, this is a breaking change.
- [x] No, this is not a breaking change.
Related Issues
fixes #1193
Tests for lowLatency follow in #1238
LGTM, from my side can be safely merged (I tested), nothing to do with the current test failure.