Add option to mark sound as stereo

This commit is contained in:
Gwilym Kuiper 2021-10-18 21:22:36 +01:00
parent e92383e29c
commit 4f0b01b932

View file

@ -35,6 +35,8 @@ pub struct SoundChannel {
panning: Num<i16, 4>, // between -1 and 1
is_done: bool,
is_stereo: bool,
priority: SoundPriority,
}
@ -49,6 +51,7 @@ impl SoundChannel {
is_done: false,
priority: SoundPriority::Low,
volume: 1.into(),
is_stereo: false,
}
}
@ -62,6 +65,7 @@ impl SoundChannel {
is_done: false,
priority: SoundPriority::High,
volume: 1.into(),
is_stereo: false,
}
}
@ -91,6 +95,12 @@ impl SoundChannel {
self
}
pub fn stereo(&mut self) -> &mut Self {
self.is_stereo = true;
self
}
pub fn stop(&mut self) {
self.is_done = true
}