You must read mp3 files. To do this, you need to find the specifications for them.
Usually an mp3 file is wrapped in an ID3 tag, so you need to read it, find its length and skip it. Take ID3v2.3 for example:
ID3v2/file identifier "ID3"
ID3v2 version $03 00
ID3v2 flags %abc00000
ID3v2 size 4 * %0xxxxxxx
so bytes 6,7,8,9 store the length of the header in big-endian form. Here is an example of some file:
0 1 2 3 4 5 6 7 8 9 A B C D E F
49 44 33 03 00 00 00 00 07 76 54 43 4f 4e 00 00
07 76 - . , 3F6. 10 (A), = 400. mp3-.
mp3 header:
: AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM, FF, t :
bits MPEG1 MPEG2 MPEG2.5
00 44100 22050 11025
01 48000 24000 12000
10 32000 16000 8000
11 reserv. reserv. reserv.