Update for CLAP 0.25
This commit is contained in:
parent
743998e388
commit
c141314e30
3 changed files with 26 additions and 16 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -469,8 +469,8 @@ checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap-sys"
|
name = "clap-sys"
|
||||||
version = "0.24.0"
|
version = "0.25.0"
|
||||||
source = "git+https://github.com/robbert-vdh/clap-sys?branch=update/clap-0.24#5f07706d47a2a7e35b462d020335b55a5f03864c"
|
source = "git+https://github.com/robbert-vdh/clap-sys?branch=feature/clap-0.25#c8e5011a66377aa14d9f719a52255d30a48232ed"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clipboard-win"
|
name = "clipboard-win"
|
||||||
|
|
|
@ -64,8 +64,8 @@ atomic_float = "0.1"
|
||||||
atomic_refcell = "0.1"
|
atomic_refcell = "0.1"
|
||||||
bitflags = "1.3"
|
bitflags = "1.3"
|
||||||
cfg-if = "1.0"
|
cfg-if = "1.0"
|
||||||
# For CLAP 0.24
|
# For CLAP 0.25
|
||||||
clap-sys = { git = "https://github.com/robbert-vdh/clap-sys", branch = "update/clap-0.24" }
|
clap-sys = { git = "https://github.com/robbert-vdh/clap-sys", branch = "feature/clap-0.25" }
|
||||||
crossbeam = "0.8"
|
crossbeam = "0.8"
|
||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
log = { version = "0.4", features = ["std", "release_max_level_info"] }
|
log = { version = "0.4", features = ["std", "release_max_level_info"] }
|
||||||
|
|
|
@ -828,8 +828,9 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
param_id: param_hash,
|
param_id: param_hash,
|
||||||
cookie: ptr::null_mut(),
|
cookie: ptr::null_mut(),
|
||||||
port_index: -1,
|
port_index: -1,
|
||||||
key: -1,
|
note_id: -1,
|
||||||
channel: -1,
|
channel: -1,
|
||||||
|
key: -1,
|
||||||
value: clap_plain_value,
|
value: clap_plain_value,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -881,9 +882,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
// We don't have a way to denote live events
|
// We don't have a way to denote live events
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
velocity: velocity as f64,
|
velocity: velocity as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -903,9 +905,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
type_: CLAP_EVENT_NOTE_OFF,
|
type_: CLAP_EVENT_NOTE_OFF,
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
velocity: velocity as f64,
|
velocity: velocity as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -926,9 +929,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
expression_id: CLAP_NOTE_EXPRESSION_PRESSURE,
|
expression_id: CLAP_NOTE_EXPRESSION_PRESSURE,
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
value: pressure as f64,
|
value: pressure as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -949,9 +953,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
expression_id: CLAP_NOTE_EXPRESSION_VOLUME,
|
expression_id: CLAP_NOTE_EXPRESSION_VOLUME,
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
value: gain as f64,
|
value: gain as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -972,9 +977,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
expression_id: CLAP_NOTE_EXPRESSION_PAN,
|
expression_id: CLAP_NOTE_EXPRESSION_PAN,
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
value: (pan as f64 + 1.0) / 2.0,
|
value: (pan as f64 + 1.0) / 2.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -995,9 +1001,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
expression_id: CLAP_NOTE_EXPRESSION_TUNING,
|
expression_id: CLAP_NOTE_EXPRESSION_TUNING,
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
value: tuning as f64,
|
value: tuning as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1018,9 +1025,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
expression_id: CLAP_NOTE_EXPRESSION_VIBRATO,
|
expression_id: CLAP_NOTE_EXPRESSION_VIBRATO,
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
value: vibrato as f64,
|
value: vibrato as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1041,9 +1049,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
expression_id: CLAP_NOTE_EXPRESSION_EXPRESSION,
|
expression_id: CLAP_NOTE_EXPRESSION_EXPRESSION,
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
value: expression as f64,
|
value: expression as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1064,9 +1073,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
flags: 0,
|
flags: 0,
|
||||||
},
|
},
|
||||||
expression_id: CLAP_NOTE_EXPRESSION_BRIGHTNESS,
|
expression_id: CLAP_NOTE_EXPRESSION_BRIGHTNESS,
|
||||||
|
note_id: -1,
|
||||||
port_index: 0,
|
port_index: 0,
|
||||||
key: note as i16,
|
|
||||||
channel: channel as i16,
|
channel: channel as i16,
|
||||||
|
key: note as i16,
|
||||||
value: brightness as f64,
|
value: brightness as f64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1988,10 +1998,10 @@ impl<P: ClapPlugin> Wrapper<P> {
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
config.has_main_input_channel = bus_config.num_output_channels > 0;
|
config.has_main_input = bus_config.num_output_channels > 0;
|
||||||
config.main_input_channel_count = bus_config.num_output_channels;
|
config.main_input_channel_count = bus_config.num_output_channels;
|
||||||
config.main_input_port_type = input_port_type;
|
config.main_input_port_type = input_port_type;
|
||||||
config.has_main_output_channel = bus_config.num_output_channels > 0;
|
config.has_main_output = bus_config.num_output_channels > 0;
|
||||||
config.main_output_channel_count = bus_config.num_output_channels;
|
config.main_output_channel_count = bus_config.num_output_channels;
|
||||||
config.main_output_port_type = output_port_type;
|
config.main_output_port_type = output_port_type;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue