Add should_loop option

This commit is contained in:
Gwilym Kuiper 2021-06-06 11:51:44 +01:00
parent 46683e42c8
commit d7a8928955

View file

@ -39,11 +39,16 @@ impl Mixer {
struct SoundChannel {
data: &'static [u8],
pos: usize,
should_loop: bool,
}
impl SoundChannel {
fn new(data: &'static [u8]) -> Self {
SoundChannel { data, pos: 0 }
fn new(data: &'static [u8], should_loop: bool) -> Self {
SoundChannel {
data,
pos: 0,
should_loop,
}
}
}