google / flutter.plugins

BSD 3-Clause "New" or "Revised" License
117 stars 55 forks source link

Gapless support #74

Open sallypeters opened 4 years ago

sallypeters commented 4 years ago

Firstly - Thanks for a great easy to use plugin.

I have an issue (hoping its easy to fix) relating to using this plugin in Android.

In iOS this plugin works perfectly. You can run an asset based file and the plugin loops continuously without any break in the audio playback.

However - in Android, there is a noticeable break/short delay when the track is looped and so the effect of gapless playback is lost.

I've tested on Live devices and also Android simulators (Running Android 8,9 etc).

I've also tested with Flutter 1.7.8, 1.12.13 (Have not moved to 1.17.x because of the huge number of bugs and instability issues with Cloud Firestore)

monkeyswarm commented 4 years ago

Sadly, this is a longstanding (since 2011!) bug with Android MediaPlayer, which seems to be considered unimportant by the Android team: https://issuetracker.google.com/issues/36931073

There's various types of workarounds, but they all are very context/use-case specific and have drawbacks, (which is why I don't consider implementing them in this plugin) e.g.

wellbranding commented 4 years ago

I also need this feature. there is a plugin which supports gapless sound, however it lacks this plugin's features. I think it will be important for this lib also. What do you think about it?