New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #2075 #2946
Fixed #2075 #2946
Conversation
Cleaned up the usage of playingInternal to be WP only
@dancolasanti - Can you verify this change solves your issue? |
@dancolasanti - Can you verify this change solves your issue? |
Sorry for the late reply - I've been out of town this week - I will be home Date: Thu, 28 Aug 2014 16:41:18 -0700 @dancolasanti - Can you verify this change solves your issue? — |
@tomspilman I was unable to verify that this fix fully resolves the problem. I downloaded the latest MonoGame-Develop code, made the suggested fix, hooked it up to SharpDX 2.6.2, rebuilt it and ran my Invasion game with it. My original problem (that trying to stop the user's music after the user says that the game can do this) seems fixed (the user's music stops), but the new side-effect (since a year ago when I last looked into this) is that the game now doesn't recognize that the user's music is playing and so it never asks the user if it can take control of music in the first place. So now the game just takes control of the user's music (shutting it off) without asking the user if that is OK (despite having logic to ask the user this - same code as my original XNA-WP7 game) and starts playing its own music. I think that this is caused by MediaPlayer.GameHasControl returning true when it shouldn't, although I haven't been able to prove this because I'm having trouble getting a debug build of MonoGame that I can actually step-into functions with (and this is partially because I don't know how to properly reference SharpDX ARM & x86 assemblies within my MonoGame project. (If you know of documentation that shows how to do this, please let me know). I could probably be of more help with this and other issues that I found if only I could figure out how to get a proper MonoGame dev-build configured correctly and reference it in my game project. cc: @Nezz |
Detecting if the user's music is playing at launch works for us and it wasn't working without this fix. This is the code from this PR: return (!playingInternal && State == MediaState.Playing) || MsMediaPlayer.GameHasControl;
@tomspilman Could you merge this PR so that future improvements can be made regarding |
Merging... |
Cleaned up the usage of playingInternal to be WP only (#2075).