mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-10-31 19:44:20 +00:00
stopping fix
This commit is contained in:
parent
510439d9ec
commit
69ef0f5791
|
@ -1,8 +1,7 @@
|
|||
use std::sync::{mpsc, RwLock};
|
||||
use std::sync::mpsc;
|
||||
use std::sync::mpsc::{Receiver, Sender};
|
||||
|
||||
use bitflags::_core::time::Duration;
|
||||
use cpal::Sample;
|
||||
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
|
||||
|
||||
use crate::engine_constants::EngineConstants;
|
||||
|
@ -25,7 +24,7 @@ pub struct SoundManager {
|
|||
current_song_id: usize,
|
||||
}
|
||||
|
||||
static SONGS: [&'static str; 42] = [
|
||||
static SONGS: [&str; 42] = [
|
||||
"XXXX",
|
||||
"WANPAKU",
|
||||
"ANZEN",
|
||||
|
@ -175,6 +174,9 @@ fn run<T>(rx: Receiver<PlaybackMessage>, bank: SoundBank,
|
|||
|
||||
state = PlaybackState::Playing;
|
||||
}
|
||||
Ok(PlaybackMessage::Stop) => {
|
||||
state = PlaybackState::Stopped;
|
||||
}
|
||||
Ok(PlaybackMessage::SaveState) => {
|
||||
saved_state = Some(engine.get_state());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue