Results 1 to 7 of 7

Thread: Mp3

  1. #1

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Mp3

    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...
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  2. #2
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    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:

    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
    Attached Files Attached Files
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  3. #3
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    The original code

    If you wanna see the Original code (by Kevin Pohl) here it is.
    Attached Files Attached Files
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  4. #4

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Thank you...

    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.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    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

    Code:
       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:

    Code:
       R = R + (B * 16384&)
    and you probably get all the MP3s' info.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  6. #6

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    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.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Oh! Sorry... can't help you with that.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width