mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-01-08 12:07:33 +00:00
<rmu fix
This commit is contained in:
parent
4a91448067
commit
75a1b3f9f4
|
@ -403,6 +403,12 @@ enum PlaybackStateType {
|
||||||
Ogg(SavedOggPlaybackState),
|
Ogg(SavedOggPlaybackState),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for PlaybackStateType {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn run<T>(
|
fn run<T>(
|
||||||
rx: Receiver<PlaybackMessage>,
|
rx: Receiver<PlaybackMessage>,
|
||||||
bank: SoundBank,
|
bank: SoundBank,
|
||||||
|
@ -526,11 +532,12 @@ where
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Ok(PlaybackMessage::RestoreState) => {
|
Ok(PlaybackMessage::RestoreState) => {
|
||||||
let mut saved_state_loc = PlaybackStateType::None;
|
let saved_state_loc = std::mem::take(&mut saved_state);
|
||||||
std::mem::swap(&mut saved_state_loc, &mut saved_state);
|
|
||||||
|
|
||||||
match saved_state_loc {
|
match saved_state_loc {
|
||||||
PlaybackStateType::None => {}
|
PlaybackStateType::None => {
|
||||||
|
state = PlaybackState::Stopped;
|
||||||
|
}
|
||||||
PlaybackStateType::Organya(playback_state) => {
|
PlaybackStateType::Organya(playback_state) => {
|
||||||
org_engine.set_state(playback_state, &bank);
|
org_engine.set_state(playback_state, &bank);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue