Skip to content

Keep CLAP processing when no playhead is attached - #1216

Open
jiri-god wants to merge 1 commit into
kushview:mainfrom
jiri-god:fix/clap-missing-playhead
Open

jiri-god wants to merge 1 commit into
kushview:mainfrom
jiri-god:fix/clap-missing-playhead

Conversation

@jiri-god

@jiri-god jiri-god commented Oct 30, 2026 •

Copy link
Copy Markdown

CLAP rendering dereferenced getPlayHead() unconditionally, even though Processor permits no attached clock. A processor rendered before a clock is assigned, or after detachment, could therefore crash instead of processing audio.

Read the clock only when present. When no clock or position is available, continue processing with clap_process::transport == nullptr; available transport is passed as before.

A minimal test CLAP module exercises the actual provider/load/render path: it passes input audio through and reports transport presence/tempo on its other output. The regression covers initial absence, attachment, absent PositionInfo, detachment, repeated detached blocks and reattachment, checking audio continues and stale transport is not retained. No third-party plugins or audio hardware are required.

Validation: all 59 CTest suites pass on Apple Silicon macOS, RelWithDebInfo. With the original provider restored, the same regression fails with a memory access violation on the first clockless render. This branch is based independently on upstream d0226686; no private extensions.

Integration check: combined with #1211–#1215, all 63 CTest suites pass (3.63 s).

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants