Loading tests/codec_be_on_mr_nonselection/test_param_file.py +10 −4 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import re import platform from pathlib import Path from subprocess import run import tempfile import pytest from tests.cmp_pcm import cmp_pcm Loading Loading @@ -173,7 +173,7 @@ def test_param_file_tests( and Path(testv_file).name.startswith("stv") ): sba_br_switching_dtx = 1 cut_file = pre_proc_input(testv_file, fs) cut_file, cut_file_pre_exist = pre_proc_input(testv_file, fs) testv_file = cut_file # bitrate can be a filename: remove leading "../" Loading Loading @@ -204,7 +204,7 @@ def test_param_file_tests( ) if sba_br_switching_dtx == 1 and not keep_files: is_exist = os.path.exists(cut_file) if is_exist: if is_exist and cut_file_pre_exist == 0: os.remove(cut_file) # check for networkSimulator_g192 command line Loading Loading @@ -462,8 +462,14 @@ def pre_proc_input(testv_file, fs): elif "stv3OA" in testv_file: num_channel = "16" cut_file = testv_file.replace(".wav", num_channel + "chn_" + cut_gain + ".wav") cut_file_pre_exist = 1; if not os.path.exists(cut_file): tmpf = tempfile.TemporaryFile() cut_file = tmpf.name + num_channel + "chn_" + cut_gain + ".wav" cut_file_pre_exist = 0; cut_samples(testv_file, cut_file, num_channel, cut_from, cut_len, cut_gain) return cut_file return cut_file, cut_file_pre_exist def simulate( Loading tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +8 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ __doc__ = """ import errno import os import re import tempfile import pytest from cut_bs import cut_from_start Loading Loading @@ -586,6 +587,13 @@ def sba_enc( else: cut_file = f"{test_vector_path}/{tag_in}_cut_{cut_gain}{in_extension}" if not os.path.exists(cut_file): tmpf = tempfile.TemporaryFile() cut_file = tmpf.name if cut_gain == "1.0": cut_file += f"{tag_in}_cut{in_extension}" else: cut_file += f"{tag_in}_cut_{cut_gain}{in_extension}" cut_samples( input_path, cut_file, Loading Loading
tests/codec_be_on_mr_nonselection/test_param_file.py +10 −4 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import re import platform from pathlib import Path from subprocess import run import tempfile import pytest from tests.cmp_pcm import cmp_pcm Loading Loading @@ -173,7 +173,7 @@ def test_param_file_tests( and Path(testv_file).name.startswith("stv") ): sba_br_switching_dtx = 1 cut_file = pre_proc_input(testv_file, fs) cut_file, cut_file_pre_exist = pre_proc_input(testv_file, fs) testv_file = cut_file # bitrate can be a filename: remove leading "../" Loading Loading @@ -204,7 +204,7 @@ def test_param_file_tests( ) if sba_br_switching_dtx == 1 and not keep_files: is_exist = os.path.exists(cut_file) if is_exist: if is_exist and cut_file_pre_exist == 0: os.remove(cut_file) # check for networkSimulator_g192 command line Loading Loading @@ -462,8 +462,14 @@ def pre_proc_input(testv_file, fs): elif "stv3OA" in testv_file: num_channel = "16" cut_file = testv_file.replace(".wav", num_channel + "chn_" + cut_gain + ".wav") cut_file_pre_exist = 1; if not os.path.exists(cut_file): tmpf = tempfile.TemporaryFile() cut_file = tmpf.name + num_channel + "chn_" + cut_gain + ".wav" cut_file_pre_exist = 0; cut_samples(testv_file, cut_file, num_channel, cut_from, cut_len, cut_gain) return cut_file return cut_file, cut_file_pre_exist def simulate( Loading
tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +8 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ __doc__ = """ import errno import os import re import tempfile import pytest from cut_bs import cut_from_start Loading Loading @@ -586,6 +587,13 @@ def sba_enc( else: cut_file = f"{test_vector_path}/{tag_in}_cut_{cut_gain}{in_extension}" if not os.path.exists(cut_file): tmpf = tempfile.TemporaryFile() cut_file = tmpf.name if cut_gain == "1.0": cut_file += f"{tag_in}_cut{in_extension}" else: cut_file += f"{tag_in}_cut_{cut_gain}{in_extension}" cut_samples( input_path, cut_file, Loading