Repository navigation
Standalone: zero the clap_process and give it a steady_time - #587
Merged
Merged
Conversation
The standalone handed every process() call an uninitialised clap_process, so steady_time (and anything else not explicitly set) was stack garbage on every block. It is now zeroed and steady_time counts processed samples, never reset, so it stays monotonic across restarts. Assisted-by: Claude Opus 5.5
defiantnerd
reviewed
Oct 8, 2026
| } | ||
|
|
||
| clap_process process; | ||
| clap_process process{}; |
defiantnerd
approved these changes
Oct 8, 2026
defiantnerd
left a comment
Collaborator
There was a problem hiding this comment.
Makes completely sense!
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.
The standalone passed an uninitialised
clap_processto everyprocess()call. Anything not set explicitly, includingsteady_time, was stack garbage on every block. That breaks timestamping, phase sync and any monotonicity asserts in the plugin.This PR zero-initialises the struct and sets
steady_timefrom a running sample counter. The counter is never reset, so it stays monotonic across restarts and device changes.This is P0-1 of the standalone-revisited list.
Tested on macOS with two-filters. Under lldb, the plugin is active at 48 kHz, and at the 51st block
steady_timeis 12800 (50 × 256). The next block it is 13056.