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
//! VST 3 plugin hosting. Enabled by the `vst3` feature.
//!
//! Backed by [`truce-rack-vst3`](https://docs.rs/truce-rack-vst3/1.1.5), which
//! provides the scanner and the loaded instance. Everything atome adds on top
//! — activation, deinterleaving, block splitting — is shared with the other
//! hosted formats and lives in [`host`](super::host).
//!
//! A VST3 bundle is a directory ending in `.vst3`, so
//! [`Plugin::load`](super::Plugin::load) recognises one by that suffix.
//!
//! ```no_run
//! use atome::plugins::{Plugin, PluginFormat};
//!
//! let mut plugin = Plugin::new(
//! "Pro-Q".into(),
//! "/Library/Audio/Plug-Ins/VST3/FabFilter Pro-Q 3.vst3".into(),
//! 512,
//! 48_000,
//! 2,
//! String::new(),
//! PluginFormat::Vst3,
//! );
//! plugin.load()?;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
use Path;
use ;
use ;
use Hosted;
/// The loaded form of a VST3 plugin, with the scratch its blocks need.
pub type Loaded = ;
/// Scans `path` and loads the first VST3 it finds there.
///
/// "First" rather than "the one you meant": a single `.vst3` bundle can
/// declare several plugins, and the descriptor's name is a label for atome's
/// own bookkeeping rather than something guaranteed to match what the bundle
/// calls its plugins. Point at a bundle that holds one, or scan yourself with
/// [`Vst3Scanner`] and pick.
///
/// # Errors
///
/// Fails if the scan finds no VST3 at `path`, if the module will not load, or
/// if the plugin declares no `channels`-in/`channels`-out layout.
pub