Rockbox Development > Feature Ideas

gap detect

<< < (3/3)

saratoga:

--- Quote from: dryrock on January 14, 2011, 03:24:39 PM ---Ok, so if I understand things correctly, in the absence of a LAME header specifying the exact number of extra samples at the beginning, the decoder just skips a pre-set amount. So what I am hearing in my badly-encoded tracks is the remaining ~540 zero-ish samples.

When I import the mp3 into Audacity, Audacity may not skip any of the beginning samples. It is close to a full frame of zero-ish data at the beginning.

--- End quote ---

Its up to the decoder.  If theres no lame or itunes tag info, then the mp3 doesn't have a precisely defined length, and the software can do as it pleases.  Often this means different applications will produce different length wav files from the same mp3.




--- Quote from: dryrock on January 14, 2011, 11:04:42 AM ---Cool! It appears that my itunes-encoded test files predate this feature in itunes's encoding.

--- End quote ---

If you update iTunes to a semimodern version, you can have it scan all tracks for missing lame gapless headers, and then try to reconstruct them as best it can (using the method you propose here). 


--- Quote from: dryrock on January 14, 2011, 11:04:42 AM ---The end result is that as of now, I have routines to optionally chop off zero-ish data at the beginning of the first, or end of the last, frame. Audibly it has fixed my issue and I get gapless mp3 playback now with my bad mp3's -- and it doesn't appear to screw up lame-encoded ones :-) I need to do some cleanup before I submit any patches.
--- End quote ---

Hopefully you're doing this somewhere in or near dsp.c right?

dryrock:

--- Quote from: saratoga on January 14, 2011, 03:29:49 PM ---
If you update iTunes to a semimodern version, you can have it scan all tracks for missing lame gapless headers, and then try to reconstruct them as best it can (using the method you propose here). 


--- End quote ---

Hm, I may have to try that. I do not have all my music in iTunes.


--- Quote from: saratoga on January 14, 2011, 03:29:49 PM ---
Hopefully you're doing this somewhere in or near dsp.c right?

--- End quote ---

Actually it's in mpa.c. In there I can easily tell what is the first and last frame and I just adjust the parameters to the pcmbuf_insert call. It restricts this to working with mp3 only I know.

dryrock:
Ok, I submitted a first patch (11891):

http://www.rockbox.org/tracker/task/11891

Navigation

[0] Message Index

[*] Previous page

Go to full version