![]() The following code shows the PlayWav method that the program uses to play sound resources. One way of playing is using the SoundPlayer class from ‘System.Media’ Namespace and the other way is using the ‘Windows Media Player Active-X Control’ called AxWindowsMediaPlayer.Īfter you create an audio resource, the program can play it by using a SoundPlayer object. In this example, we will see how we can play sound files in C#. However, the file needs to be loaded before it can be played and if there is a large file, there might be a wait.ġ. wav file using the above method listed in Listing 1, which is called synchronous method. () ' Plays the sound associated with the Asterisk system event. SystemSounds::Asterisk->Play() // Plays the sound associated with the Asterisk system event. Plays the sound associated with the Asterisk system event. ![]() The following code example demonstrates the use of the Asterisk property.
0 Comments
Leave a Reply. |