Loading ivas_processing_scripts/audiotools/convert/scenebased.py +4 −4 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ def convert_scenebased( render_sba_to_sba(sba, out) # SBA -> MASA elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name == "FOA": # NOTE: only allowed for 1st order ambisonics ("FOA" + "PLANARFOA") elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name.endswith("FOA"): render_sba_to_masa(sba, out) else: Loading Loading @@ -176,7 +177,7 @@ def render_sba_to_sba( sba_out.audio = np.pad( sba_in.audio, [[0, 0], [0, sba_out.num_channels - sba_in.num_channels]] ) elif sba_out.ambi_order < sba_in.ambi_order: elif sba_out.ambi_order <= sba_in.ambi_order: sba_out.audio = sba_in.audio[:, : sba_out.num_channels] if sba_out.is_planar: Loading @@ -187,9 +188,8 @@ def render_sba_to_masa( sba_in: audio.SceneBasedAudio, masa_out: audio.MetadataAssistedSpatialAudio, ) -> None: assert sba_in.name == "FOA" # two dir only possible from HOA2 # two dir only possible from HOA2, which is not yet implemented as conversion num_dirs = 1 num_tcs = masa_out.audio.shape[1] md_out_path = masa_out.metadata_file Loading ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +2 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ def masaAnalyzer( if num_dirs not in [1, 2]: raise ValueError(f"Only 1 or 2 directions supported, but {num_dirs} was given.") if sba.name not in ["FOA", "HOA2"]: if sba.name not in [ "PLANARFOA", "FOA", "HOA2"]: raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") cmd = [ Loading Loading
ivas_processing_scripts/audiotools/convert/scenebased.py +4 −4 Original line number Diff line number Diff line Loading @@ -78,7 +78,8 @@ def convert_scenebased( render_sba_to_sba(sba, out) # SBA -> MASA elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name == "FOA": # NOTE: only allowed for 1st order ambisonics ("FOA" + "PLANARFOA") elif isinstance(out, audio.MetadataAssistedSpatialAudio) and sba.name.endswith("FOA"): render_sba_to_masa(sba, out) else: Loading Loading @@ -176,7 +177,7 @@ def render_sba_to_sba( sba_out.audio = np.pad( sba_in.audio, [[0, 0], [0, sba_out.num_channels - sba_in.num_channels]] ) elif sba_out.ambi_order < sba_in.ambi_order: elif sba_out.ambi_order <= sba_in.ambi_order: sba_out.audio = sba_in.audio[:, : sba_out.num_channels] if sba_out.is_planar: Loading @@ -187,9 +188,8 @@ def render_sba_to_masa( sba_in: audio.SceneBasedAudio, masa_out: audio.MetadataAssistedSpatialAudio, ) -> None: assert sba_in.name == "FOA" # two dir only possible from HOA2 # two dir only possible from HOA2, which is not yet implemented as conversion num_dirs = 1 num_tcs = masa_out.audio.shape[1] md_out_path = masa_out.metadata_file Loading
ivas_processing_scripts/audiotools/wrappers/masaAnalyzer.py +2 −2 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ def masaAnalyzer( if num_dirs not in [1, 2]: raise ValueError(f"Only 1 or 2 directions supported, but {num_dirs} was given.") if sba.name not in ["FOA", "HOA2"]: if sba.name not in [ "PLANARFOA", "FOA", "HOA2"]: raise ValueError(f"Only FOA or HOA2 suported, but {sba.name} was given.") cmd = [ Loading