Skip to content

Clarify process status and tail extension docs - #500

Open
Quant1um wants to merge 4 commits into
free-audio:nextfrom
Quant1um:docs-process-tail
Open

Clarify process status and tail extension docs#500
Quant1um wants to merge 4 commits into
free-audio:nextfrom
Quant1um:docs-process-tail

Conversation

@Quant1um

@Quant1um Quant1um commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Clarify process status related documentation in process.h and ext/tail.h, based on #486.

Unresolved questions:

Corrections are appreciated!

@CLAassistant

CLAassistant commented Apr 8, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Quant1um
Quant1um marked this pull request as ready for review April 8, 2026 22:17
@defiantnerd

Copy link
Copy Markdown
Contributor

Tail never contains the latency. Those are separete values. If they would be intertwened, communication with the host about it would be a mess.

@giladkah

This comment was marked as spam.

Comment thread include/clap/ext/tail.h Outdated
Comment thread include/clap/process.h Outdated
Comment thread include/clap/ext/tail.h Outdated
Comment thread include/clap/ext/tail.h Outdated
Comment thread include/clap/ext/tail.h Outdated
Comment thread include/clap/ext/tail.h
Comment thread include/clap/ext/tail.h
Comment thread include/clap/ext/tail.h
@defiantnerd

Copy link
Copy Markdown
Contributor

Can you please stop this slop?

@Quant1um

Copy link
Copy Markdown
Contributor Author

Tail never contains the latency. Those are separete values. If they would be intertwened, communication with the host about it would be a mess.

Got it! That is my understanding as well, that tail is just the number of samples from an event/non-zero audio sample to the point where it is safe to stop processing, and I wrote the docs from the point of view of that assumption. The thing I got confused by is the comment left in #486

@edwloef

edwloef commented May 11, 2026

Copy link
Copy Markdown

I think it would be good to add a short note specifying whether the host should "forget" about previous inputs when the plugin's reset function is called, wrt. deciding whether to send a plugin to sleep in response to CLAP_PROCESS_TAIL. Maybe something like it is safe to stop processing if the last input event/variation (see CLAP_PROCESS_SLEEP for resume conditions) has occurred at least clap_plugin_tail.get samples ago, or the last input event/variation occured before the last call to plugin->reset?

@abique
abique changed the base branch from main to next May 20, 2026 11:36
Comment thread include/clap/ext/tail.h Outdated
Comment thread include/clap/ext/tail.h Outdated
Comment thread include/clap/ext/tail.h Outdated
Comment thread include/clap/process.h Outdated
Comment thread include/clap/process.h Outdated
@abique
abique marked this pull request as draft May 20, 2026 15:34
@edwloef

edwloef commented May 20, 2026

Copy link
Copy Markdown

Oh, while we're here, could we also get some clarification on what main-thread,audio-thread means for clap_plugin_tail->get? Should that mean or be changed to thread-safe or active ? audio-thread : main-thread? In general, what does the return value represent when the plugin is deactivated, or should that also be a disallowed scenario, like with the latency extension?

@Quant1um

Quant1um commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

Oh, while we're here, could we also get some clarification on what main-thread,audio-thread means for clap_plugin_tail->get? Should that mean or be changed to thread-safe or active ? audio-thread : main-thread? In general, what does the return value represent when the plugin is deactivated, or should that also be a disallowed scenario, like with the latency extension?

I agree that [main-thread,audio-thread] is a bit weird and it should probably be changed to [thread-safe] or, even better, [audio-thread] or even [active & audio-thread], I am not sure what the right choice would be and changing it could result in breakage with existing plugins/hosts. More discussion is needed probably.

@abique
abique force-pushed the next branch 4 times, most recently from 1ca4f86 to 1413ddd Compare May 21, 2026 12:39
@Quant1um
Quant1um marked this pull request as ready for review May 21, 2026 12:52
@Quant1um
Quant1um requested a review from abique May 21, 2026 16:45
@abique
abique force-pushed the next branch 3 times, most recently from 1e83856 to 275a785 Compare May 23, 2026 09:25
@abique
abique force-pushed the next branch 2 times, most recently from e71b4fa to 195b42a Compare July 13, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants