Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state-reproducibility-flush seems to unconditionally fail if the plugin has zero parameters with CLAP_PARAM_IS_AUTOMATABLE flag #16

Open
alien-brother opened this issue Jan 22, 2024 · 2 comments

Comments

@alien-brother
Copy link

alien-brother commented Jan 22, 2024

If the plugin has zero parameters with CLAP_PARAM_IS_AUTOMATABLE flag, it seems that state-reproducibility-flush does the following:

  • Calls flush() with zero events in the in-list.
  • Calls state_save().
  • Fails.

Now, not setting the CLAP_PARAM_IS_AUTOMATABLE flag was probably an error on my part, but the behaviour of the check was not clear until I saw #15.

@robbert-vdh
Copy link
Member

What exactly is failing here? All tests pass when I run it on https://github.com/robbert-vdh/nih-plug/tree/master/plugins/examples/midi_inverter, which doesn't have any parameters at all.

@alien-brother
Copy link
Author

alien-brother commented Jan 22, 2024

Can confirm that if I force that count() of clap_plugin_params_t returns 0, the test passes. It fails for me if count() is not zero, but none of the present parameters have CLAP_PARAM_IS_AUTOMATABLE flag.

I'm using the binary release of 0.3.2 on Windows.

Edit. This is the failure message:

 FAILED: 'clap_plugin_params::flush()' has been called with random parameter
   values, but the plugin's reported parameter values have not changed.

I assume it comes from

if expected_param_values == initial_param_values && !param_infos.is_empty() {
anyhow::bail!(
"'clap_plugin_params::flush()' has been called with random parameter values, but \
the plugin's reported parameter values have not changed."
)
}

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

No branches or pull requests

2 participants