Add another plugin constant for MIDI support
This commit is contained in:
parent
c1f435d909
commit
f69fdcef5f
|
@ -96,6 +96,8 @@ impl Plugin for Gain {
|
|||
const DEFAULT_NUM_INPUTS: u32 = 2;
|
||||
const DEFAULT_NUM_OUTPUTS: u32 = 2;
|
||||
|
||||
const ACCEPTS_MIDI: bool = false;
|
||||
|
||||
fn params(&self) -> Pin<&dyn Params> {
|
||||
self.params.as_ref()
|
||||
}
|
||||
|
|
|
@ -98,6 +98,8 @@ impl Plugin for Sine {
|
|||
const DEFAULT_NUM_INPUTS: u32 = 0;
|
||||
const DEFAULT_NUM_OUTPUTS: u32 = 2;
|
||||
|
||||
const ACCEPTS_MIDI: bool = true;
|
||||
|
||||
fn params(&self) -> Pin<&dyn Params> {
|
||||
self.params.as_ref()
|
||||
}
|
||||
|
|
|
@ -54,6 +54,10 @@ pub trait Plugin: Default + Send + Sync {
|
|||
/// instead of setting up the busses properly.
|
||||
const DEFAULT_NUM_OUTPUTS: u32;
|
||||
|
||||
/// Whether the plugin accepts note events. If this is set to `false`, then the plugin won't
|
||||
/// receive any note events.
|
||||
const ACCEPTS_MIDI: bool;
|
||||
|
||||
/// 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
|
||||
/// plugin receives an update.
|
||||
|
|
Loading…
Reference in a new issue