Commit df05117f authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] multiple processes overwrite the same file for ivas_combined conditions;...

[fix] multiple processes overwrite the same file for ivas_combined conditions; files were written to wrong location
parent a6d90601
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -137,15 +137,15 @@ class IVASCombined(Processing):
        logger.debug(f"IVAS {in_file.absolute()} -> {out_file.absolute()}")

        # split into objects and spatial files
        in_file_objects = in_file.with_suffix(f".objects{in_file.suffix}")
        in_file_spatial = in_file.with_suffix(f".spatial{in_file.suffix}")
        in_file_objects = out_file.with_suffix(f".objects{in_file.suffix}")
        in_file_spatial = out_file.with_suffix(f".spatial{in_file.suffix}")

        in_audio, fs = read(in_file)
        write(in_file_objects, in_audio[:, : self.in_fmt.num_ism_channels], fs)
        write(in_file_spatial, in_audio[:, self.in_fmt.num_ism_channels :], fs)

        out_file_objects = out_file.with_suffix(f".objects{out_file.suffix}")
        out_file_spatial = out_file.with_suffix(f".spatial{out_file.suffix}")
        out_file_objects = out_file.with_suffix(f".objects.ivas{out_file.suffix}")
        out_file_spatial = out_file.with_suffix(f".spatial.ivas{out_file.suffix}")

        in_meta_objects = in_meta[: self.in_fmt.num_ism_channels]
        in_meta_spatial = in_meta[self.in_fmt.num_ism_channels :]