Play wav files
System.Media.SoundPlayer player = new SoundPlayer(); player.SoundLocation = "c:\\test.wav"; player.LoadAsync(); player.PlayLooping(); //asynchronous (loop)playing in new thread Thread.Sleep(5000); player.Stop();
DZone Snippets > mstampar > wav
12387 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Miroslav Stampar http://mstampar.awardspace.com
System.Media.SoundPlayer player = new SoundPlayer(); player.SoundLocation = "c:\\test.wav"; player.LoadAsync(); player.PlayLooping(); //asynchronous (loop)playing in new thread Thread.Sleep(5000); player.Stop();