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]
|
#[inline]
|
||||||
pub fn play(&mut self, loops: bool) {
|
pub fn play(&mut self, loops: bool) -> bool {
|
||||||
if self.is_playable() {
|
if self.is_playable() {
|
||||||
self.position = 0;
|
self.position = 0;
|
||||||
self.playing = true;
|
self.playing = true;
|
||||||
self.loops = loops;
|
self.loops = loops;
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue