Loading tests/test_param_file.py +30 −22 Original line number Diff line number Diff line Loading @@ -154,7 +154,11 @@ def test_param_file_tests( bitrate = enc_split.pop() sba_br_switching_dtx = 0 if bitrate.startswith("../") and "-dtx" in enc_opts.split() and "-sba" in enc_opts.split(): if ( not bitrate.isdigit() and "-dtx" in enc_opts.split() and "-sba" in enc_opts.split() ): sba_br_switching_dtx = 1 cut_file = pre_proc_input(testv_file, fs) testv_file = cut_file Loading Loading @@ -185,8 +189,8 @@ def test_param_file_tests( update_ref, ) if sba_br_switching_dtx == 1: isExist = os.path.exists(cut_file) if isExist: is_exist = os.path.exists(cut_file) if is_exist: os.remove(cut_file) # check for networkSimulator_g192 command line if sim_opts != "": Loading Loading @@ -345,19 +349,23 @@ def encode( add_option_list=enc_opts_list, ) def pre_proc_input(testv_file, fs): CUT_FROM = "0.0" CUT_LEN = "5.0" cut_from = "0.0" cut_len = "5.0" cut_gain = "0.004" if "stvFOA" in testv_file: num_channel = '4' num_channel = "4" elif "stv2OA" in testv_file: num_channel = '9' num_channel = "9" elif "stv3OA" in testv_file: num_channel = '16' num_channel = "16" cut_file = testv_file.replace(".pcm", num_channel + "chn_" + cut_gain + ".pcm") cut_samples(testv_file, cut_file, num_channel, fs + "000", CUT_FROM, CUT_LEN, cut_gain) return(cut_file) cut_samples( testv_file, cut_file, num_channel, fs + "000", cut_from, cut_len, cut_gain ) return cut_file def simulate( reference_path, Loading Loading
tests/test_param_file.py +30 −22 Original line number Diff line number Diff line Loading @@ -154,7 +154,11 @@ def test_param_file_tests( bitrate = enc_split.pop() sba_br_switching_dtx = 0 if bitrate.startswith("../") and "-dtx" in enc_opts.split() and "-sba" in enc_opts.split(): if ( not bitrate.isdigit() and "-dtx" in enc_opts.split() and "-sba" in enc_opts.split() ): sba_br_switching_dtx = 1 cut_file = pre_proc_input(testv_file, fs) testv_file = cut_file Loading Loading @@ -185,8 +189,8 @@ def test_param_file_tests( update_ref, ) if sba_br_switching_dtx == 1: isExist = os.path.exists(cut_file) if isExist: is_exist = os.path.exists(cut_file) if is_exist: os.remove(cut_file) # check for networkSimulator_g192 command line if sim_opts != "": Loading Loading @@ -345,19 +349,23 @@ def encode( add_option_list=enc_opts_list, ) def pre_proc_input(testv_file, fs): CUT_FROM = "0.0" CUT_LEN = "5.0" cut_from = "0.0" cut_len = "5.0" cut_gain = "0.004" if "stvFOA" in testv_file: num_channel = '4' num_channel = "4" elif "stv2OA" in testv_file: num_channel = '9' num_channel = "9" elif "stv3OA" in testv_file: num_channel = '16' num_channel = "16" cut_file = testv_file.replace(".pcm", num_channel + "chn_" + cut_gain + ".pcm") cut_samples(testv_file, cut_file, num_channel, fs + "000", CUT_FROM, CUT_LEN, cut_gain) return(cut_file) cut_samples( testv_file, cut_file, num_channel, fs + "000", cut_from, cut_len, cut_gain ) return cut_file def simulate( reference_path, Loading