Question

I'm creating a mini game. It has music background and gun sound. But I can not play them at the same time. How can I do it ???

Was it helpful?

Solution

You can't - as MSDN says:

When a MediaElement control plays audio or video content, any background sounds or media already playing are halted. The app launches the playback experience when the user taps the control. Only one MediaElement control can operate at a time.

Instead you can try to use SoundEffect from XNA to play your gun sound.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top