Commit 382cef4a authored by Jan Kiene's avatar Jan Kiene
Browse files

enable odg calculation for renderer tests

parent 14650f18
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ def test_ambisonics(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -88,6 +89,7 @@ def test_ambisonics(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -105,6 +107,7 @@ def test_ambisonics_binaural_static(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -117,6 +120,7 @@ def test_ambisonics_binaural_static(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -136,6 +140,7 @@ def test_ambisonics_binaural_headrotation(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -149,6 +154,7 @@ def test_ambisonics_binaural_headrotation(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -184,6 +190,7 @@ def test_dynamic_acoustic_environment(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        config_file=rend_config_path,
        aeid=aeid,
    )
@@ -204,6 +211,7 @@ def test_dynamic_acoustic_environment_file(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg")
    rend_config_path.with_stem(f"rend_config")
@@ -221,6 +229,7 @@ def test_dynamic_acoustic_environment_file(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
        config_file=rend_config_path,
        aeid=aeid,
    )
@@ -243,6 +252,7 @@ def test_multichannel(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -255,6 +265,7 @@ def test_multichannel(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -272,6 +283,7 @@ def test_multichannel_binaural_static(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")
@@ -287,6 +299,7 @@ def test_multichannel_binaural_static(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -306,6 +319,7 @@ def test_multichannel_binaural_headrotation(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    if in_fmt in ["MONO", "STEREO"]:
        pytest.skip("MONO or STEREO to Binaural rendering unsupported")
@@ -322,6 +336,7 @@ def test_multichannel_binaural_headrotation(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -342,6 +357,7 @@ def test_ism(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -355,6 +371,7 @@ def test_ism(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -372,6 +389,7 @@ def test_ism_binaural_static(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    try:
        in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt]
@@ -390,6 +408,7 @@ def test_ism_binaural_static(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -409,6 +428,7 @@ def test_ism_binaural_headrotation(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    try:
        in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt]
@@ -428,6 +448,7 @@ def test_ism_binaural_headrotation(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -448,6 +469,7 @@ def test_masa(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -461,6 +483,7 @@ def test_masa(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -478,6 +501,7 @@ def test_masa_binaural_static(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]:
        pytest.skip("Skipping binaural room outputs for MASA as unimplemented.")
@@ -494,6 +518,7 @@ def test_masa_binaural_static(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -513,6 +538,7 @@ def test_masa_binaural_headrotation(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]:
        pytest.skip("Skipping binaural room outputs for MASA as unimplemented.")
@@ -530,6 +556,7 @@ def test_masa_binaural_headrotation(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -543,6 +570,7 @@ def test_masa_prerend(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -555,6 +583,7 @@ def test_masa_prerend(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -575,6 +604,7 @@ def test_custom_ls_input(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -587,6 +617,7 @@ def test_custom_ls_input(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -602,6 +633,7 @@ def test_custom_ls_output(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -613,6 +645,7 @@ def test_custom_ls_output(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -628,6 +661,7 @@ def test_custom_ls_input_output(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -639,6 +673,7 @@ def test_custom_ls_input_output(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -656,6 +691,7 @@ def test_custom_ls_input_binaural(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -668,6 +704,7 @@ def test_custom_ls_input_binaural(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -687,6 +724,7 @@ def test_custom_ls_input_binaural_headrotation(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -700,6 +738,7 @@ def test_custom_ls_input_binaural_headrotation(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -720,6 +759,7 @@ def test_metadata(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -733,6 +773,7 @@ def test_metadata(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -753,6 +794,7 @@ def test_non_diegetic_pan_static(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -765,6 +807,7 @@ def test_non_diegetic_pan_static(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


@@ -782,6 +825,7 @@ def test_non_diegetic_pan_ism_static(
    get_mld,
    get_mld_lim,
    get_ssnr,
    get_odg,
):
    run_renderer(
        record_property,
@@ -794,6 +838,7 @@ def test_non_diegetic_pan_ism_static(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        get_ssnr=get_ssnr,
        get_odg=get_odg,
    )


+2 −0
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ def run_renderer(
    get_mld_lim=0,
    abs_tol=0,
    get_ssnr=False,
    get_odg=False,
    aeid: Optional[Union[Path, int]] = None,
) -> str:
    # prepare arguments and filepaths
@@ -315,6 +316,7 @@ def run_renderer(
            mld_lim=get_mld_lim,
            abs_tol=abs_tol,
            get_ssnr=get_ssnr,
            get_odg=get_ssnr,
        )

        props = parse_properties(reason, output_differs, props_to_record)