Commit fc6354dd authored by Anika Treffehn's avatar Anika Treffehn
Browse files

added additional step after decoding to set planar channels to zero

parent cae86535
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ def combine(
    in_filenames: list,
    out_file: str,
    in_fs: Optional[int] = 48000,
    is_planar: Optional[bool] = False,
) -> None:
    """
    Combines audio files into one multi-channel file
@@ -327,6 +328,10 @@ def combine(
                y = y[: x.shape[0], :]
            y = np.column_stack([y, x])

    # set vertical channels to zero
    if is_planar:
        y[:, VERT_HOA_CHANNELS_ACN[VERT_HOA_CHANNELS_ACN < len(in_filenames)]] = 0

    write(out_file, y, fs=in_fs)


+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ class EVS(Processing):

        # combine the decoded channels into the output file
        if out_file.suffix in [".wav", ".pcm"]:
            combine(split_chan_out, out_file, in_fs=self.out_fs)
            combine(split_chan_out, out_file, in_fs=self.out_fs, is_planar=is_planar)
            # copy ISM metadata for ISM pass-through
            if in_meta:
                for idx in range(len(in_meta)):