return true/false based on if playback was actually started or not
This commit is contained in:
parent
b4e641ed41
commit
06d3d927fe
|
@ -112,11 +112,14 @@ impl AudioChannel {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn play(&mut self, loops: bool) {
|
||||
pub fn play(&mut self, loops: bool) -> bool {
|
||||
if self.is_playable() {
|
||||
self.position = 0;
|
||||
self.playing = true;
|
||||
self.loops = loops;
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue