I have often been asked the question " Is there a simple way to play WAV and MP3 files from C#". I have in the past few days devoted myself to doing this and I have been able to create a simple C# form with a single button to play both MP3 and WAV files using only six lines of code.
The program utilizes the device control MP3P.OCX which must be registered with regsvr32.exe but I have created "setup.bat" to do this.
There also must be the following .dll files present.
I have a mp3player.zip file containing the program which is named
- MP3play.exx This must be renamed
- mp3play.exe. I have done this to facilitate internet transmission.
I also have a zip file mp3play_source.zip with the source code.