diff --git a/Cargo.lock b/Cargo.lock index 381155ce..8dfc699a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -469,8 +469,8 @@ checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919" [[package]] name = "clap-sys" -version = "0.24.0" -source = "git+https://github.com/robbert-vdh/clap-sys?branch=update/clap-0.24#5f07706d47a2a7e35b462d020335b55a5f03864c" +version = "0.25.0" +source = "git+https://github.com/robbert-vdh/clap-sys?branch=feature/clap-0.25#c8e5011a66377aa14d9f719a52255d30a48232ed" [[package]] name = "clipboard-win" diff --git a/Cargo.toml b/Cargo.toml index fed2e634..57e3b15e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,8 +64,8 @@ atomic_float = "0.1" atomic_refcell = "0.1" bitflags = "1.3" cfg-if = "1.0" -# For CLAP 0.24 -clap-sys = { git = "https://github.com/robbert-vdh/clap-sys", branch = "update/clap-0.24" } +# For CLAP 0.25 +clap-sys = { git = "https://github.com/robbert-vdh/clap-sys", branch = "feature/clap-0.25" } crossbeam = "0.8" lazy_static = "1.4" log = { version = "0.4", features = ["std", "release_max_level_info"] } diff --git a/src/wrapper/clap/wrapper.rs b/src/wrapper/clap/wrapper.rs index 46e9579a..4ecc435c 100644 --- a/src/wrapper/clap/wrapper.rs +++ b/src/wrapper/clap/wrapper.rs @@ -828,8 +828,9 @@ impl Wrapper

{ param_id: param_hash, cookie: ptr::null_mut(), port_index: -1, - key: -1, + note_id: -1, channel: -1, + key: -1, value: clap_plain_value, }; @@ -881,9 +882,10 @@ impl Wrapper

{ // We don't have a way to denote live events flags: 0, }, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, velocity: velocity as f64, }; @@ -903,9 +905,10 @@ impl Wrapper

{ type_: CLAP_EVENT_NOTE_OFF, flags: 0, }, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, velocity: velocity as f64, }; @@ -926,9 +929,10 @@ impl Wrapper

{ flags: 0, }, expression_id: CLAP_NOTE_EXPRESSION_PRESSURE, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, value: pressure as f64, }; @@ -949,9 +953,10 @@ impl Wrapper

{ flags: 0, }, expression_id: CLAP_NOTE_EXPRESSION_VOLUME, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, value: gain as f64, }; @@ -972,9 +977,10 @@ impl Wrapper

{ flags: 0, }, expression_id: CLAP_NOTE_EXPRESSION_PAN, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, value: (pan as f64 + 1.0) / 2.0, }; @@ -995,9 +1001,10 @@ impl Wrapper

{ flags: 0, }, expression_id: CLAP_NOTE_EXPRESSION_TUNING, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, value: tuning as f64, }; @@ -1018,9 +1025,10 @@ impl Wrapper

{ flags: 0, }, expression_id: CLAP_NOTE_EXPRESSION_VIBRATO, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, value: vibrato as f64, }; @@ -1041,9 +1049,10 @@ impl Wrapper

{ flags: 0, }, expression_id: CLAP_NOTE_EXPRESSION_EXPRESSION, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, value: expression as f64, }; @@ -1064,9 +1073,10 @@ impl Wrapper

{ flags: 0, }, expression_id: CLAP_NOTE_EXPRESSION_BRIGHTNESS, + note_id: -1, port_index: 0, - key: note as i16, channel: channel as i16, + key: note as i16, value: brightness as f64, }; @@ -1988,10 +1998,10 @@ impl Wrapper

{ } else { 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_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_port_type = output_port_type;