Chris, Originally I looked at the possibility of my program overlooking the padding bit, but upon debugging I found that this wasn't the case. Also, the padding bit was not set for the first header, which means I didn't have to add one. I had theorized that possibly MPEG2's bit padding worked a little different, but later I found wasn't to be the case.
Gabriel Bouvigne responded earlier and said that for MPEG2 files below 30000hz (or, any sampling rate for MPEG2), the constant to determine the frame size had to be 72 and not 144, which is what I had originally used. Upon changing it to 72 (only for MPEG2 files), the program worked perfect and was able to read every frame out of the file. Thanks, Matt Schaller ----- Original Message ----- From: "Christoph Rupp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 28, 2003 12:39 AM Subject: Re: [MP3 ENCODER] MPEG 2 frame anomalies > Hi Matt, > > > The frame size roughly equals 365.71, or 365 because it is being stored in an integer. All is good until I advance to the next frame, which the program assumes is going to be at point 0x16D (365 in decimal) in the file. When I seek to that position, I am starting to read the second byte in the header, not the first. The header actually starts at 0x16C (364 in decimal), one byte short of my frame size. (I use a hex editor while I am debugging so that I can see exactly what my program is reading.) The header indeed starts at position 364 in the file. > > you did not ignore the padding bit, did you? if padding is true then > your framesize is one byte larger than usually. > > Send me a mail if you need sourcecode... > > HTH > Chris > > > -- > > Christoph Rupp > Leiter Softwareentwicklung > _____________________________________ > umc - united media company GmbH > Bgm.-Aurnhammer-Str. 26-28 > 86199 Augsburg > > Tel: +49 (0)821 90676860 > Fax: +49 (0)821 90676869 > web: http://www.umc-web.de > > _______________________________________________ > mp3encoder mailing list > [EMAIL PROTECTED] > http://minnie.tuhs.org/mailman/listinfo/mp3encoder _______________________________________________ mp3encoder mailing list [EMAIL PROTECTED] http://minnie.tuhs.org/mailman/listinfo/mp3encoder
