FS#12185 - Fix gapless playback for Nero AAC

Attached to Project: Rockbox
Opened by Yusaku_Inui (Yusaku_Inui) - Saturday, 09 July 2011, 08:28 GMT
Last edited by Magnus Holmgren (learman) - Sunday, 24 July 2011, 13:06 GMT
Task Type Patches
Category Codecs
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch is fix to work gapless playback for AAC encoded by Nero AAC (Ver. and FAAC.
This task depends upon

Closed by  Magnus Holmgren (learman)
Sunday, 24 July 2011, 13:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r30149.
Comment by Yusaku_Inui (Yusaku_Inui) - Saturday, 09 July 2011, 11:53 GMT
Fix compile error.
Comment by Magnus Holmgren (learman) - Saturday, 16 July 2011, 08:02 GMT
Could you explain the patch a bit, please? To me it looks like it re-uses the lead_trim at the end of the file if no tail_trim has been specified, and that doesn't look right (the MP4 container already allows the last frame to be properly trimmed, so it shouldn't be necessary for FAAC/Nero at least).
Comment by Yusaku_Inui (Yusaku_Inui) - Saturday, 16 July 2011, 14:27 GMT
I'm not sure.
But after r29727, unable gapless playback.
So I undid the point of deleted in r29727.

I have tested this file.
This file was encoded by FAAC and Nero
Comment by Magnus Holmgren (learman) - Saturday, 16 July 2011, 16:27 GMT
Hm, yes, in the decode of test1_nero (using test_codec), there is a small piece of silence. Not much, 0.01s or so, and it is inaudible to me (the test track I used also get some silence, but only 0.003s). Foobar2000 does a good job, so there's room for improvement. There's got to be a better way though...
Comment by Magnus Holmgren (learman) - Sunday, 17 July 2011, 09:44 GMT
I see what you mean now. r29727 removed the last frame trimming used by FAAC/Nero files. I'll commit a fix soon.
Comment by Yusaku_Inui (Yusaku_Inui) - Sunday, 17 July 2011, 15:58 GMT
r30149 is very nice.
Sounds fine some test files.