Skip to content
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

Can't MediaPlayer.Stop User's Music to Play Game Music #2075

Closed
dancolasanti opened this issue Oct 11, 2013 · 8 comments
Closed

Can't MediaPlayer.Stop User's Music to Play Game Music #2075

dancolasanti opened this issue Oct 11, 2013 · 8 comments

Comments

@dancolasanti
Copy link

On WP8 there is a requirement that if the user is currently playing Music when a game is started, the game must ask the user if it's OK to stop their music in order for the game to play its own music (for example, a background music track played by the MediaPlayer).

Unfortunately, the same code used in XNA on WP7/WP8 to stop the user's music isn't working in MonoGame - it has no effect. The MediaPlayer.State == Stopped when the game starts up, even if the user is currently playing music, so calling MediaPlayer.Stop() does nothing - and the user's music continues playing.

@MoreKoo
Copy link

MoreKoo commented Jul 3, 2014

Same problem here.... MediaPlayer.Stop() has no effect in stopping player's own background music.

@dancolasanti
Copy link
Author

@MoreKoo my comment was about MonoGame 3.1, but recently 3.2 was released (and I haven't checked it yet). Are you using MonoGame 3.1 or 3.2?

@MoreKoo
Copy link

MoreKoo commented Jul 3, 2014

We are using 3.2.

@aberus
Copy link
Contributor

aberus commented Jul 3, 2014

I have solution for this. I'll submit fix today.

@MoreKoo
Copy link

MoreKoo commented Jul 3, 2014

Excellent, @aberus!

@dancolasanti
Copy link
Author

@aberus Did you submit this fix? I can't find it... please send a link to it. Thanks!

@tomspilman
Copy link
Member

@Nezz - Did you deal with this in your game?

@Nezz
Copy link
Member

Nezz commented Aug 22, 2014

Here's a fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants