Commit 1fb64ee0 authored by lefort's avatar lefort
Browse files

Corrected.

parent ca1bbf61
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ def test_sba_binaural_static(test_info, in_fmt, fs, out_fmt):
    #                 where Order specifies the Ambisionics order (1-3)

    bitrate = 256000
    option_list = ["sba", in_fmt]
    option_list = ["-sba", in_fmt]
    in_file = FORMAT_TO_FILE_SBA_WOEXT[in_fmt].format(fs)

    compare_rom_vs_binary(
+5 −6
Original line number Diff line number Diff line
@@ -196,19 +196,18 @@ def compare_rom_vs_binary(
    trj_file: Optional[str] = None
):
    option_str = "_".join(get_option_list_str(option_list_enc))
    bit_file_ext = f"_{option_str}_{bitrate}_{in_fs}"
    out_file_ext = bit_file_ext + f"-{out_fs}_{out_fmt}"
    file_ext = f"_{option_str}_{bitrate}_{in_fs}-{out_fs}_{out_fmt}"

    input_path = TESTV_DIR.joinpath(in_file).with_suffix(".wav")
    bitstream_path = BITSTREAM_DIR.joinpath(in_file + bit_file_ext)
    bitstream_path = BITSTREAM_DIR.joinpath(in_file + file_ext)
    run_encoder(bitrate, in_fs, input_path, bitstream_path, add_option_list=option_list_enc)
    
    if trj_file is not None:
        option_list_dec = ["-t", trj_file]
        out_file_ext += "_headrot"
        file_ext += "_headrot"
    else :
        option_list_dec = None
    out_rom_path = DEC_ROM_DIR.joinpath(in_file + out_file_ext).with_suffix(".wav")
    out_rom_path = DEC_ROM_DIR.joinpath(in_file + file_ext).with_suffix(".wav")
    run_decoder(out_fmt, out_fs, bitstream_path, out_rom_path, add_option_list=option_list_dec)
    out_rom, out_rom_fs = pyaudio3dtools.audiofile.readfile(out_rom_path)

@@ -217,7 +216,7 @@ def compare_rom_vs_binary(
        option_list_dec.extend(["-hrtf", str(HRTF_BINARY_DIR.joinpath(hrtf_file))])
    else :
        option_list_dec = ["-hrtf", str(HRTF_BINARY_DIR.joinpath(hrtf_file))]
    out_bin_path = DEC_BINARY_DIR.joinpath(in_file + out_file_ext).with_suffix(".wav")
    out_bin_path = DEC_BINARY_DIR.joinpath(in_file + file_ext).with_suffix(".wav")
    run_decoder(out_fmt, out_fs, bitstream_path, out_bin_path, add_option_list=option_list_dec)
    out_bin, out_bin_fs = pyaudio3dtools.audiofile.readfile(out_rom_path)