質問

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