simplified noise cancellation, add "Amplify outside recordings" to radio

This commit is contained in:
yuni 2024-09-14 23:43:21 +02:00
parent 5c477286f5
commit 8309e32f85

View file

@ -174,15 +174,14 @@ impl Default for Settings {
noise_cancellation_mode: 0,
noise_cancellation_modes: vec![
"Off".to_string(),
"Ambience".to_string(),
"Mechanical".to_string(),
"Max".to_string(),
"On".to_string(),
],
radio_mode: 1,
radio_modes: vec![
// see also: settings.is_radio_playing()
"Off".to_string(),
"Cinematic Frequency".to_string(),
"Amplify outside recordings".to_string(),
],
volume_sfx: 100,
volume_music: 100,
@ -336,10 +335,9 @@ impl Settings {
pub fn is_radio_playing(&self, sfx: audio::Sfx) -> Option<bool> {
let radio = self.radio_mode;
let ambience = self.noise_cancellation_mode != 1 && self.noise_cancellation_mode != 3;
match sfx {
audio::Sfx::BGM => Some(radio == 1),
audio::Sfx::BGMActualJupiterRecording => Some(radio == 0 && ambience),
audio::Sfx::BGMActualJupiterRecording => Some(radio == 2),
_ => None,
}
}
@ -352,7 +350,7 @@ impl Settings {
value
};
self.noise_cancellation_mode = value;
self.mute_sfx = value >= 2;
self.mute_sfx = value >= 1;
}
}