audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

fix: Fix lowLatency mode not working on Android (#1193)

Open ktakayama opened this issue 2 years ago • 0 comments

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

ktakayama avatar Jul 26 '22 13:07 ktakayama

Tests for lowLatency follow in #1238

Gustl22 avatar Aug 15 '22 15:08 Gustl22

LGTM, from my side can be safely merged (I tested), nothing to do with the current test failure.

Gustl22 avatar Aug 15 '22 16:08 Gustl22