MAD Decoder: Correct length of iTunes MP3 files
The total frames count in the iTunSMPB header is the encoded length, so add the start and end padding to it for the decoder implementation, which expects this variable to contain the total decodable length including the start and end padding. Fixes gapless decoding of iTunes files. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
183a03657d
commit
9a0c598cf1
|
@ -163,7 +163,8 @@
|
|||
if(end_pad >= 528 + 1) {
|
||||
_startPadding = start_pad + 528 + 1;
|
||||
_endPadding = end_pad - (528 + 1);
|
||||
totalFrames = temp_duration;
|
||||
// iTunes encodes the original length of the file here
|
||||
totalFrames = temp_duration + _startPadding + _endPadding;
|
||||
_foundiTunSMPB = YES;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue