Add the 4.0 Surround and 4.0 Quad speaker layouts
This commit is contained in:
1 parent
a1853f2dc5
commit
8c96f7ac91
6 files changed
+109
-6
No files matched your search
@@ -517,6 +517,16 @@ def render(index, bed_path, frame_count, raw_path, gain, progress_every,
|
||||
return dsp_seconds, backend_info, breakdown
|
||||
|
||||
|
||||
def _layout_choice(value: str) -> str:
|
||||
"""Canonical layout name for a --speaker-layout value.
|
||||
|
||||
Legacy spellings resolve here rather than being listed as choices, so "4.0"
|
||||
still means the layout that name has always meant while the help text shows
|
||||
the two 4.0 layouts by their own names.
|
||||
"""
|
||||
return speaker_layout_display_name(get_speaker_layout(value))
|
||||
|
||||
|
||||
def build_parser():
|
||||
parser = argparse.ArgumentParser(
|
||||
description=("JustOneCacophony (JOC):E-AC-3 JOC → 25ch ADM BWF、"
|
||||
@@ -528,8 +538,9 @@ def build_parser():
|
||||
parser.add_argument("--binaural-output", type=Path,
|
||||
help="双耳 WAV 路径;仅与 --binaural 一起使用")
|
||||
direct_mode = parser.add_mutually_exclusive_group()
|
||||
direct_mode.add_argument("--speaker-layout", choices=SPEAKER_LAYOUT_CHOICES,
|
||||
help="直接扬声器渲染布局,例如 2.0、5.1、7.1.2")
|
||||
direct_mode.add_argument("--speaker-layout", type=_layout_choice,
|
||||
choices=SPEAKER_LAYOUT_CHOICES,
|
||||
help="直接扬声器渲染布局,例如 2.0、4.0 Quad、5.1、7.1.2")
|
||||
direct_mode.add_argument("--binaural", action="store_true",
|
||||
help="直接 SOFA 双耳渲染;不生成临时 ADM BWF")
|
||||
parser.add_argument("--speaker-format", choices=("float32", "int24"), default="float32",
|
||||
|
||||
Reference in new issue
Block a user