Skip to content

Commit

Permalink
fix(taiko): demo start
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobLinCool committed May 2, 2024
1 parent 16dacd0 commit 751f814
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions taiko-game/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ impl App {
let path = self.music_path()?;

let demostart = self.song.clone().unwrap().header.demostart.unwrap_or(0.0) as f64;
let music =
StaticSoundData::from_file(path, StaticSoundSettings::new().loop_region(demostart..))?;
let settings = StaticSoundSettings::new()
.loop_region(demostart..)
.playback_region(demostart..);
let music = StaticSoundData::from_file(path, settings)?;
self.playing.replace(self.player.play(music)?);
self.player.resume(Tween::default())?;
Ok(())
Expand Down

0 comments on commit 751f814

Please sign in to comment.