how to open an mp3 file with c


I think we cannot open an mp3 file this way , like any regular text file.

fp=fopen("Hello.mp3","rb")

We have to use a codec , to actually play the mp3 file , or atleast use a library which has one.

Do take a look at these places.

How to play MP3 files in C?

SDL Sound Mix Tutorial

Leave a Comment