Never been to DZone Snippets before?

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

Play wav files (See related posts)

   1  
   2   System.Media.SoundPlayer player = new SoundPlayer();
   3   player.SoundLocation = "c:\\test.wav";
   4   player.LoadAsync();
   5   player.PlayLooping();   //asynchronous (loop)playing in new thread
   6   Thread.Sleep(5000);
   7   player.Stop();

You need to create an account or log in to post comments to this site.


Click here to browse all 5555 code snippets

Related Posts