Playing Sound Via C# SoundPlayer & AxWindowsMediaPlayer

Windows Media Player Active-X Control

In this example, we will see how we can play sound files in C#. We can play Sound in two specific ways. 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. In this article, we will try both the ways by playing a ‘.wav file’. You can test yourself for more functionality on the specific area