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
//! Audio Unit v2 plugin hosting. Enabled by the `au` feature.
//!
//! macOS and iOS only — Audio Units are an Apple framework, so both the
//! backing crate and this module are declared for Apple targets alone. Turning
//! the feature on elsewhere pulls in nothing and leaves
//! [`PluginFormat::Au`](super::PluginFormat::Au) a format that
//! [`Plugin::load`](super::Plugin::load) refuses, with a message saying why.
//!
//! Backed by [`truce-rack-au`](https://docs.rs/truce-rack-au/1.1.5). Everything
//! atome adds on top — activation, deinterleaving, block splitting — is shared
//! with the other hosted formats and lives in [`host`](super::host).
//!
//! A v2 Audio Unit is a `.component` bundle under
//! `/Library/Audio/Plug-Ins/Components`, or the equivalent in `~/Library`.
//! For v3 App Extensions, see [`au3`](super::au3).
use Path;
use ;
use ;
use Hosted;
/// The loaded form of an Audio Unit, with the scratch its blocks need.
///
/// Shared with [`au3`](super::au3): a v3 App Extension is driven through the
/// same `AudioComponentInstance`, so it loads into this same type.
pub type Loaded = ;
/// Scans `path` and loads the first Audio Unit it finds there.
///
/// # Errors
///
/// Fails if the scan finds no AU at `path`, if the component will not
/// instantiate, or if the plugin declares no `channels`-in/`channels`-out
/// layout.
pub