Commit c3754943 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

cleanup

parent 379c69a6
Loading
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Tuple, Optional
from os import path
# from filelock import FileLock

import numpy as np
import pytest
@@ -63,8 +62,6 @@ from ..conftest import parse_properties
sys.path.append(SCRIPTS_DIR)
from pyaudio3dtools.audiofile import readfile, writefile

# file_lock = FileLock("tmp_truncate_signal_token.lock")

def lc3plus_used(test_info, in_fmt, render_config):
    return (
        # LC3plus used explicitly
@@ -150,28 +147,6 @@ def check_xfail(
            "unsupported framing: LCLD codec doesn't support aggregation. Pre-renderer (ISAR) frame size must match LCLD frame size."
        )


# def truncate_signal(
    # in_file: Path,
    # out_file: Path,
# ) -> None:
    # """
    # Truncate the signal in in_file to maximum INPUT_DURATION_SEC seconds,
    # and write the truncated signal to out_file
    # """
    
    # data, fs = readfile(in_file)

    # if data.ndim == 1:
        # data_out = data[: INPUT_DURATION_SEC * fs]
    # elif data.ndim == 2:
        # data_out = data[: INPUT_DURATION_SEC * fs, :]
    # else:
        # raise ValueError(f"Cannot truncate data with dimension of {data.ndim}")

    # writefile(out_file, data_out, fs)


def run_full_chain_split_rendering(
    record_property,
    props_to_record,
@@ -250,10 +225,6 @@ def run_full_chain_split_rendering(
        if test_info.config.option.create_ref or test_info.config.option.create_cut:
            in_file = FORMAT_TO_FILE_COMPARETEST[in_fmt]
            cut_in_file = in_file.with_stem(in_file.stem + "_cut")
            # with file_lock:
                # if not path.exists(cut_in_file):
                    # truncate_signal(in_file, cut_in_file)

            enc_cmd[3] = str(cut_in_file)
        else:
            enc_cmd[3] = str(FORMAT_TO_FILE_SMOKETEST[in_fmt])
@@ -429,10 +400,6 @@ def run_external_split_rendering(
        if test_info.config.option.create_ref or test_info.config.option.create_cut:
            in_file = FORMAT_TO_FILE_COMPARETEST[in_fmt]
            cut_in_file = in_file.with_stem(in_file.stem + "_cut")
            # with file_lock:
                # if not path.exists(cut_in_file):
                    # truncate_signal(in_file, cut_in_file)

            split_pre_cmd[6] = str(cut_in_file)
        else:
            split_pre_cmd[6] = str(FORMAT_TO_FILE_SMOKETEST[in_fmt])