Loading tests/renderer/test_renderer.py +25 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,31 @@ def test_ambisonics_binaural_headrotation( ) @pytest.mark.create_ref @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("aeid", ["1", "0:1000,2:500,1:500"]) def test_dynamic_acoustic_environment( record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim, aeid ): rend_config_path = TESTV_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") run_renderer( record_property, test_info, in_fmt, out_fmt, binary_suffix=EXE_SUFFIX, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, config_file=rend_config_path, aeid=aeid, ) """ Multichannel """ Loading tests/renderer/utils.py +10 −1 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ def run_renderer( hrtf_file: Optional[str] = None, get_mld=False, mld_lim=0, aeid: Optional[str] = None, ) -> str: # prepare arguments and filepaths if trj_file is not None: Loading Loading @@ -149,6 +150,11 @@ def run_renderer( else: framing_name = "" if aeid is not None: aeid_name = f"_{aeid.replace(',', "_").replace(':', "_")}" else: aeid_name = "" if not isinstance(out_fmt, str): out_name = f"{out_fmt.stem}" else: Loading Loading @@ -180,7 +186,7 @@ def run_renderer( in_file = FORMAT_TO_FILE[in_fmt] in_name = in_fmt out_file_stem = f"{in_name}_to_{out_name}{trj_name}{non_diegetic_pan}{refrot_name}{refvec_name}{refveclev_name}{config_name}{framing_name}{hrtf_file_name}{name_extension}.wav" out_file_stem = f"{in_name}_to_{out_name}{trj_name}{non_diegetic_pan}{refrot_name}{refvec_name}{refveclev_name}{config_name}{framing_name}{hrtf_file_name}{name_extension}{aeid_name}.wav" out_file = str(output_path_base.joinpath(out_file_stem)) Loading Loading @@ -223,6 +229,9 @@ def run_renderer( if frame_size: cmd.extend(["-fr", str(frame_size.replace("ms", ""))]) if aeid is not None: cmd.extend(["-aeid", str(aeid)]) # Set env variables for UBSAN env = os.environ.copy() if test_info.node.name and "UBSAN_OPTIONS" in env.keys(): Loading Loading
tests/renderer/test_renderer.py +25 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,31 @@ def test_ambisonics_binaural_headrotation( ) @pytest.mark.create_ref @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("frame_size", FRAMING_TO_TEST) @pytest.mark.parametrize("aeid", ["1", "0:1000,2:500,1:500"]) def test_dynamic_acoustic_environment( record_property, test_info, in_fmt, out_fmt, frame_size, get_mld, get_mld_lim, aeid ): rend_config_path = TESTV_DIR.joinpath(f"rend_config_combined.cfg") rend_config_path.with_stem(f"rend_config") run_renderer( record_property, test_info, in_fmt, out_fmt, binary_suffix=EXE_SUFFIX, frame_size=frame_size, get_mld=get_mld, mld_lim=get_mld_lim, config_file=rend_config_path, aeid=aeid, ) """ Multichannel """ Loading
tests/renderer/utils.py +10 −1 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ def run_renderer( hrtf_file: Optional[str] = None, get_mld=False, mld_lim=0, aeid: Optional[str] = None, ) -> str: # prepare arguments and filepaths if trj_file is not None: Loading Loading @@ -149,6 +150,11 @@ def run_renderer( else: framing_name = "" if aeid is not None: aeid_name = f"_{aeid.replace(',', "_").replace(':', "_")}" else: aeid_name = "" if not isinstance(out_fmt, str): out_name = f"{out_fmt.stem}" else: Loading Loading @@ -180,7 +186,7 @@ def run_renderer( in_file = FORMAT_TO_FILE[in_fmt] in_name = in_fmt out_file_stem = f"{in_name}_to_{out_name}{trj_name}{non_diegetic_pan}{refrot_name}{refvec_name}{refveclev_name}{config_name}{framing_name}{hrtf_file_name}{name_extension}.wav" out_file_stem = f"{in_name}_to_{out_name}{trj_name}{non_diegetic_pan}{refrot_name}{refvec_name}{refveclev_name}{config_name}{framing_name}{hrtf_file_name}{name_extension}{aeid_name}.wav" out_file = str(output_path_base.joinpath(out_file_stem)) Loading Loading @@ -223,6 +229,9 @@ def run_renderer( if frame_size: cmd.extend(["-fr", str(frame_size.replace("ms", ""))]) if aeid is not None: cmd.extend(["-aeid", str(aeid)]) # Set env variables for UBSAN env = os.environ.copy() if test_info.node.name and "UBSAN_OPTIONS" in env.keys(): Loading