Commit 3e71a499 authored by hsd's avatar hsd
Browse files

[add] ism reference vector test condition

parent d8efbebb
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -290,6 +290,33 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file):
            in_meta_files=in_meta_files,
        )

# This test compares rendering with:
#   ref: a head rotation trajectory with elevation (OTR=NONE)
#   cut: a static head rotation and a reference position trajectory which moves
#        in a way that produces the same acoustic output as the ref head rot trajectory (OTR=REF_VEC)
@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL)
@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM)
def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt):
    try:
        in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt]
    except:
        in_meta_files = None

    compare_renderer_args(
        test_info,
        in_fmt,
        out_fmt,
        ref_kwargs={
            "name_extension": "refvec_rotating",
            "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"),
            "in_meta_files": in_meta_files
        },
        cut_kwargs={
            "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"),
            "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv"),
            "in_meta_files": in_meta_files
        }
    )

""" MASA """