Loading tests/test_be_ambi_converter_fixed_to_float.py +3 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ INPUT_FILES = [TESTV_DIR / "stv3OA48c.wav"] CONVENTIONS = [c.value for c in AMBI_CONVENTION] AMBI_CONVERTER_PATH_FLOAT = HERE.parent / "ambi_converter_flt" AMBI_CONVERTER_PATH_FIXED = HERE.parent / "ambi_converter_fx" THRESHOLD_FAIL = 2 @pytest.mark.parametrize("infile", INPUT_FILES) Loading @@ -63,7 +64,7 @@ def test_ambi_converter( convention_out != AMBI_CONVENTION.ACN_SN3D and convention_in != AMBI_CONVENTION.ACN_SN3D ): pytest.skip("One of in and out convention needs to be ACN_SN3D") pytest.xfail("One of in and out convention needs to be ACN_SN3D") with TemporaryDirectory() as tmp_dir: outfile_base = Path(tmp_dir) / ( Loading Loading @@ -93,7 +94,7 @@ def test_ambi_converter( s_fx, _ = audiofile.readfile(outfile_fx) cmp_result = audioarray.compare(s_flt, s_fx, fs=48000, per_frame=False) if not cmp_result["bitexact"]: if abs(cmp_result["max_abs_diff"]) > THRESHOLD_FAIL: pytest.fail( f"Difference between float and fixed ambi_converter output found! Max abs diff: {cmp_result['max_abs_diff']}" ) Loading
tests/test_be_ambi_converter_fixed_to_float.py +3 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ INPUT_FILES = [TESTV_DIR / "stv3OA48c.wav"] CONVENTIONS = [c.value for c in AMBI_CONVENTION] AMBI_CONVERTER_PATH_FLOAT = HERE.parent / "ambi_converter_flt" AMBI_CONVERTER_PATH_FIXED = HERE.parent / "ambi_converter_fx" THRESHOLD_FAIL = 2 @pytest.mark.parametrize("infile", INPUT_FILES) Loading @@ -63,7 +64,7 @@ def test_ambi_converter( convention_out != AMBI_CONVENTION.ACN_SN3D and convention_in != AMBI_CONVENTION.ACN_SN3D ): pytest.skip("One of in and out convention needs to be ACN_SN3D") pytest.xfail("One of in and out convention needs to be ACN_SN3D") with TemporaryDirectory() as tmp_dir: outfile_base = Path(tmp_dir) / ( Loading Loading @@ -93,7 +94,7 @@ def test_ambi_converter( s_fx, _ = audiofile.readfile(outfile_fx) cmp_result = audioarray.compare(s_flt, s_fx, fs=48000, per_frame=False) if not cmp_result["bitexact"]: if abs(cmp_result["max_abs_diff"]) > THRESHOLD_FAIL: pytest.fail( f"Difference between float and fixed ambi_converter output found! Max abs diff: {cmp_result['max_abs_diff']}" )