Arslan Pervaiz Arslan Pervaiz - 7 months ago 62
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.


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 -