pub struct MixerChannel {
pub id: u16,
pub name: String,
/* private fields */
}Expand description
A single mixer channel representing one audio source
Fields§
§id: u16Unique channel identifier
name: StringHuman-readable channel name
Implementations§
Source§impl MixerChannel
impl MixerChannel
Sourcepub fn get_volume(&self) -> u16
pub fn get_volume(&self) -> u16
Get the current volume (0..65535)
Sourcepub fn set_volume(&self, vol: u16)
pub fn set_volume(&self, vol: u16)
Set the volume (0..65535)
Sourcepub fn write_samples(&mut self, data: &[i16])
pub fn write_samples(&mut self, data: &[i16])
Write samples into this channel’s buffer for the next mix cycle