autodj: preroll transitions for gapless playback - #16063
Open
ywwg wants to merge 5 commits into
Open
Conversation
Member
Author
|
oh right I need to update tests as well |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “pre-roll” playback for the incoming deck during AutoDJ so the next track is already running before the crossfader transition starts, reducing audible gaps from playback start latency.
Changes:
- Start the “to” deck ~1s before
fadeBeginPoswhile still inADJ_IDLE, seeking it back so it aligns at fade start. - Add a gtest covering the early-play pre-roll behavior in
FixedFullTrackmode.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| src/library/autodj/autodjprocessor.cpp | Implements early-start logic for the incoming deck during ADJ_IDLE before fading begins. |
| src/test/autodjprocessor_test.cpp | Adds a regression test verifying the pre-roll behavior and that fading still starts at fadeBeginPos. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Start playback of incoming tracks before the transition begins, to prevent any audible gap between tracks due to buffer inconsistencies or delays in playback triggering. Tested manually, sounds delicious Signed-off-by: Owen Williams <owilliams@mixxx.org>
Signed-off-by: Owen Williams <owilliams@mixxx.org>
…eek requests. Also removes ADJ_ENABLE_P1PLAYING state, which was unused. Signed-off-by: Owen Williams <owilliams@mixxx.org>
ywwg
force-pushed
the
owilliams/autodj-gapless
branch
from
April 2, 2026 17:37
406afc9 to
29b261c
Compare
Member
Author
|
looks like I have to fix a test |
jclsn
reviewed
Apr 8, 2026
|
This PR is marked as stale because it has been open 90 days with no activity. |
Signed-off-by: Owen Williams <owilliams@mixxx.org>
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.
Start playback of incoming tracks about 1.0s (corrected for the exact offset between tracks!) before the transition begins to prevent any audible gap between tracks due to buffer inconsistencies or delays in playback triggering.
Tested manually, sounds delicious. This is best with the following settings:
NOTE: this does not totally work on mp3 tracks, which cannot be sample-exact lengths. Instead, test with wav, aiff, flac, or ogg. "skip silence" mode works a little better, but it's not perfect and sometimes messes up the transitions for non-mp3 tracks. A subsequent PR could introduce a new skip algorithm that takes mp3 frames into account.
Initially created with claude but I edited it a lot since then so now it's all mine.