Skip to content

Commit

Permalink
fix: missed some sounds when stoping sound playback (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
shixinhuang99 committed Jul 21, 2024
1 parent 0019767 commit 449cefc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/global/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ impl Audio {
}

pub fn stop_all(&self) {
if let Some(inner) = &self.inner {
inner.music_sink.stop();
inner.short_sound_sink.stop();
}
self.stop_music();
self.stop_sound();
}

pub fn stop_sound(&self) {
if let Some(inner) = &self.inner {
inner.short_sound_sink.stop();
inner.line_clear_sound_sink.stop();
inner.game_over_sound_sink.stop();
}
}

Expand Down

0 comments on commit 449cefc

Please sign in to comment.