Hi,
If your sound file is a .wav file, you can try this:
protected void button1_Click(object sender, EventArgs e)
{
byte[] result = System.IO.File.ReadAllBytes("sound.wav");
System.IO.MemoryStream ms = new System.IO.MemoryStream(result);
ms.Position = 0;
System.Media.SoundPlayer soundPlayer = new System.Media.SoundPlayer(ms);
soundPlayer.PlayLooping();
soundPlayer.Stop();
}
If your audio file isn't a .wav file, then have a look here:
http://www.crowsprogramming.com/archives/58[
^]
You can also convert your audio file to a .wav file.
Have a look at
this list of audio conversion software[
^].
Hope this helps.