godot_bevy/plugins/audio/
command.rs1use crate::plugins::assets::GodotResource;
4use crate::plugins::audio::{AudioPlayerType, AudioSettings, AudioTween, ChannelId, SoundId};
5use bevy_asset::Handle;
6
7#[derive(Debug)]
9pub enum AudioCommand {
10 Play(PlayCommand),
11 Stop(ChannelId, Option<AudioTween>),
12 Pause(ChannelId, Option<AudioTween>),
13 Resume(ChannelId, Option<AudioTween>),
14 SetVolume(ChannelId, f32, Option<AudioTween>),
15 SetPitch(ChannelId, f32, Option<AudioTween>),
16 SetPanning(ChannelId, f32, Option<AudioTween>),
17 StopSound(SoundId, Option<AudioTween>),
18}
19
20#[derive(Debug)]
22pub struct PlayCommand {
23 pub channel_id: ChannelId,
24 pub handle: Handle<GodotResource>,
25 pub player_type: AudioPlayerType,
26 pub settings: AudioSettings,
27 pub sound_id: SoundId,
28}