fix: resolve compilation errors in plugin struct and MIDI event handling

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-04-30 23:41:11 +00:00
parent 34ccba7fd1
commit 1ece32e41c

View File

@@ -1,3 +1,4 @@
use std::sync::Arc;
use nih_plug::prelude::*;
mod engine;
@@ -8,7 +9,7 @@ pub struct ClipLauncher {
/// The engine managing clips
engine: Engine,
/// Pending MIDI output events
pending_midi: Vec<NoteEvent<f32>>,
pending_midi: Vec<NoteEvent<()>>,
}
impl Default for ClipLauncher {
@@ -98,7 +99,7 @@ impl Plugin for ClipLauncher {
// Process audio
for channel_samples in buffer.iter_samples() {
let (input, mut output) = channel_samples.split();
let (input, mut output) = channel_samples;
let num_samples = input.len();
// Process this block
@@ -114,7 +115,9 @@ impl Plugin for ClipLauncher {
}
fn params(&self) -> Arc<dyn Params> {
Arc::new(ClipLauncherParams)
Arc::new(ClipLauncherParams {
dummy: BoolParam::new("Dummy", false),
})
}
}
@@ -126,14 +129,6 @@ struct ClipLauncherParams {
dummy: BoolParam,
}
impl Default for ClipLauncherParams {
fn default() -> Self {
Self {
dummy: BoolParam::new("Dummy", false),
}
}
}
// Export the plugin
nih_export_vst3!(ClipLauncher);
nih_export_clap!(ClipLauncher);