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
//! Type-based sample pool labeling.
//!
//! `bevy_seedling` provides a single pool label, [`DefaultPool`].
//! Any node that doesn't provide an explicit pool when spawned
//! and has no effects will be automatically played in the [`DefaultPool`].
use ;
pub use PoolLabel;
define_label!;
/// The default sample pool.
///
/// If no pool is specified when spawning a
/// [`SamplePlayer`] and any effects match those
/// on the default pool, this label will be inserted
/// automatically.
///
/// [`SamplePlayer`]: crate::sample::SamplePlayer
///
/// Depending on your [`GraphConfiguration`][crate::prelude::GraphConfiguration], you
/// can customize the default pool or even omit it entirely.
///
/// ```no_run
/// use bevy::prelude::*;
/// use bevy_seedling::prelude::*;
///
/// fn main() {
/// App::default()
/// .add_plugins((
/// DefaultPlugins,
/// SeedlingPlugin {
/// graph_config: GraphConfiguration::Empty,
/// ..Default::default()
/// },
/// ))
/// .add_systems(Startup, |mut commands: Commands| {
/// // Make the default pool provide spatial audio.
/// commands.spawn((
/// SamplerPool(DefaultPool),
/// sample_effects![SpatialBasicNode::default()],
/// ));
///
/// commands
/// .spawn((MainBus, VolumeNode::default()))
/// .connect(AudioGraphOutput);
/// })
/// .run();
/// }
/// ```
///
/// You can also simply re-route the default pool.
///
/// ```
/// # use bevy::prelude::*;
/// # use bevy_seedling::prelude::*;
/// fn reroute_default_pool(
/// pool: Single<Entity, (With<DefaultPool>, With<VolumeNode>)>,
/// mut commands: Commands,
/// ) {
/// // Let's splice in a send to a reverb node.
/// let reverb = commands.spawn(FreeverbNode::default()).id();
///
/// commands
/// .entity(*pool)
/// .disconnect(MainBus)
/// .chain_node(SendNode::new(Volume::Decibels(-12.0), reverb))
/// .connect(SfxBus);
/// }
/// ```
;
/// A type-erased node label.
pub type InternedPoolLabel = ;
/// A type-erased pool label container.