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
//! Comprehensive audio system for godot-bevy
//!
//! This module provides a powerful audio API that integrates Godot's audio system
//! with Bevy's ECS, offering channels, spatial audio, and smooth transitions.
//!
//! # Example
//! ```rust,no_run
//! use bevy::prelude::*;
//! use godot_bevy::prelude::*;
//!
//! fn setup_audio(
//! background_music: Res<AudioChannel<BackgroundMusic>>,
//! sound_effects: Res<AudioChannel<SoundEffects>>,
//! asset_server: Res<AssetServer>,
//! ) {
//! // Play background music
//! background_music
//! .play(asset_server.load("music/background.ogg"))
//! .volume(0.8)
//! .looped();
//!
//! // Play a sound effect at a specific 2D position
//! sound_effects
//! .play_2d(
//! asset_server.load("sounds/jump.wav"),
//! Vec2::new(100.0, 50.0),
//! )
//! .volume(0.6)
//! .pitch(1.2);
//! }
//!
//! // Define custom audio channels
//! #[derive(Resource)]
//! struct BackgroundMusic;
//! impl AudioChannelMarker for BackgroundMusic {
//! const CHANNEL_NAME: &'static str = "background_music";
//! }
//!
//! #[derive(Resource)]
//! struct SoundEffects;
//! impl AudioChannelMarker for SoundEffects {
//! const CHANNEL_NAME: &'static str = "sound_effects";
//! }
//! ```
// Re-export main types for convenience
pub use ;
pub use ;
pub use ;
pub use AudioPlayerType;
pub use ;
pub use AudioSettings;
pub use ;
// Internal types that need to be accessible within the audio module
pub use ChannelState;
/// Main audio channel type alias for convenience
pub type Audio = ;