Skip to main content

concinnity_core/components/
play_cue.rs

1// src/components/play_cue.rs
2
3use crate::components::CueKind;
4use crate::ecs::AudioClipHandle;
5
6/// Runtime-only event asking the audio system to play a clip: the direct
7/// equivalent of an AudioCue firing, for systems that trigger audio from their
8/// own state (the story system plays page music and one-shots this way). World
9/// authors never declare this type directly.
10#[derive(Debug, Clone, Copy)]
11pub struct PlayCue {
12    /// The clip to play.
13    pub clip: AudioClipHandle,
14    /// Whether the clip plays as a one-shot or a loop.
15    pub kind: CueKind,
16    /// Linear gain applied on top of the bus volume.
17    pub volume: f32,
18    /// Voice priority for a one-shot request (higher wins a full voice pool).
19    pub priority: i32,
20}