rockbox/lib/rbcodec
Michael Giacomelli 8194d51c49 a52: play files that do not start with a frame
A52 files cut from a longer stream can start partway through a frame.
The metadata parser required a sync word at offset 0 and rejected
them, although the codec can resync.  Scan the first 64 KB for a frame
header that is followed by a second valid header, record it as
first_frame_offset, and use that offset when seeking and resuming.

Tested in the simulator (perfsim) and on a Sansa Clip+: a file
starting with 675 bytes of a partial frame now plays.  In the
simulator it decodes all 3161 frames with the same output as the file
without those bytes, and seeks land on frame starts.

Fixes FS#9056

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I5d72b1cd1d8437491ec00a38459e391fb158b9a2
2026-10-09 11:09:42 -04:00
..
codecs a52: play files that do not start with a frame 2026-10-09 11:09:42 -04:00
dsp afr: fix gapless playback with fatigue reduction enabled 2026-10-08 09:12:55 -04:00
metadata a52: play files that do not start with a frame 2026-10-09 11:09:42 -04:00
test warble: zero the mp3entry before reading metadata 2026-09-28 16:35:14 -04:00
platform.h firmware: refactor CACHEALIGN_BITS/SIZE defines 2026-03-06 14:49:00 +00:00
rbcodec.make rbcodec: Force use of -O2 for dsp code 2025-09-06 08:44:32 -04:00
rbcodecconfig-example.h Enable setting of global output samplerate on certain targets. 2013-07-06 04:22:04 +02:00
rbcodecplatform-unix.h Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
SOURCES rbcodec dsp: Move dsp_sample_io_configure() to its own file 2022-12-22 17:20:14 -05:00