From 625b08075264bc446137ace86dfeaa95b13dfa3a Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Tue, 4 Jun 2024 17:13:03 +0200 Subject: [PATCH] Add opt-in for extended list of channel layouts --- src/misc/coders/settings/Audio.js | 73 +++++++++++++++++-------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/src/misc/coders/settings/Audio.js b/src/misc/coders/settings/Audio.js index 4e2da4f..2550e42 100644 --- a/src/misc/coders/settings/Audio.js +++ b/src/misc/coders/settings/Audio.js @@ -57,41 +57,48 @@ function Layout(props) { const options = [ { value: 'mono', label: 'mono' }, { value: 'stereo', label: 'stereo' }, - { value: '2.1', label: '2.1' }, - { value: '3.0', label: '3.0' }, - { value: '3.0(back)', label: '3.0 (back)' }, - { value: '4.0', label: '4.0' }, - { value: 'quad', label: 'quad' }, - { value: 'quad(side)', label: 'quad (side)' }, - { value: '3.1', label: '3.1' }, - { value: '5.0', label: '5.0' }, - { value: '5.0(side)', label: '5.0 (side)' }, - { value: '4.1', label: '4.1' }, - { value: '5.1', label: '5.1' }, - { value: '5.1(side)', label: '5.1 (side)' }, - { value: '6.0', label: '6.0' }, - { value: '6.0(front)', label: '6.0 (front)' }, - { value: '3.1.2', label: '3.1.2' }, - { value: 'hexagonal', label: 'hexagonal' }, - { value: '6.1', label: '6.1' }, - { value: '6.1(back)', label: '6.1 (back)' }, - { value: '6.1(front)', label: '6.1 (front)' }, - { value: '7.0', label: '7.0' }, - { value: '7.0(front)', label: '7.0 (front)' }, - { value: '7.1', label: '7.1' }, - { value: '7.1(wide)', label: '7.1 (wide)' }, - { value: '7.1(wide-side)', label: '7.1 (wide-side)' }, - { value: '5.1.2', label: '5.1.2' }, - { value: 'octagonal', label: 'octagonal' }, - { value: 'cube', label: 'cube' }, - { value: '5.1.4', label: '5.1.4' }, - { value: '7.1.2', label: '7.1.2' }, - { value: '7.1.4', label: '7.1.4' }, - { value: 'hexadecagonal', label: 'hexadecagonal' }, - { value: 'downmix', label: 'downmix' }, - { value: '22.2', label: '22.2' }, ]; + if (props.extended) { + options.push( + ...[ + { value: '2.1', label: '2.1' }, + { value: '3.0', label: '3.0' }, + { value: '3.0(back)', label: '3.0 (back)' }, + { value: '4.0', label: '4.0' }, + { value: 'quad', label: 'quad' }, + { value: 'quad(side)', label: 'quad (side)' }, + { value: '3.1', label: '3.1' }, + { value: '5.0', label: '5.0' }, + { value: '5.0(side)', label: '5.0 (side)' }, + { value: '4.1', label: '4.1' }, + { value: '5.1', label: '5.1' }, + { value: '5.1(side)', label: '5.1 (side)' }, + { value: '6.0', label: '6.0' }, + { value: '6.0(front)', label: '6.0 (front)' }, + { value: '3.1.2', label: '3.1.2' }, + { value: 'hexagonal', label: 'hexagonal' }, + { value: '6.1', label: '6.1' }, + { value: '6.1(back)', label: '6.1 (back)' }, + { value: '6.1(front)', label: '6.1 (front)' }, + { value: '7.0', label: '7.0' }, + { value: '7.0(front)', label: '7.0 (front)' }, + { value: '7.1', label: '7.1' }, + { value: '7.1(wide)', label: '7.1 (wide)' }, + { value: '7.1(wide-side)', label: '7.1 (wide-side)' }, + { value: '5.1.2', label: '5.1.2' }, + { value: 'octagonal', label: 'octagonal' }, + { value: 'cube', label: 'cube' }, + { value: '5.1.4', label: '5.1.4' }, + { value: '7.1.2', label: '7.1.2' }, + { value: '7.1.4', label: '7.1.4' }, + { value: 'hexadecagonal', label: 'hexadecagonal' }, + { value: 'downmix', label: 'downmix' }, + { value: '22.2', label: '22.2' }, + ], + ); + } + if (props.allowAuto === true) { options.unshift({ value: 'auto', label: 'auto' }); }