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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
//! # Rack - Audio Plugin Hosting for Rust
//!
//! Rack is a modern Rust library for hosting audio plugins in your applications.
//! It provides a clean, safe API for discovering, loading, and processing audio
//! through VST3, AudioUnit, CLAP, and other plugin formats.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use rack::prelude::*;
//!
//! # fn main() -> rack::Result<()> {
//! // Scan for plugins
//! let scanner = Scanner::new()?;
//! let plugins = scanner.scan()?;
//!
//! println!("Found {} plugins", plugins.len());
//!
//! // Load a plugin
//! let mut plugin = scanner.load(&plugins[0])?;
//! plugin.initialize(48000.0, 512)?;
//!
//! // Process audio (planar format - one buffer per channel)
//! let left_in = vec![0.0f32; 512];
//! let right_in = vec![0.0f32; 512];
//! let mut left_out = vec![0.0f32; 512];
//! let mut right_out = vec![0.0f32; 512];
//!
//! plugin.process(
//! &[&left_in, &right_in],
//! &mut [&mut left_out, &mut right_out],
//! 512
//! )?;
//! # Ok(())
//! # }
//! ```
//!
//! ## Features
//!
//! - **AudioUnit support** (macOS, iOS) - built-in
//! - **VST3 support** (Windows, macOS, Linux) - built-in
//! - **CLAP support** - coming soon
//! - **cpal integration** - optional, enable with `cpal` feature
//!
//! ## Platform Support
//!
//! - **macOS**: AudioUnit (default) and VST3
//! - **iOS**: AudioUnit only (VST3 not available on mobile)
//! - **Windows**: VST3 (default)
//! - **Linux**: VST3 (default)
//!
//! AudioUnit provides the best integration on Apple platforms (native GUI support).
//! VST3 is the default on Windows and Linux, and also available on macOS.
pub use ;
pub use ;
pub use ;
pub use ;
// Platform-specific implementations
// AudioUnit is available on both macOS and iOS
// VST3 is available on desktop platforms (Windows, macOS, Linux) when the SDK is present
// Explicitly disabled on mobile platforms (iOS, tvOS, watchOS, visionOS)
// The "vst3_sdk" cfg is set by build.rs when the VST3 SDK is found
// Re-export the default scanner and plugin types for the platform
// On Apple platforms, default to AudioUnit (better integration, GUI support)
pub use ;
// On non-Apple desktop platforms, default to VST3 (if available)
pub use ;
/// Prelude module for convenient imports