Reader Level:
ARTICLE

Simple MP3 Player

Posted by George Steeves Articles | C# Language November 20, 2006
So many people are asking how to play MP3 and WAV files that I put together this simple player. One button and six lines of code. Thats all there is.
  • 0
  • 0
  • 48612
 

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.

  • AxInterop.MP3PLib.dll
  • Interop.MP3PLib.dll

I have a  mp3player.zip file containing the program which is named

  1. MP3play.exx   This must be renamed
  2. mp3play.exe.  I have done this to facilitate internet transmission.

I also have a zip file mp3play_source.zip with the source code.

 
         

COMMENT USING