PDA

Click to See Complete Forum and Search --> : Mp3


Sastraxi
Jun 8th, 2001, 10:00 PM
I've 'broken into' the file format of MP3s using an HTML file that I found on the internet. (I've included it in the link below)

Well, I've got some problems.
It returns full zero values in areas it isnt supposed to. Furthermore, it works in Winamp and Media Player, so I know it isn't corrupt.

A more recent version of the document can be found here:
http://www.dv.co.yu/mpgscript/mpeghdr.htm

So anyways I will post the project if my problems persist...

Mc Brain
Jun 11th, 2001, 07:53 PM
Try this out and let me know what you think about it. It's a code I've downloaded from Internet and modified it a bit so that all the MP3's code is in a BAS module an you don't depend on any other form.

If you like to get all the fields you could use this code:



Dim MP3Info As ID3v1Tag2
Dim DoesHaveV1 As Boolean
Dim DoesHaveV2 As Boolean

ReadFile "C:\MySong.MP3", DoesHaveV1, DoesHaveV2

If DoesHaveV1 Or DoesHaveV2 Then
' One or both Frames were found. The information is loade
'in the Type variable MP3Info. Do whatever you want with it


End If

Mc Brain
Jun 11th, 2001, 07:55 PM
If you wanna see the Original code (by Kevin Pohl) here it is.

Sastraxi
Jun 11th, 2001, 08:38 PM
I already have the code to get the ID3 tag(s) in the MP3 file, I just have troubles reading the header.

I would use Media Player but I need to send the data over the network in 1 second chunks, reassemble them and play them so this is how I am doing it.

Mc Brain
Jun 12th, 2001, 06:35 AM
Ok, I didn't know you were using this code. I had a little problem, similar as yours, I guess. Some of the MP3 gets no info. But I found the problem. The line


R = R + (B * 16384)



gets Overflow is B > 1 and then the sub can't find the "TAG" and returns nothing. The way to handle this is:


R = R + (B * 16384&)



and you probably get all the MP3s' info.

Sastraxi
Jun 12th, 2001, 03:28 PM
2 things....

1. I'm not using that code
2. I'm having trouble reading the MP3 FILE, NOT THE ID3 TAG OF IT. I can get the Id3 tag okay.

Mc Brain
Jun 12th, 2001, 06:20 PM
Oh! Sorry... can't help you with that.