@ryanheise Thank you very much for providing audio_seesion, just_audio and and audio_service packages!
On some Android devices it happens that audio files are played with a few hundred milliseconds delay. This leads to the effect that short audio files (~1 second) sound as if playback starts in the middle of the file.
Question now is, can this be fixed using AndroidAudioAttributes? If so: What values should be set for AndroidAudioAttributes.contentType and AndroidAudioAttributes.usage? And should AndroidAudioAttributes be set for each AudioPlayer or just at AudioSession?
A few more details:
All AudioPlayer instances are loaded during startup and played on demand by calling:
await player.seek(Duration.zero);
player.play();
The delayed audio output happens only on a few devices and even while background audio is looping, making me doubt that it is related to Android warming up the audio pipeline.
I'm unfortunately unable to reproduce the issue, but got quite some bug reports over the past few years, so any advise is welcome,
Thank you.
@ryanheise Thank you very much for providing
audio_seesion,just_audioand andaudio_servicepackages!On some Android devices it happens that audio files are played with a few hundred milliseconds delay. This leads to the effect that short audio files (~1 second) sound as if playback starts in the middle of the file.
Question now is, can this be fixed using
AndroidAudioAttributes? If so: What values should be set forAndroidAudioAttributes.contentTypeandAndroidAudioAttributes.usage? And shouldAndroidAudioAttributesbe set for eachAudioPlayeror just atAudioSession?A few more details:
All
AudioPlayerinstances are loaded during startup and played on demand by calling:The delayed audio output happens only on a few devices and even while background audio is looping, making me doubt that it is related to Android warming up the audio pipeline.
I'm unfortunately unable to reproduce the issue, but got quite some bug reports over the past few years, so any advise is welcome,
Thank you.