0's at the beginning and end of an mp3
category: code [glöplog]
So it seems most mp3 decoders introduce a small delay at the beginning of the decoded stream. This delay being 528 samples. This is because the standard
MDCT/filterbank routines used by the ISO have a 528 sample delay.
Same thing happens while encoding, 528 samples.
So I've skipped my output stream by 1056 samples and still notice a hiccup of silence in one of my loops.
Has anyone else encountered this? Should I just throw away samples? If so, how many? Because 1056 doesn't seem to be it.
MDCT/filterbank routines used by the ISO have a 528 sample delay.
Same thing happens while encoding, 528 samples.
So I've skipped my output stream by 1056 samples and still notice a hiccup of silence in one of my loops.
Has anyone else encountered this? Should I just throw away samples? If so, how many? Because 1056 doesn't seem to be it.
You don't know unless the MP3 file in question has a LAME header, which will tell you how many samples to skip.
oh!! that's neat!
So, you coming to evoke again, eh?! Nice!
Maybe this time we´ll talk a bit or a byte. Altho i don´t think so, will be smashed once again 2 hours after arrival, as always! ;)
gl with your loopy! ;)
Maybe this time we´ll talk a bit or a byte. Altho i don´t think so, will be smashed once again 2 hours after arrival, as always! ;)
gl with your loopy! ;)
Couldn't you just count the zeros when you load the mp3?
Well, you could of course remove any kind of silence (you'll need some threshold since there will be some ringing artefacts close to the start and end of the actual audio), but that only works if you assume that there will never be any kind of intended silence at the start or end of the MP3 file. Plus, it's possible that it won't be 100% sample-accurate because of said artefacts. Really, the easiest way is to generate an MP3 file with LAME headers that tell you precise how many samples are not part of the original stream.
Or save .wav files with mp3 data. Then you can add loop markers yourself.
How about using a format that doesn't have this sort of crap? (Vorbis, Opus)
Plus, less patent shizzle.
yeah, what about opus? i heard it is good.