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
//! Plugin discovery trait.
//!
//! Each format wrapper exposes a `*Scanner` type that
//! implements [`PluginScanner`]. Hosts may also implement
//! their own composite scanners that aggregate results across
//! formats (`MultiScanner { clap, vst3, au }` etc.) — there's
//! nothing format-specific in the trait.
use crateResult;
use cratePluginInfo;
use Path;
/// Discover and load audio plugins of a single format.
///
/// # Thread safety
///
/// Scans are **off the audio thread**. They walk the filesystem,
/// open dylibs, and can take seconds (a fresh AU scan touches
/// 100+ plugins on a typical Mac). Hosts should never call
/// `scan` from a real-time context — wrap in a worker thread
/// if you need a non-blocking discovery flow.