#[derive(Debug, Clone, Default)]
pub struct AudioSource {
    pub audio_ref: Option<String>,
    pub volume: f64,
    pub looping: bool,
    pub playing: bool,
    pub spatial: bool,
    pub reverb: bool,
}

impl AudioSource {
    pub fn new(audio_ref: impl Into<String>) -> Self {
        Self {
            audio_ref: Some(audio_ref.into()),
            volume: 1.0,
            looping: false,
            playing: false,
            spatial: false,
            reverb: false,
        }
    }

    pub fn with_volume(mut self, volume: f64) -> Self {
        self.volume = volume;
        self
    }

    pub fn with_looping(mut self, looping: bool) -> Self {
        self.looping = looping;
        self
    }

    pub fn with_spatial(mut self, spatial: bool) -> Self {
        self.spatial = spatial;
        self
    }

    pub fn with_reverb(mut self, reverb: bool) -> Self {
        self.reverb = reverb;
        self
    }

    pub fn playing(mut self) -> Self {
        self.playing = true;
        self
    }
}

#[derive(Debug, Clone, Copy, Default)]
pub struct AudioListener;
