原文:C#.VB.NET 使用System.Media.SoundPlayer播放音乐 同步播放: System.Media.SoundPlayer player = new System.Media.SoundPlayer(); player.SoundLocation = @"d:/music/happy.wav"; player.Load(); player.Play(); 异步播放: System.Media.SoundPlayer player = new System.Me…
1.引用System.Media名称空间下的类SoundPlayer SoundPlayer player = new SoundPlayer(); 2.方法调用Play(); public void Play() { player.SoundLocation = @".\x0pbk-swz4q.wav";//读取音频文件 player.Load();//同步模式 player.Play(); if (MessageBox.Show("播放音樂中,通过旋转耳机上的…