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.