return true/false based on if playback was actually started or not

This commit is contained in:
Gered 2022-07-10 12:54:49 -04:00
parent b4e641ed41
commit 06d3d927fe

View file

@ -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
}
}