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

Merge branch '24-sba_fmt-planarfoa-is-evaluated-as-full-foa' into 'main'

Resolve "sba_fmt "PLANARFOA" is evaluated as full FOA"

See merge request !64
parents 205e9b0b fc6354dd
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)


+2 −0
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@ def render_sba_to_sba(

    if sba_out.is_planar:
        zero_vert_channels(sba_out)
    elif sba_in.is_planar:
        sba_out.audio = sba_in.audio


def rotate_sba(
+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)):