You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
audacity#12905: 16 tracks with sample rates different from project rate,
what's more with time-stretched clips.
Without this fix, after a seek, tracks mistakenly get re-positioned
on each worker-thread call.
For tracks with resamplers, this involves re-fetching the track data.
Mixer now provides SetTimes to update time bounds and reposition to the start time. SetTimesAndSpeed uses this method. During a seek, AudioIO assigns playback mixers the seek time and schedule end time with flushing enabled. The playback policy checks loop-region changes only when looping is enabled. Loop-state transitions continue to trigger repositioning.
The change fixes seeking before the play region start. In the unusual case of reverse playback seeking past the region end, mixer output could disagree with the playback position. This is a narrow edge case, so the change is mergeable with that owner awareness.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Linked Issues check
Issue #12905 reports choppy playback in a project with about 800 clips and a video attachment. The issue has no written acceptance criteria. The only coding requirement is that playback no longer stut…
Provide evidence that the reported stutter no longer occurs. Suitable evidence includes a reproduction on the affected project type, or a QA result that covers playback with a large project of similar size. Optionally add an automated test …
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title "fix(12905): playback stutter fix" names the issue number and the symptom, but not the mechanism. The PR changes seek behavior so seeking before a play region's start no longer clamps to tha…
Description check
The description states the issue link (Resolves #12905) and gives history of the fix, with a reference to the commit message for the rationale. It fills in the template checkboxes and includes an AI a…
Out of Scope Changes check
All changed code lies in the playback seek and repositioning path. The files are src/au3audio/internal/defaultplaybackpolicy.cpp, au3/libraries/au3-audio-io/AudioIO.cpp, au3/libraries/au3-mixer/Mix.cp…
Full details: Title check
Explanation
The title "fix(12905): playback stutter fix" names the issue number and the symptom, but not the mechanism. The PR changes seek behavior so seeking before a play region's start no longer clamps to that region. The title is partially related: it refers to the real goal (stutter fix for issue #12905) without stating the seek change. It is not off-topic and not vague.
Full details: Description check
Explanation
The description states the issue link (Resolves #12905) and gives history of the fix, with a reference to the commit message for the rationale. It fills in the template checkboxes and includes an AI assistance attribution. Gaps: the description does not explain the change itself in the body, relying on the commit message. The QA items are unchecked, and the note on the loop-region change is not explained in the description. The template's required short description of the changes and motivation is only partly present.
Full details: Out of Scope Changes check
Explanation
All changed code lies in the playback seek and repositioning path. The files are src/au3audio/internal/defaultplaybackpolicy.cpp, au3/libraries/au3-audio-io/AudioIO.cpp, au3/libraries/au3-mixer/Mix.cpp, and au3/libraries/au3-mixer/Mix.h. The Mixer::SetTimes declaration supports the seek change. The Mixer::SetTimesAndSpeed change keeps the finite-speed assertion and delegates to the same method. The DefaultPlaybackPolicy change limits loop-bound comparison to looping mode. This change affects loop-region updates during playback. It is the behavior that the QA item on moving the loop region checks. No unrelated feature or refactor was found in the summary.
Full details: Linked Issues check
Explanation
Issue #12905 reports choppy playback in a project with about 800 clips and a video attachment. The issue has no written acceptance criteria. The only coding requirement is that playback no longer stutters. The PR changes seek handling: AudioIoCallback::CallbackDoSeek calls Mixer::SetTimes(time, mPlaybackSchedule.mT1, true) instead of Mixer::Reposition(time, true). Mixer::SetTimesAndSpeed delegates to SetTimes, and DefaultPlaybackPolicy::RepositionPlayback compares loop bounds only when looping is enabled. The changes are plausibly related to the reported stutter, because the author attributes it to seek clamping. The PR adds no automated test. The QA items in the PR description are unchecked. The attachment could not be read. No reproduction evidence shows that the stutter is resolved.
Resolution
Provide evidence that the reported stutter no longer occurs. Suitable evidence includes a reproduction on the affected project type, or a QA result that covers playback with a large project of similar size. Optionally add an automated test for seek behavior before a play region start. Complete the unchecked QA items, including the re-test of #5422.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/musescore.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between dc80361 and ef3a765.
Files selected for processing: 3
au3/libraries/au3-audio-io/AudioIO.cpp
au3/libraries/au3-mixer/Mix.cpp
au3/libraries/au3-mixer/Mix.h
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Reverse seeks below the region end give the mixer forward bounds.
When loop playback is disabled, DefaultPlaybackPolicy::OffsetSequenceTime does not clamp the seek result. AllowSeek is not overridden for this policy, so the seek is accepted. For a reverse schedule from 20 to 10, a seek to 5 yields time 5. CallbackDoSeek then calls SetTimes(5, 10, true). A mixer orders its bounds by direction, so this call makes the mixer forward while the schedule stays reverse. The mixer output can then disagree with the schedule time.
Define the mixer bounds for a reverse schedule. Keep the mixer direction equal to the schedule direction after every seek. Choose explicitly whether the seek time is clamped to the reverse region or the mixer bounds follow the seek time in reverse order.
The reason will be displayed to describe this comment to others. Learn more.
Reverse play isn't something we'll be supporting in AudioIO.cpp. The audio engine refactoring won't be reusing this code either, so there isn't really a need to address this now. I can be convinced otherwise, though, @kryksyh@luapmartin
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
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.
Resolves: #12905
The rationale behind the fix is in the commit message.
History:
Assisted-by: Claude Code w/ Opus 5.5
Recommended:
QA