Correct gapless properties of M4A / xHE-AAC file ?
Hi,
Congrats. Great work on your xHE-AAC encoder !
I created xHE-AAC encoder for my software (EZ CD Audio Converter, https://www.poikosoft.com) based on your exhale library. I do have a valid MPEG-4 patent-license and I think your license allows me to bundle your encoder to my software.
I have a question about the gapless implementation of your reference exhaleapp.exe software.
I noticed that you write gapless number of samples to the duration of mvhd-atom and tkhd-atom. Is this correct approach ?
My approach has been that I write total number of samples as written to the m4a file (including encoder-delay and padding) to the duration of mvhd-atom and tkhd-atom. This has been working great for gapless playback of AAC LC and HE AAC files.
I noticed that the current Foobar xHE-AAC decoder (the FDK packet decoder add-on) does play your file gaplessly but not mine.
So what is the correct approach ? I think your file will play incorrecly (truncate last samples) on the player that does not support gapless-playback of m4a.
I have attached the samples: