Arslan Pervaiz Arslan Pervaiz - 1 year ago 107
C# Question

Unable to play wav file in WP7

while playing this wav file in windows phone 7 its getting error.

var stream = TitleContainer.OpenStream("TestSound.WAV");
var effect = SoundEffect.FromStream(stream);

And Its getting this exception on second line of code.

Ensure that the specified stream contains valid PCM mono or stereo wave data.

Answer Source

I've played wav files lots...

What wav file are you trying to play?

Here's a very simple sound I've played before...

I find the audacity tool is particularly useful for editing files into an acceptable format -

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download