1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! # beamer-vst3
//!
//! VST3 implementation layer for the Beamer framework.
//!
//! This crate provides the VST3 interface implementations that wrap `beamer-core` traits
//! into VST3 COM interfaces. It handles all the VST3-specific details like:
//!
//! - Plugin factory (IPluginFactory, IPluginFactory2, IPluginFactory3)
//! - Generic processor wrapper ([`Vst3Processor`])
//! - Platform entry points
//!
//! ## Architecture
//!
//! Uses the **combined component** pattern where processor and controller are
//! implemented by the same object. This is the modern, recommended approach
//! used by most audio plugin frameworks.
//!
//! ```text
//! User Plugin (implements beamer_core::Plugin)
//! ↓
//! Vst3Processor<P> (generic VST3 wrapper)
//! ↓
//! VST3 COM interfaces (IComponent, IAudioProcessor, IEditController)
//! ```
//!
//! ## Usage
//!
//! 1. Implement `beamer_core::Plugin` for your plugin type
//! 2. Use `export_vst3!` macro to generate entry points
//!
//! ```rust,ignore
//! use beamer_core::{Plugin, AudioProcessor, AudioBuffer, Parameters, ParamInfo};
//! use beamer_vst3::{export_vst3, Vst3Processor, PluginConfig, vst3};
//!
//! // Define your plugin
//! struct MyGain { params: MyParams }
//!
//! impl AudioProcessor for MyGain {
//! fn setup(&mut self, _: f64, _: usize) {}
//! fn process(&mut self, buffer: &mut AudioBuffer) { /* DSP here */ }
//! }
//!
//! impl Plugin for MyGain {
//! type Params = MyParams;
//! fn params(&self) -> &Self::Params { &self.params }
//! fn create() -> Self { Self { params: MyParams::new() } }
//! }
//!
//! // Configure and export
//! static CONFIG: PluginConfig = PluginConfig::new(
//! "My Plugin",
//! vst3::uid(0x12345678, 0x9ABCDEF0, 0xABCDEF12, 0x34567890),
//! )
//! .with_vendor("My Company");
//!
//! export_vst3!(CONFIG, Vst3Processor<MyGain>);
//! ```
// Re-exports
pub use Factory;
pub use Vst3Processor;
pub use PluginConfig;
// Re-export vst3 crate for use in macros and UIDs
pub use vst3;