Plays the .wav file using the UI thread.
| C# | Visual Basic |
public void PlaySync()
Public Sub PlaySync
The PlaySync method uses the current thread to play a .wav file, preventing the thread from handling other messages until the load is complete.
After a .wav file is successfully loaded from a Stream or URL path, future calls to playback methods for the SoundPlayer object will not need to reload the .wav file until the path for the sound changes.
If the .wav file has not been specified or it fails to load, the PlaySync method will play the default beep sound.