Closed Noxxys closed 4 years ago
Flame provides a tool called AudioPool
that might give some idea as how to improve latency: https://github.com/flame-engine/flame/blob/master/lib/audio_pool.dart
we use that in our games but even with regular AP instances we notice no major delay (at least for a game perspective, probably your real time instrument app requires even more perspective)
as an example, take a look at gravity runner using audiopools to play the coin sounds, it's pretty instantaneous as far as I can tell:
https://github.com/fireslime/gravitational_waves/blob/master/game/lib/game/audio.dart
I just discovered that the delay was caused by my bluetooth headset. When I use the phone's speakers, there's barely any perceptible delay. My apologies.
Hi, I'm using the
AudioCache
in an attempt to make a music instrument app, which uses assets that can be played simultaneously and with low latency. The problem is that the latency is very perceptible, sometimes up to half a second. I've also tested it on my Samsung Galaxy S10+ in release mode.I'm using Flutter version 1.12.13+hotfix.5 and Audioplayers version 0.13.7.
Here's my code: