1. SoundPlayer referenced class in the namespace System.Media
SoundPlayer player = new SoundPlayer();
2. The method call Play ();
Play void public ()
{
player.SoundLocation = @. "\ x0pbk-swz4q.wav"; // read audio file
player.Load (); // synchronous mode
player.play ();
IF (MessageBox.Show ( " play music by volume on the rotary knob to test the headset, if the normal sound playback option is contrary No "," prompt ", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
{
DisplaylistboxMSG (" headset test results abnormality ");
}
the else
{
DisplaylistboxMSG (" normal test result the Headset ");
}
Player.stop (); // stop playback
player.Dispose ();
}