Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When Play and Pause are called in a quick succession on Android's MediaPlayer, the CurrentPosition is updated like the song is playing.
Sample project (make sure to set it to a correct song in Game1.cs:44):
Xamarin 126.96.36.199 (6b70b1e28c5a733187f7659220da4c0ff61ab2b1)
Visual Studio extension to enable development for Xamarin.iOS and
It looks like there are a host of issues with the underlying android media player see
So I knocked up a sample in Java and managed to get it to exhibit the same behaviour, but only on short .wav files. longer .mp3 songs seemed to work ok. So this looks like an upstream issue.
That said it does look like the media player is correctly reporting when it is paused. So this probably needs to be worked around within the MonoGame framework. Something like this might do the trick
It seems to work here locally. If you can confirm then I'll submit a PR to the MonoGame guys to see if we can get this fixed.
I hope you received my message from the support team. Did you have a chance to submit this to MonoGame yet?
I was waiting to hear if the work around I posted worked for you too? If it does then I'll submit a PR this weekend
Yes, it worked :)
Awesome, I'll put this PR up over the weekend
Did you submit the PR?
I have submitted it: