diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 9a149bd7eac471391e70d507a8dbdd7b3d35f1b8..9942c3a175f7a68e2fbd7b46a2e4a49451a3a281 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -422,12 +422,15 @@ def binauralize_input_and_output( if not extended_md_used and n_obj > 0: truncated_meta_files = [] for md in in_meta_files: - md_out_file = str(tmp_dir.joinpath(os.path.basename(md))) - with open(md_out_file, "w") as fp_out, open(md, "r") as fp_in: - for line in fp_in: - fp_out.write( - ",".join(line.split(",")[:2]) + "\n" - ) # Keep only first two elements: azim, elev + if md != "NULL": + md_out_file = str(tmp_dir.joinpath(os.path.basename(md))) + with open(md_out_file, "w") as fp_out, open(md, "r") as fp_in: + for line in fp_in: + fp_out.write( + ",".join(line.split(",")[:2]) + "\n" + ) # Keep only first two elements: azim, elev + else: + md_out_file = "NULL" # Cannot truncate NULL, just insert it without modification truncated_meta_files.append(md_out_file) in_meta_files = truncated_meta_files @@ -456,6 +459,8 @@ def binauralize_input_and_output( in_fmt = "META" if "OSBA" in output_config or "OMASA" in output_config: + if "OSBA" in output_config: + output_config = output_config[:-1] + '3' # Temporary fix to handle than IVAS_dec produces HOA3 for all OSBA configs. Needs to be removed when this fix is ported to BASOP. scene_description_file( output_config, scene_out, n_obj, dut_output_file, out_meta_files )