Вопрос

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 ???

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top