Commit dab9888f authored by norvell's avatar norvell
Browse files

Merge branch 'ci/fix-peaq-binaural-3' into 'main'

[BASOP CI]Fix for rendering tests with PEAQ

See merge request !1963
parents 4a499d0d ecfb61a0
Loading
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -327,9 +327,18 @@ def run_renderer(
            if out_fmt not in PEAQ_SUPPORTED_FMT:
                    if in_fmt in PEAQ_SUPPORTED_FMT:
                        new_fmt = in_fmt # MONO or STEREO
                    else:
                        # If input is META which contains stereo, new_fmt needs to be STEREO.
                        if in_fmt == "META":
                            with open(in_file,"r") as scene:
                                if "STEREO" in scene.read():
                                    new_fmt = "STEREO"
                                else:
                                    new_fmt = "BINAURAL"
                        else:
                            new_fmt = "BINAURAL"
                    # Render test to BINAURAL

                    # Render test to PEAQ supported format (MONO, STEREO or BINAURAL)
                    cmd2 = RENDERER_CMD[:]
                    cmd2[2] = str(out_file)  # in_file
                    cmd2[4] = str(out_fmt)   # in_fmt
@@ -338,6 +347,8 @@ def run_renderer(
                    cmd2[10] = str(sr)
                    cmd2[0] += BIN_SUFFIX_MERGETARGET # Use IVAS_rend_ref for re-rendering
                    cmd2[0] += binary_suffix
                    if "MASA" in out_fmt:
                        cmd2.extend(["-im", out_file + ".met"])
                    run_cmd(cmd2, env)

                    # Render ref to BINAURAL with same settings as test