Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top