Move the hard realtime constant to Plugin
Since we could indeed just add the `|OnlyRT` category to the VST3 plugin.
This commit is contained in:
parent
992fcfe969
commit
905925e032
|
@ -6,6 +6,12 @@ new and what's changed, this document lists all breaking changes in reverse
|
||||||
chronological order. If a new feature did not require any changes to existing
|
chronological order. If a new feature did not require any changes to existing
|
||||||
code then it will not be listed here.
|
code then it will not be listed here.
|
||||||
|
|
||||||
|
## [2022-07-05]
|
||||||
|
|
||||||
|
- The `ClapPlugin::CLAP_HARD_REALTIME` constant was moved to the general
|
||||||
|
`Plugin` trait as `Plugin::HARD_REALTIME_ONLY` and best-effort support for
|
||||||
|
VST3 was added.
|
||||||
|
|
||||||
## [2022-07-04]
|
## [2022-07-04]
|
||||||
|
|
||||||
- There is a new `NoteEvent::Choke` event the host can send to a plugin to let
|
- There is a new `NoteEvent::Choke` event the host can send to a plugin to let
|
||||||
|
|
|
@ -80,6 +80,11 @@ pub trait Plugin: Default + Send + Sync + 'static {
|
||||||
/// every 64 samples.
|
/// every 64 samples.
|
||||||
const SAMPLE_ACCURATE_AUTOMATION: bool = false;
|
const SAMPLE_ACCURATE_AUTOMATION: bool = false;
|
||||||
|
|
||||||
|
/// If this is set to true, then the plugin will report itself as having a hard realtime
|
||||||
|
/// processing requirement when the host asks for it. Supported hosts will never ask the plugin
|
||||||
|
/// to do offline processing.
|
||||||
|
const HARD_REALTIME_ONLY: bool = false;
|
||||||
|
|
||||||
/// The plugin's parameters. The host will update the parameter values before calling
|
/// The plugin's parameters. The host will update the parameter values before calling
|
||||||
/// `process()`. These parameters are identified by strings that should never change when the
|
/// `process()`. These parameters are identified by strings that should never change when the
|
||||||
/// plugin receives an update.
|
/// plugin receives an update.
|
||||||
|
@ -201,13 +206,6 @@ pub trait ClapPlugin: Plugin {
|
||||||
/// Keywords describing the plugin. The host may use this to classify the plugin in its plugin
|
/// Keywords describing the plugin. The host may use this to classify the plugin in its plugin
|
||||||
/// browser.
|
/// browser.
|
||||||
const CLAP_FEATURES: &'static [ClapFeature];
|
const CLAP_FEATURES: &'static [ClapFeature];
|
||||||
|
|
||||||
/// If this is set to true, then the plugin will report itself as having a hard realtime
|
|
||||||
/// processing requirement when the host asks for it. Supported hosts will never ask the plugin
|
|
||||||
/// to do offline processing.
|
|
||||||
// TODO: Supposedly VST3 also has something similar if you add an `|OnlyRT` category. We should
|
|
||||||
// move this to the Plugin trait and use that for VST3
|
|
||||||
const CLAP_HARD_REALTIME: bool = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Provides auxiliary metadata needed for a VST3 plugin.
|
/// Provides auxiliary metadata needed for a VST3 plugin.
|
||||||
|
|
|
@ -2934,7 +2934,7 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
unsafe extern "C" fn ext_render_has_hard_realtime_requirement(
|
unsafe extern "C" fn ext_render_has_hard_realtime_requirement(
|
||||||
_plugin: *const clap_plugin,
|
_plugin: *const clap_plugin,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
P::CLAP_HARD_REALTIME
|
P::HARD_REALTIME_ONLY
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe extern "C" fn ext_render_set(
|
unsafe extern "C" fn ext_render_set(
|
||||||
|
|
Loading…
Reference in a new issue