fix: use split() for ChannelSamples and add Vst3Plugin/ClapPlugin impls
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
19
src/lib.rs
19
src/lib.rs
@@ -1,5 +1,9 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use nih_plug::prelude::*;
|
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;
|
mod engine;
|
||||||
use engine::Engine;
|
use engine::Engine;
|
||||||
@@ -99,7 +103,7 @@ impl Plugin for ClipLauncher {
|
|||||||
|
|
||||||
// Process audio
|
// Process audio
|
||||||
for channel_samples in buffer.iter_samples() {
|
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();
|
let num_samples = input.len();
|
||||||
|
|
||||||
// Process this block
|
// 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)
|
/// Empty params struct (no parameters needed for this plugin)
|
||||||
#[derive(Params)]
|
#[derive(Params)]
|
||||||
struct ClipLauncherParams {
|
struct ClipLauncherParams {
|
||||||
|
|||||||
Reference in New Issue
Block a user