Major rework of the m4a parser for aac/alac playback, seek and resume support. As...
commit7bbcfda1e16d5f7b0fdbdd9f83d8a638d954e4e4
authorBuschel <Buschel@a1c6a512-1295-4272-9138-f99709370657>
Mon, 18 Apr 2011 19:12:51 +0000 (18 19:12 +0000)
committerBuschel <Buschel@a1c6a512-1295-4272-9138-f99709370657>
Mon, 18 Apr 2011 19:12:51 +0000 (18 19:12 +0000)
treeabfab8127753b6a602626141552972a205947d1d
parent34811448c1e70d187a418a8c980b9e847b180477
Major rework of the m4a parser for aac/alac playback, seek and resume support. As a result the memory consumption was drastically reduced. This allows to play several files with long duration -- especially on low memory targets. The change builds a lookup table from m4a's sample_to_chunk[] and chunk_offset[] and completely removes the allocation of the large tables chunk_offset[] and sample_byte_size[]. To be able to remove reading and allocating sample_byte_offset[] the aac and alac decoder now buffer a fixed amount of bytes for each frame. The generated lookup table is used for seek/resume and skipping bytes in empty chunks (aac decoder only). The precision for seek/resume is somewhat lower but still equals 0.5 sec for the worst case. Fixes FS#8923.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29745 a1c6a512-1295-4272-9138-f99709370657
apps/codecs/aac.c
apps/codecs/alac.c
apps/codecs/libm4a/demux.c
apps/codecs/libm4a/m4a.c
apps/codecs/libm4a/m4a.h