Skip to content

feat: playback speed control#580

Open
EL-File4138 wants to merge 3 commits intoTypesettingTools:masterfrom
EL-File4138:feature/playback-speed
Open

feat: playback speed control#580
EL-File4138 wants to merge 3 commits intoTypesettingTools:masterfrom
EL-File4138:feature/playback-speed

Conversation

@EL-File4138
Copy link
Contributor

@EL-File4138 EL-File4138 commented Mar 23, 2026

Changes

  • Adds one shared playback-rate control for audio-only playback and synced audio/video playback.
  • Adds transport-rate commands plus default hotkeys for decrease, increase, and reset.
  • Adds a playback-rate submenu in Video and a bottom-right editable dropdown in the audio pane.
  • Persists the selected rate and supports arbitrary typed values in the supported 0.1x to 3.0x range.

Implementation

  • Source time remains the single authoritative timeline for subtitle timing, waveform display, direct seeking, and frame lookup.
  • Speed change is implemented as a multiplier on the current playback pipeline:
    • Video: Apply the multiplier on measured source time change, advancing playback transport, resolving the displayed frame.
    • Audio: Spin off a playback-scoped resampling provider layered above the existing audio backends, apply the multiplier here.
  • During playback, controller code converts between source-domain samples/time and playback-domain samples so UI reporting stays source-accurate.
  • Changing playback rate while transport is active rebuilds playback coherently and resumes from the current source position.

Consequences

  • Precise editing behavior is preserved while paused: seeking, stepping, timing edits, and frame lookup stay on the original source timeline.
  • Audio playback speed changes use resampling, so pitch changes with speed.
  • Audio playback speed is also applied when playing segments (using commands like audio/play/current)
  • Video playback at rates above 1.0x can skip displayed frames when source-time advancement outpaces the UI timer cadence; this is an intentional transport-level compromise and keeps the implementation aligned with the project’s existing playback model.
  • Either control honors playback speed individually without cross-dependence, while staying in sync when both are used;
  • Arbitrary playback-rate input is supported and clamped safely, while step commands remain restricted to the intended coarse preset set.

@EL-File4138 EL-File4138 force-pushed the feature/playback-speed branch from e8d229f to bd1ad01 Compare March 23, 2026 23:38
@EL-File4138 EL-File4138 force-pushed the feature/playback-speed branch from bd1ad01 to 2ace6cc Compare March 24, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant