diff --git a/src/sample_lib.rs b/src/sample_lib.rs index 6ecdbdb..77c40ae 100644 --- a/src/sample_lib.rs +++ b/src/sample_lib.rs @@ -64,7 +64,7 @@ impl SampleLibrary { hound::SampleFormat::Int => { for s in rd.samples::().step_by(channels) { let s = s?; - let s = s as f32 / (i16::MAX as f32); + let s = s as f32 / (0x8000 as f32); v.push(s); } }, diff --git a/tests/node_sampl.rs b/tests/node_sampl.rs index c8126a9..4393164 100644 --- a/tests/node_sampl.rs +++ b/tests/node_sampl.rs @@ -220,7 +220,7 @@ fn check_node_sampl_reload() { &mut matrix, "check_matrix_serialize.hxy").unwrap(); let rmsmima = run_and_get_l_rms_mimax(&mut node_exec, 50.0); - assert_rmsmima!(rmsmima, (0.5004, -0.9998, 0.9997)); + assert_rmsmima!(rmsmima, (0.5004, -0.9997, 0.9997)); let fft = run_and_get_fft4096(&mut node_exec, 800, 20.0); assert_eq!(fft[0], (441, 1023));