Pages

c#: Play wav files



// 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();




1 comment:

mohamed basha يقول...

very goode
it's nice code to any programmer

إرسال تعليق

Link With in

Related Posts Plugin for WordPress, Blogger...