mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
Add ability to set that a channel should loop
This commit is contained in:
parent
773e893421
commit
86ba309377
|
@ -70,11 +70,21 @@ impl Mixer {
|
|||
pub struct SoundChannel {
|
||||
data: &'static [u8],
|
||||
pos: usize,
|
||||
should_loop: bool,
|
||||
}
|
||||
|
||||
impl SoundChannel {
|
||||
pub fn new(data: &'static [u8]) -> Self {
|
||||
SoundChannel { data, pos: 0 }
|
||||
SoundChannel {
|
||||
data,
|
||||
pos: 0,
|
||||
should_loop: false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn should_loop(mut self) -> Self {
|
||||
self.should_loop = true;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue