Commit 84993100 authored by norvell's avatar norvell
Browse files

Merge with main

parents 203c5f75 072d8305
Loading
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -41,10 +41,19 @@ import numpy as np
import pytest

from .compare_audio import compare_audio_arrays
from .constants import *
from .constants import (
    SCRIPTS_DIR,
    OUTPUT_PATH_REF,
    OUTPUT_PATH_CUT,
    FORMAT_TO_FILE_COMPARETEST,
    FORMAT_TO_FILE_SMOKETEST,
    RENDERER_CMD,
    BIN_SUFFIX_MERGETARGET,
)

sys.path.append(SCRIPTS_DIR)
from pyaudio3dtools.audiofile import readfile
from .. import cmp_pcm


# fixture returns test information, enabling per-testcase SNR
@@ -105,7 +114,7 @@ def check_BE(
    cut: np.ndarray,
    cut_fs: int,
    xfail: bool = False,
    atol: int = 2
    atol: int = 2,
):
    if ref is None or np.array_equal(ref, np.zeros_like(ref)):
        pytest.fail("REF signal does not exist or is zero!")
@@ -152,6 +161,7 @@ def run_renderer(
    hrtf_file: Optional[str] = None,
    get_mld=False,
    mld_lim=0,
    get_mld_lim=0,
) -> str:
    # prepare arguments and filepaths
    if trj_file is not None:
@@ -273,6 +283,8 @@ def run_renderer(
        out_file_ref = str(OUTPUT_PATH_REF.joinpath(out_file_stem))

        if get_mld:
            # see constants.py
            ref_fs = cmd[10]
            output_differs, reason = cmp_pcm(
                out_file,
                out_file_ref,