Repository navigation
Use the SDK's MP3 timeline for decoding and conversion - #14
Merged
Merged
Conversation
added 2 commits
October 24, 2026 21:14
es-decode takes the rekordbox lead from rb-audio (including a negative lead) and its own copy is removed. Conversion shifts cues and the beat grid by the difference in each file's content start, and moves nothing when either file does not state its delay.
claw1200
force-pushed
the
mp3-timeline-delay
branch
from
October 26, 2026 12:01
1346eaf to
296de0b
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Negative-lead playback, decoded length, and seeking need Streamer regression coverage before approval.
1 open issue
What changed in this PR
This PR centralizes MP3 timeline calculations in the SDK so decoding and conversion use the same timing rules.
Changes:
- Replaces local MP3 parsing with SDK timeline helpers.
- Supports negative lead values in playback length, initial trimming, and seeking.
- Uses file-reported delays for conversion offsets, leaving timing unchanged when either delay is unknown.
| File | Description |
|---|---|
| native/crates/es-engine/src/convert.rs | Delegates conversion offsets to the SDK and handles unknown delays. |
| native/crates/es-engine/Cargo.toml | Adds the rb-audio dependency. |
| native/crates/es-decode/src/mp3.rs | Removes the local MP3 lead parser and its tests. |
| native/crates/es-decode/src/lib.rs | Uses SDK lead values and supports negative-lead trimming and seeking. |
| native/crates/es-decode/Cargo.toml | Adds the rb-audio dependency. |
| native/Cargo.toml | Registers the SDK audio crate as a workspace dependency. |
| native/Cargo.lock | Records the new audio dependency. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Depends on claw1200/es-rekordbox-sdk#1; the submodule points at that branch until it merges.
mp3.rsand takes the lead fromrb_audio::rekordbox_lead_frames. The SDK rule can give a negative lead, soStreamernow drops that many decoded frames at the start (and on seeks).rb_audio::conversion_shift_ms: delay plus lead on each end, read from the files. It now includes the frame lead the old code missed (a LAME MP3 to an ffmpeg MP3 was 26 ms off).Not covered: the beat grid is shifted in the ANLZ files but the cue tags in them are not (only the database cues are).
Tests: es-decode and es-engine pass; the delay logic is tested in the SDK. There is no Streamer test for a negative lead yet.