83 lines
2.2 KiB
Rust
83 lines
2.2 KiB
Rust
|
use std::sync::Arc;
|
||
|
|
||
|
use nih_plug::prelude::*;
|
||
|
|
||
|
#[derive(Default)]
|
||
|
struct GameboyEmu {}
|
||
|
|
||
|
impl Plugin for GameboyEmu {
|
||
|
const NAME: &'static str = "Gameboy";
|
||
|
|
||
|
const VENDOR: &'static str = "Alex Janka";
|
||
|
|
||
|
const URL: &'static str = "alexjanka.com";
|
||
|
|
||
|
const EMAIL: &'static str = "alex@alexjanka.com";
|
||
|
|
||
|
const VERSION: &'static str = "0.1";
|
||
|
|
||
|
const AUDIO_IO_LAYOUTS: &'static [AudioIOLayout] = &[
|
||
|
AudioIOLayout {
|
||
|
main_input_channels: NonZeroU32::new(2),
|
||
|
main_output_channels: NonZeroU32::new(2),
|
||
|
|
||
|
aux_input_ports: &[],
|
||
|
aux_output_ports: &[],
|
||
|
|
||
|
// Individual ports and the layout as a whole can be named here. By default these names
|
||
|
// are generated as needed. This layout will be called 'Stereo', while the other one is
|
||
|
// given the name 'Mono' based no the number of input and output channels.
|
||
|
names: PortNames::const_default(),
|
||
|
},
|
||
|
AudioIOLayout {
|
||
|
main_input_channels: NonZeroU32::new(1),
|
||
|
main_output_channels: NonZeroU32::new(1),
|
||
|
..AudioIOLayout::const_default()
|
||
|
},
|
||
|
];
|
||
|
|
||
|
type SysExMessage = ();
|
||
|
|
||
|
type BackgroundTask = ();
|
||
|
|
||
|
fn params(&self) -> Arc<dyn Params> {
|
||
|
todo!()
|
||
|
}
|
||
|
|
||
|
fn process(
|
||
|
&mut self,
|
||
|
buffer: &mut Buffer,
|
||
|
aux: &mut AuxiliaryBuffers,
|
||
|
context: &mut impl ProcessContext<Self>,
|
||
|
) -> ProcessStatus {
|
||
|
todo!()
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl Vst3Plugin for GameboyEmu {
|
||
|
const VST3_CLASS_ID: [u8; 16] = *b"alexjankagbemul8";
|
||
|
|
||
|
const VST3_SUBCATEGORIES: &'static [Vst3SubCategory] =
|
||
|
&[Vst3SubCategory::External, Vst3SubCategory::Instrument];
|
||
|
}
|
||
|
|
||
|
impl ClapPlugin for GameboyEmu {
|
||
|
const CLAP_ID: &'static str = "com.alexjanka.GameboyEmu-rs";
|
||
|
|
||
|
const CLAP_DESCRIPTION: Option<&'static str> = None;
|
||
|
|
||
|
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,
|
||
|
ClapFeature::Mono,
|
||
|
ClapFeature::Utility,
|
||
|
];
|
||
|
}
|
||
|
|
||
|
// nih_export_clap!(GameboyEmu);
|
||
|
nih_export_vst3!(GameboyEmu);
|