Keep RTW profile for all octave resolutions
This commit is contained in:
+4
-8
@@ -368,7 +368,6 @@ fn normalize_rta_config(mut config: PhoenixRtaConfig) -> PhoenixRtaConfig {
|
||||
}
|
||||
if config.layout == "rtw" {
|
||||
config.engine = "iir".to_string();
|
||||
config.bpo = "1_3".to_string();
|
||||
config.order = 6;
|
||||
config.freq_range = "norm".to_string();
|
||||
}
|
||||
@@ -663,9 +662,6 @@ fn apply_global_to_rta(
|
||||
) -> PhoenixRtaConfig {
|
||||
config.fft_size = global.fft_size;
|
||||
config.bpo = global.rta_bpo_mode.clone();
|
||||
if config.bpo != "1_3" && config.layout == "rtw" {
|
||||
config.layout = "iec".to_string();
|
||||
}
|
||||
config.input_offset_db_l = global.input_offset_db_l;
|
||||
config.input_offset_db_r = global.input_offset_db_r;
|
||||
config.mono_input = global.mono_input;
|
||||
@@ -715,7 +711,7 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn rtw_profile_is_always_iir_third_octave() {
|
||||
fn rtw_profile_is_iir_and_retains_selected_resolution() {
|
||||
let config = normalize_rta_config(PhoenixRtaConfig {
|
||||
engine: "fft".to_string(),
|
||||
bpo: "1_12".to_string(),
|
||||
@@ -725,7 +721,7 @@ mod tests {
|
||||
..PhoenixRtaConfig::default()
|
||||
});
|
||||
assert_eq!(config.engine, "iir");
|
||||
assert_eq!(config.bpo, "1_3");
|
||||
assert_eq!(config.bpo, "1_12");
|
||||
assert_eq!(config.order, 6);
|
||||
assert_eq!(config.freq_range, "norm");
|
||||
}
|
||||
@@ -749,11 +745,11 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn non_third_octave_global_selection_leaves_locked_rtw_profile() {
|
||||
fn non_third_octave_global_selection_retains_rtw_profile() {
|
||||
let mut global = PhoenixGlobalConfig::default();
|
||||
global.rta_bpo_mode = "1_12".to_string();
|
||||
let config = apply_global_to_rta(PhoenixRtaConfig::default(), &global);
|
||||
assert_eq!(config.layout, "iec");
|
||||
assert_eq!(config.layout, "rtw");
|
||||
assert_eq!(config.bpo, "1_12");
|
||||
assert_eq!(config.engine, "iir");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user