From 02da369bb809dab4516f7cac56836db2f1c662f0 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 9 Jan 2025 19:57:10 +0100 Subject: [PATCH] Fix for PEAQ binaural --- tests/renderer/utils.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 9a149bd7ea..9942c3a175 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 ) -- GitLab