Monday, October 8, 2012

Play MediaElement sound without interrupting Zune music

Play MediaElement sound without interrupting Zune music

I've added sound effects to some events in my Windows Phone app using MediaElement. When these sounds play, the background music playing from other apps, like Zune, gets paused. Is it possible to overcome this?

I read somewhere that it can be achieved using XNA; but since I'm developing on my Windows 8 machine, I can't use XNA.

Answers & Comments...

Answer: 1

Even when developing on Windows 8 you can use XNA libraries in your Windows Phone apps. You should probably use SoundEffect and SoundEffectInstance for playing sound, the only problem is you need to have the sounds in wav form as a part of your project, not mp3 or files stored in MediaLibrary, as far as I know.
Difference between SoundEffect and SoundEffectInstance classes

by : Martin Suchanhttp://stackoverflow.com/users/574062




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog