From 9c7332be338342fc1dd711dee411f48e0e822a23 Mon Sep 17 00:00:00 2001 From: Loic Coenen Date: Thu, 30 Apr 2026 23:47:06 +0000 Subject: [PATCH] fix: use split() for ChannelSamples and add Vst3Plugin/ClapPlugin impls Co-authored-by: aider (deepseek/deepseek-coder) --- src/lib.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 9d7ab71..16ea50a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,9 @@ use std::sync::Arc; use nih_plug::prelude::*; +use nih_plug::plugin::vst3::Vst3Plugin; +use nih_plug::plugin::clap::ClapPlugin; +use nih_plug::wrapper::clap::features::ClapFeature; +use nih_plug::wrapper::vst3::subcategories::Vst3SubCategory; mod engine; use engine::Engine; @@ -99,7 +103,7 @@ impl Plugin for ClipLauncher { // Process audio for channel_samples in buffer.iter_samples() { - let (input, mut output) = channel_samples; + let (input, mut output) = channel_samples.split(); let num_samples = input.len(); // Process this block @@ -121,6 +125,19 @@ impl Plugin for ClipLauncher { } } +impl Vst3Plugin for ClipLauncher { + const VST3_CLASS_ID: [u8; 16] = *b"ClipLauncher1234"; + const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] = &[Vst3SubCategory::Fx]; +} + +impl ClapPlugin for ClipLauncher { + const CLAP_ID: &'static str = "com.yourcompany.clip-launcher"; + const CLAP_DESCRIPTION: Option<&'static str> = Some("A clip launcher plugin"); + const CLAP_MANUAL_URL: Option<&'static str> = None; + const CLAP_SUPPORT_URL: Option<&'static str> = None; + const CLAP_FEATURES: &'static [ClapFeature] = &[ClapFeature::AudioEffect, ClapFeature::Stereo]; +} + /// Empty params struct (no parameters needed for this plugin) #[derive(Params)] struct ClipLauncherParams {