diff --git a/.gitmodules b/.gitmodules index 01b67b106..53b6f0f03 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "submodules/libadm"] path = submodules/libadm - url = https://github.com/rsjtaylor/libadm.git + url = https://github.com/merktj/libadm.git [submodule "submodules/libbw64"] path = submodules/libbw64 url = https://github.com/ebu/libbw64.git diff --git a/ear-production-suite/lib/include/speaker_setups.hpp b/ear-production-suite/lib/include/speaker_setups.hpp index 215007673..a642bf7ae 100644 --- a/ear-production-suite/lib/include/speaker_setups.hpp +++ b/ear-production-suite/lib/include/speaker_setups.hpp @@ -10,6 +10,7 @@ namespace plugin { enum Layer { upper, middle, bottom }; struct Speaker { + std::string channelFormatId; std::string spLabel; std::string label; float azimuth; @@ -22,199 +23,289 @@ struct Speaker { struct SpeakerSetup { SpeakerSetup() = default; SpeakerSetup(std::string initName, std::string initCommonName, - std::vector initSpeakers) - : name(initName), commonName(initCommonName), speakers(initSpeakers) {} + std::string initSpecification, std::string initDisplayName, + std::string initPackFormatId, + std::vector initSpeakers) + : name(initName), commonName(initCommonName), specification(initSpecification), + displayName(initDisplayName), packFormatId(initPackFormatId), speakers(initSpeakers) {} std::string name; std::string commonName; std::vector speakers; + std::string specification; + std::string displayName; + std::string packFormatId; }; static const std::vector SPEAKER_SETUPS = { - SpeakerSetup("0+1+0", "mono", - std::vector{Speaker{"M", "M+000", 0.f, 0.f, - Layer::middle, false, false}}), - SpeakerSetup( - "0+2+0", "stereo", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}}), - SpeakerSetup( - "0+5+0", "5.1", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, - Speaker{"Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}}), - SpeakerSetup( - "2+5+0", - "5.1+2H", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, - Speaker{"Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, - Speaker{"Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}}), - SpeakerSetup( - "4+5+0", - "5.1+4H", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, - Speaker{"Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, - Speaker{"Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}, - Speaker{"Ltr", "U+110", 110.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtr", "U-110", -110.f, 45.f, Layer::upper, false, false}}), - SpeakerSetup( - "4+5+1", - "", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, - Speaker{"Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, - Speaker{"Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}, - Speaker{"Ltr", "U+110", 110.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtr", "U-110", -110.f, 45.f, Layer::upper, false, false}, - Speaker{"Cbf", "B+000", 0.f, -30.f, Layer::bottom, false, false}}), - SpeakerSetup( - "3+7+0", - "7.2+3H", - std::vector{ - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"LH", "U+045", 45.f, 45.f, Layer::upper, false, false}, - Speaker{"RH", "U-045", -45.f, 45.f, Layer::upper, false, false}, - Speaker{"LS", "M+090", 90.f, 0.f, Layer::middle, false, false}, - Speaker{"RS", "M-090", -90.f, 0.f, Layer::middle, false, false}, - Speaker{"LB", "M+135", 135.f, 0.f, Layer::middle, false, false}, - Speaker{"RB", "M-135", -135.f, 0.f, Layer::middle, false, false}, - Speaker{"CH", "UH+180", 180.f, 45.f, Layer::upper, false, false}, - Speaker{"LFE1", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"LFE2", "LFE2", -45.f, -30.f, Layer::bottom, true, false}}), - SpeakerSetup( - "4+9+0", - "9.1+4H", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, - Speaker{"Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, - Speaker{"Lrs", "M+135", 135.f, 0.f, Layer::middle, false, false}, - Speaker{"Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}, - Speaker{"Ltf", "U+045", 45.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtf", "U-045", -45.f, 45.f, Layer::upper, false, false}, - Speaker{"Ltb", "U+135", 135.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtb", "U-135", -135.f, 45.f, Layer::upper, false, false}, - Speaker{"Lsc", "M+SC", 15.f, 0.f, Layer::middle, false, false}, - Speaker{"Rsc", "M-SC", -15.f, 0.f, Layer::middle, false, false}}), - SpeakerSetup( - "9+10+3", "22.2", - std::vector{ - Speaker{"FL", "M+060", 60.f, 0.f, Layer::middle, false, false}, - Speaker{"FR", "M-060", -60.f, 0.f, Layer::middle, false, false}, - Speaker{"FC", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE1", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"BL", "M+135", 135.f, 0.f, Layer::middle, false, false}, - Speaker{"BR", "M-135", -135.f, 0.f, Layer::middle, false, false}, - Speaker{"FLc", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"FRc", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"BC", "M+180", 180.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE2", "LFE2", -45.f, -30.f, Layer::bottom, true, false}, - Speaker{"SiL", "M+090", 90.f, 0.f, Layer::middle, false, false}, - Speaker{"SiR", "M-090", -90.f, 0.f, Layer::middle, false, false}, - Speaker{"TpFL", "U+045", 45.f, 45.f, Layer::upper, false, false}, - Speaker{"TpFR", "U-045", -45.f, 45.f, Layer::upper, false, false}, - Speaker{"TpFC", "U+000", 0.f, 45.f, Layer::upper, false, false}, - Speaker{"TpC", "T+000", 0.f, 90.f, Layer::upper, false, true}, - Speaker{"TpBL", "U+135", 135.f, 45.f, Layer::upper, false, false}, - Speaker{"TpBR", "U-135", -135.f, 45.f, Layer::upper, false, false}, - Speaker{"TpSiL", "U+090", 90.f, 45.f, Layer::upper, false, false}, - Speaker{"TpSiR", "U-090", -90.f, 45.f, Layer::upper, false, false}, - Speaker{"TpBC", "U+180", 180.f, 45.f, Layer::upper, false, false}, - Speaker{"BtFC", "B+000", 0.f, -30.f, Layer::bottom, false, false}, - Speaker{"BtFL", "B+045", 45.f, -30.f, Layer::bottom, false, false}, - Speaker{"BtFR", "B-045", -45.f, -30.f, Layer::bottom, false, - false}}), - SpeakerSetup( - "0+7+0", - "7.1", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, - Speaker{"Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, - Speaker{"Lrs", "M+135", 135.f, 0.f, Layer::middle, false, false}, - Speaker{"Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}}), - SpeakerSetup( - "4+7+0", - "7.1+4H", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, - Speaker{"Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, - Speaker{"Lrs", "M+135", 135.f, 0.f, Layer::middle, false, false}, - Speaker{"Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}, - Speaker{"Ltf", "U+045", 45.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtf", "U-045", -45.f, 45.f, Layer::upper, false, false}, - Speaker{"Ltb", "U+135", 135.f, 45.f, Layer::upper, false, false}, - Speaker{"Rtb", "U-135", -135.f, 45.f, Layer::upper, false, - false}}), - SpeakerSetup( - "2+7+0", - "9.1_7.1.2", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, - Speaker{"Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, - Speaker{"Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, - Speaker{"Lrs", "M+135", 135.f, 0.f, Layer::middle, false, false}, - Speaker{"Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}, - Speaker{"TpSiL", "U+090", 90.f, 45.f, Layer::upper, false, false}, - Speaker{"TpSiR", "U-090", -90.f, 45.f, Layer::upper, false, false}, - } - ), - SpeakerSetup( - "0+3+0", - "3.0", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false} - } - ), - SpeakerSetup( - "0+5+0", - "5.0", - std::vector{ - Speaker{"L", "M+030", 30.f, 0.f, Layer::middle, false, false}, - Speaker{"R", "M-030", -30.f, 0.f, Layer::middle, false, false}, - Speaker{"C", "M+000", 0.f, 0.f, Layer::middle, false, false}, - Speaker{"Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, - Speaker{"Rs", "M-110", -110.f, 0.f, Layer::middle, false, false} - } - )}; + SpeakerSetup("0+1+0", "mono", "BS.775", "mono", "AP_00010001", + std::vector{ + Speaker{"AC_00010003", "M", "M+000", 0.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+2+0", "stereo", "BS.2051", "stereo", "AP_00010002", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+3+0", "3.0", "BS.775", "3.0", "AP_0001000a", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+4+0", "4.0", "BS.775", "4.0", "AP_0001000b", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010009", "BC", "M+180", 180.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+5+0", "5.0", "BS.2051", "5.0", "AP_0001000c", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+5+0", "5.1", "BS.2051", "5.1", "AP_00010003", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+6+0", "6.1", "BS.2051", "6.1", "AP_0001000d", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010009", "BC", "M+180", 180.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+7+0", "7.1front", "BS.2094", "7.1 Front", "AP_0001000e", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010026", "FLM", "M+045", 45.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010027", "FRM", "M-045", -45.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "0+7+0", "7.1back", "BS.2051", "7.1 Back", "AP_0001000f", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_0001000a", "Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000b", "Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001c", "Lrs", "M+135", 135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001d", "Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "2+5+0", "5.1+2H", "BS.2051", "5.1+2H", "AP_00010004", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000d", "Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000f", "Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}}), + SpeakerSetup( + "0+7+0", "7.1side 5.1+sc", "BS.2094", "7.1 Side", "AP_00010012", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010024", "Lsc", "M+SC", 15.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010025", "Rsc", "M-SC", -15.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "2+5+0", "7.1topside 5.1.2", "BS.2094", "5.1.2", "AP_00010013", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010013", "TpSiL", "U+090", 90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010014", "TpSiR", "U-090", -90.f, 45.f, Layer::upper, false, false}}), + SpeakerSetup( + "2+7+0", "9.1screen 5.1.2+sc 5.1.2", "BS.2094", "9.1 Screen", "AP_00010014", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010013", "TpSiL", "U+090", 90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010014", "TpSiR", "U-090", -90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010024", "Lsc", "M+SC", 15.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010025", "Rsc", "M-SC", -15.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "2+7+0", "9.1 7.1.2", "BS.2094", "9.1", "AP_00010016", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_0001000b", "SiR", "M-090", -90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000c", "TpC", "T+000", 0.f, 90.f, Layer::upper, false, true}, + Speaker{"AC_0001001c", "LB", "M+135", 135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001d", "Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010013", "TpSiL", "U+090", 90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010014", "TpSiR", "U-090", -90.f, 45.f, Layer::upper, false, false}}), + SpeakerSetup( + "4+5+0", "9.1 5.1+4H", "BS.2051", "5.1+4H", "AP_00010005", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000d", "Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000f", "Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010010", "Ltr", "U+110", 110.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010012", "Rtr", "U-110", -110.f, 45.f, Layer::upper, false, false}}), + SpeakerSetup( + "4+5+1", "10.1", "BS.2051", "10.1", "AP_00010010", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000d", "Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000f", "Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010010", "Ltr", "U+110", 110.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010012", "Rtr", "U-110", -110.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010015", "Cbf", "B+000", 0.f, -30.f, Layer::bottom, false, false}}), + SpeakerSetup( + "3+7+0", "10.2 7.2+3H", "BS.2051", "7.2+3H", "AP_00010007", + std::vector{ + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010022", "LH", "U+045", 45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010023", "RH", "U-045", -45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000a", "Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000b", "Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001c", "LB", "M+135", 135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001d", "RB", "M-135", -135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010028", "CH", "UH+180", 180.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010020", "LFE1", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010021", "LFE2", "LFE2", -45.f, -30.f, Layer::bottom, true, false}}), + SpeakerSetup( + "4+7+0", "11.1 5.1.4+sc", "BS.2094", "11.1", "AP_00010015", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000d", "Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000f", "Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010010", "Ltr", "U+110", 110.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010012", "Rtr", "U-110", -110.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010024", "Lsc", "M+SC", 15.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010025", "Rsc", "M-SC", -15.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "4+7+0", "11.1 7.1+4H", "BS.2051", "7.1+4H", "AP_00010017", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_0001000a", "Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000b", "Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001c", "Lrs", "M+135", 135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001d", "Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010022", "LH", "U+045", 45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010023", "RH", "U-045", -45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001001e", "Ltb", "U+135", 135.f, 30.f, Layer::upper, false, false}, + Speaker{"AC_0001001f", "Rtb", "U-135", -135.f, 30.f, Layer::upper, false,false}}), + SpeakerSetup( + "4+9+0", "13.1 9.1+4H", "BS.2051", "9.1+4H", "AP_00010008", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_0001000a", "Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000b", "Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001c", "Lrs", "M+135", 135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001d", "Rrs", "M-135", -135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010022", "LH", "U+045", 45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010023", "RH", "U-045", -45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001001e", "Ltb", "U+135", 135.f, 30.f, Layer::upper, false, false}, + Speaker{"AC_0001001f", "Rtb", "U-135", -135.f, 30.f, Layer::upper, false,false}, + Speaker{"AC_00010024", "Lsc", "M+SC", 15.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010025", "Rsc", "M-SC", -15.f, 0.f, Layer::middle, false, false}}), + SpeakerSetup( + "9+10+3", "22.2", "BS.2051", "22.2", "AP_00010009", + std::vector{ + Speaker{"AC_00010018", "FL", "M+060", 60.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010019", "FR", "M-060", -60.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "FC", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010020", "LFE1", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_0001001c", "BL", "M+135", 135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001d", "BR", "M-135", -135.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010001", "FLc", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "FRc", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010009", "BC", "M+180", 180.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010021", "LFE2", "LFE2", -45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_0001000a", "SiL", "M+090", 90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000b", "SiR", "M-090", -90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010022", "TpFL", "U+045", 45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010023", "TpFR", "U-045", -45.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000e", "TpFC", "U+000", 0.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000c", "TpC", "T+000", 0.f, 90.f, Layer::upper, false, true}, + Speaker{"AC_0001001e", "TpBL", "U+135", 135.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001001f", "TpBR", "U-135", -135.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010013", "TpSiL", "U+090", 90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010014", "TpSiR", "U-090", -90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010011", "TpBC", "U+180", 180.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010015", "BtFC", "B+000", 0.f, -30.f, Layer::bottom, false, false}, + Speaker{"AC_00010016", "BtFL", "B+045", 45.f, -30.f, Layer::bottom, false, false}, + Speaker{"AC_00010017", "BtFR", "B-045", -45.f, -30.f, Layer::bottom, false,false}}), + SpeakerSetup( + "9+9+0", "Auro-3D", "BS.2094", "Auro-3D", "AP_00010011", + std::vector{ + Speaker{"AC_00010001", "L", "M+030", 30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010002", "R", "M-030", -30.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010003", "C", "M+000", 0.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010004", "LFE", "LFE1", 45.f, -30.f, Layer::bottom, true, false}, + Speaker{"AC_00010005", "Ls", "M+110", 110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_00010006", "Rs", "M-110", -110.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000a", "Lss", "M+090", 90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001000b", "Rss", "M-090", -90.f, 0.f, Layer::middle, false, false}, + Speaker{"AC_0001001a", "BL", "M+135", 135.f, 0.f, Layer::middle, false, false}, // This speaker is marked as diffuse + Speaker{"AC_0001001b", "BR", "M-135", -135.f, 0.f, Layer::middle, false, false}, // This speaker is marked as diffuse + Speaker{"AC_0001000d", "Ltf", "U+030", 30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000f", "Rtf", "U-030", -30.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001000e", "TpFC", "U+000", 0.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010010", "Ltr", "U+110", 110.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010012", "Rtr", "U-110", -110.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010013", "TpSiL", "U+090", 90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_00010014", "TpSiR", "U-090", -90.f, 45.f, Layer::upper, false, false}, + Speaker{"AC_0001001e", "Ltb", "U+135", 135.f, 30.f, Layer::upper, false, false}, + Speaker{"AC_0001001f", "Rtb", "U-135", -135.f, 30.f, Layer::upper, false,false}}), + }; + inline SpeakerSetup speakerSetupByName(const std::string& name) { auto it = std::find_if( @@ -247,5 +338,17 @@ inline SpeakerSetup speakerSetupByIndex(int index) { } } +inline SpeakerSetup speakerSetupByPackFormatId(const std::string& packFormatId) { + auto it = std::find_if( + SPEAKER_SETUPS.begin(), SPEAKER_SETUPS.end(), + [packFormatId](auto speakerSetup) { return speakerSetup.packFormatId == packFormatId; }); + if (it != SPEAKER_SETUPS.end()) { + return *it; + } + else { + return SpeakerSetup{}; + } +} + } // namespace plugin } // namespace ear diff --git a/ear-production-suite/lib/messages/type_metadata.proto b/ear-production-suite/lib/messages/type_metadata.proto index 0bcc7647e..918d51b6e 100644 --- a/ear-production-suite/lib/messages/type_metadata.proto +++ b/ear-production-suite/lib/messages/type_metadata.proto @@ -9,18 +9,26 @@ enum SpeakerLayout { ITU_BS_2051_UNKNOWN = -1; ITU_BS_2051_0_1_0 = 0; ITU_BS_2051_0_2_0 = 1; - ITU_BS_2051_0_5_0 = 2; - ITU_BS_2051_2_5_0 = 3; - ITU_BS_2051_4_5_0 = 4; - ITU_BS_2051_4_5_1 = 5; - ITU_BS_2051_3_7_0 = 6; - ITU_BS_2051_4_9_0 = 7; - ITU_BS_2051_9_10_3 = 8; - ITU_BS_2051_0_7_0 = 9; - ITU_BS_2051_4_7_0 = 10; - ITU_BS_2094_2_7_0_AP_00010016 = 11; - ITU_BS_755_0_3_0 = 12; - ITU_BS_2051_0_5_0_NO_LFE = 13; + ITU_BS_755_0_3_0 = 2; + ITU_BS_755_0_4_0 = 3; + ITU_BS_2051_0_5_0_NO_LFE = 4; + ITU_BS_2051_0_5_0 = 5; + ITU_BS_2051_0_6_0 = 6; + ITU_BS_2094_0_7_0_FRONT = 7; + ITU_BS_2051_0_7_0_BACK = 8; + ITU_BS_2051_2_5_0 = 9; + ITU_BS_2094_0_7_0_SIDE = 10; + ITU_BS_2094_2_5_0 = 11; + ITU_BS_2094_2_7_0_SCREEN = 12; + ITU_BS_2094_2_7_0 = 13; + ITU_BS_2051_4_5_0 = 14; + ITU_BS_2051_4_5_1 = 15; + ITU_BS_2051_3_7_0 = 16; + ITU_BS_2094_4_7_0 = 17; + ITU_BS_2051_4_7_0 = 18; + ITU_BS_2051_4_9_0 = 19; + ITU_BS_2051_9_10_3 = 20; + ITU_BS_2094_9_9_0 = 21; } message Speaker { diff --git a/ear-production-suite/lib/src/helper/protobuf_utilities.cpp b/ear-production-suite/lib/src/helper/protobuf_utilities.cpp index 883fd442a..d488b8878 100644 --- a/ear-production-suite/lib/src/helper/protobuf_utilities.cpp +++ b/ear-production-suite/lib/src/helper/protobuf_utilities.cpp @@ -11,36 +11,52 @@ std::map SpeakerLayoutTranslator::SpeakerLayoutProtoToEarLUT_ = { {SpeakerLayout::ITU_BS_2051_0_1_0, std::string("AP_00010001")}, {SpeakerLayout::ITU_BS_2051_0_2_0, std::string("AP_00010002")}, + {SpeakerLayout::ITU_BS_755_0_3_0, std::string("AP_0001000a")}, + {SpeakerLayout::ITU_BS_755_0_4_0, std::string("AP_0001000b")}, + {SpeakerLayout::ITU_BS_2051_0_5_0_NO_LFE, std::string("AP_0001000c")}, {SpeakerLayout::ITU_BS_2051_0_5_0, std::string("AP_00010003")}, + {SpeakerLayout::ITU_BS_2051_0_6_0, std::string("AP_0001000d")}, + {SpeakerLayout::ITU_BS_2094_0_7_0_FRONT, std::string("AP_0001000e")}, + {SpeakerLayout::ITU_BS_2051_0_7_0_BACK, std::string("AP_0001000f")}, {SpeakerLayout::ITU_BS_2051_2_5_0, std::string("AP_00010004")}, + {SpeakerLayout::ITU_BS_2094_0_7_0_SIDE, std::string("AP_00010012")}, + {SpeakerLayout::ITU_BS_2094_2_5_0, std::string("AP_00010013")}, + {SpeakerLayout::ITU_BS_2094_2_7_0_SCREEN, std::string("AP_00010014")}, + {SpeakerLayout::ITU_BS_2094_2_7_0, std::string("AP_00010016")}, {SpeakerLayout::ITU_BS_2051_4_5_0, std::string("AP_00010005")}, {SpeakerLayout::ITU_BS_2051_4_5_1, std::string("AP_00010010")}, {SpeakerLayout::ITU_BS_2051_3_7_0, std::string("AP_00010007")}, + {SpeakerLayout::ITU_BS_2094_4_7_0, std::string("AP_00010015")}, + {SpeakerLayout::ITU_BS_2051_4_7_0, std::string("AP_00010017")}, {SpeakerLayout::ITU_BS_2051_4_9_0, std::string("AP_00010008")}, {SpeakerLayout::ITU_BS_2051_9_10_3, std::string("AP_00010009")}, - {SpeakerLayout::ITU_BS_2051_0_7_0, std::string("AP_0001000f")}, - {SpeakerLayout::ITU_BS_2051_4_7_0, std::string("AP_00010017")}, - {SpeakerLayout::ITU_BS_2051_0_5_0_NO_LFE, std::string{"AP_0001000c"}}, - {SpeakerLayout::ITU_BS_755_0_3_0, std::string{"AP_0001000a"}}, - {SpeakerLayout::ITU_BS_2094_2_7_0_AP_00010016, std::string{"AP_00020026"}} + {SpeakerLayout::ITU_BS_2094_9_9_0, std::string("AP_00010011")} }; std::map SpeakerLayoutTranslator::SpeakerLayoutEarToProtoLUT_ = { {std::string("AP_00010001"), SpeakerLayout::ITU_BS_2051_0_1_0}, {std::string("AP_00010002"), SpeakerLayout::ITU_BS_2051_0_2_0}, + {std::string("AP_0001000a"), SpeakerLayout::ITU_BS_755_0_3_0}, + {std::string("AP_0001000b"), SpeakerLayout::ITU_BS_755_0_4_0}, + {std::string("AP_0001000c"), SpeakerLayout::ITU_BS_2051_0_5_0_NO_LFE}, {std::string("AP_00010003"), SpeakerLayout::ITU_BS_2051_0_5_0}, + {std::string("AP_0001000d"), SpeakerLayout::ITU_BS_2051_0_6_0}, + {std::string("AP_0001000e"), SpeakerLayout::ITU_BS_2094_0_7_0_FRONT}, + {std::string("AP_0001000f"), SpeakerLayout::ITU_BS_2051_0_7_0_BACK}, {std::string("AP_00010004"), SpeakerLayout::ITU_BS_2051_2_5_0}, + {std::string("AP_00010012"), SpeakerLayout::ITU_BS_2094_0_7_0_SIDE}, + {std::string("AP_00010013"), SpeakerLayout::ITU_BS_2094_2_5_0}, + {std::string("AP_00010014"), SpeakerLayout::ITU_BS_2094_2_7_0_SCREEN}, + {std::string("AP_00010016"), SpeakerLayout::ITU_BS_2094_2_7_0}, {std::string("AP_00010005"), SpeakerLayout::ITU_BS_2051_4_5_0}, {std::string("AP_00010010"), SpeakerLayout::ITU_BS_2051_4_5_1}, {std::string("AP_00010007"), SpeakerLayout::ITU_BS_2051_3_7_0}, + {std::string("AP_00010015"), SpeakerLayout::ITU_BS_2094_4_7_0}, + {std::string("AP_00010017"), SpeakerLayout::ITU_BS_2051_4_7_0}, {std::string("AP_00010008"), SpeakerLayout::ITU_BS_2051_4_9_0}, {std::string("AP_00010009"), SpeakerLayout::ITU_BS_2051_9_10_3}, - {std::string("AP_0001000f"), SpeakerLayout::ITU_BS_2051_0_7_0}, - {std::string("AP_00010017"), SpeakerLayout::ITU_BS_2051_4_7_0}, - {std::string{"AP_0001000c"}, SpeakerLayout::ITU_BS_2051_0_5_0_NO_LFE}, - {std::string{"AP_0001000a"}, SpeakerLayout::ITU_BS_755_0_3_0}, - {std::string{"AP_00020026"}, SpeakerLayout::ITU_BS_2094_2_7_0_AP_00010016} + {std::string("AP_00010011"), SpeakerLayout::ITU_BS_2094_9_9_0} }; std::string SpeakerLayoutTranslator::proto2ear(const SpeakerLayout& layout) { diff --git a/ear-production-suite/lib/src/programme_store_adm_serializer.cpp b/ear-production-suite/lib/src/programme_store_adm_serializer.cpp index 31d5c547e..72209fe47 100644 --- a/ear-production-suite/lib/src/programme_store_adm_serializer.cpp +++ b/ear-production-suite/lib/src/programme_store_adm_serializer.cpp @@ -304,30 +304,33 @@ void ProgrammeStoreAdmSerializer::createTopLevelObject( serializedObjects[connectionId] = objectHolder.audioObject; } else if (metadata.has_ds_metadata()) { auto layoutIndex = metadata.ds_metadata().layout(); - std::string speakerSetupName; if (layoutIndex >= 0) { - speakerSetupName = SPEAKER_SETUPS.at(layoutIndex).name; - } - auto objectHolder = addSimpleCommonDefinitionsObjectTo( - doc, metadata.name(), speakerSetupName); - setInteractivity(*objectHolder.audioObject, object); - content.addReference(objectHolder.audioObject); - auto audioPackFormatId = - adm::formatId(adm::audioPackFormatLookupTable().at(speakerSetupName)); - std::vector speakerLabels = - adm::speakerLabelsLookupTable().at(speakerSetupName); - for (auto i{0u}; i < objectHolder.audioTrackUids.size(); ++i) { - auto speakerLabel = speakerLabels.at(i); - auto audioTrackUidId = - formatId(objectHolder.audioTrackUids.at(speakerLabel) - ->get()); - auto audioTrackFormatId = - formatId(adm::audioTrackFormatLookupTable().at(speakerLabel)); - chna.addAudioId(bw64::AudioId{ - static_cast(metadata.routing() + i + 1), audioTrackUidId, - audioTrackFormatId, audioPackFormatId}); + std::vector speakerLabels; + std::vector trackFormatIds; + auto& speakerSetup = SPEAKER_SETUPS.at(layoutIndex); + for (auto& speaker : speakerSetup.speakers) { + speakerLabels.push_back(speaker.label); + auto channelFormatId = speaker.channelFormatId; + auto trackFormatId = channelFormatId.replace(0, 2, "AT") + "_01"; + trackFormatIds.push_back(trackFormatId); + } + auto objectHolder = addSimpleCommonDefinitionsObjectTo( + doc, metadata.name(), speakerSetup.packFormatId, trackFormatIds, + speakerLabels); + setInteractivity(*objectHolder.audioObject, object); + content.addReference(objectHolder.audioObject); + for (auto i{0u}; i < objectHolder.audioTrackUids.size(); ++i) { + auto speakerLabel = speakerLabels.at(i); + auto audioTrackUidId = + formatId(objectHolder.audioTrackUids.at(speakerLabel) + ->get()); + chna.addAudioId( + bw64::AudioId{static_cast(metadata.routing() + i + 1), + audioTrackUidId, trackFormatIds.at(i), + speakerSetup.packFormatId}); + } + serializedObjects[connectionId] = objectHolder.audioObject; } - serializedObjects[connectionId] = objectHolder.audioObject; } } } diff --git a/ear-production-suite/plugins/direct_speakers/src/value_box_main.hpp b/ear-production-suite/plugins/direct_speakers/src/value_box_main.hpp index 0fd8d8e2f..e15016a2d 100644 --- a/ear-production-suite/plugins/direct_speakers/src/value_box_main.hpp +++ b/ear-production-suite/plugins/direct_speakers/src/value_box_main.hpp @@ -44,20 +44,9 @@ class ValueBoxMain : public Component { addAndMakeVisible(speakerSetupLabel_.get()); speakerSetupsComboBox_->setDefaultText("select speaker layout"); - speakerSetupsComboBox_->addTextEntry("mono (0+1+0)"); - speakerSetupsComboBox_->addTextEntry("stereo (0+2+0)"); - speakerSetupsComboBox_->addTextEntry("5.1 (0+5+0)"); - speakerSetupsComboBox_->addTextEntry("5.1+2H (2+5+0)"); - speakerSetupsComboBox_->addTextEntry("5.1+4H (4+5+0)"); - speakerSetupsComboBox_->addTextEntry(" (4+5+1)"); - speakerSetupsComboBox_->addTextEntry("7.2+3H (3+7+0)"); - speakerSetupsComboBox_->addTextEntry("9.1+4H (4+9+0)"); - speakerSetupsComboBox_->addTextEntry("22.2 (9+10+3)"); - speakerSetupsComboBox_->addTextEntry("7.1 (0+7+0)"); - speakerSetupsComboBox_->addTextEntry("7.1+4H (4+7+0)"); - speakerSetupsComboBox_->addTextEntry("7.1+2H (2+7+0)"); - speakerSetupsComboBox_->addTextEntry("3.0 (0+3+0)"); - speakerSetupsComboBox_->addTextEntry("5.0 (0+5+0)"); + for (auto const& setup : SPEAKER_SETUPS) { + speakerSetupsComboBox_->addTextEntry(setup.displayName + " (" + setup.name + ")" + " - " + setup.specification); + } addAndMakeVisible(speakerSetupsComboBox_.get()); for (auto colour : EarColours::Items) { diff --git a/ear-production-suite/plugins/monitoring/CMakeLists.txt b/ear-production-suite/plugins/monitoring/CMakeLists.txt index 4a5fd3afd..cb02271f7 100644 --- a/ear-production-suite/plugins/monitoring/CMakeLists.txt +++ b/ear-production-suite/plugins/monitoring/CMakeLists.txt @@ -6,7 +6,7 @@ set(SOURCES_MONITORING ) -function(add_monitoring_plugin SPEAKER_LAYOUT SPEAKER_LAYOUT_NAME PLUGIN_CODE_SUFFIX) +function(add_monitoring_plugin SPEAKER_LAYOUT SPEAKER_LAYOUT_NAME AUDIO_PACK_FORMAT_ID PLUGIN_CODE_SUFFIX) add_juce_vst3_plugin( ear_monitoring_${SPEAKER_LAYOUT} SOURCES ${SOURCES_MONITORING} @@ -18,21 +18,22 @@ function(add_monitoring_plugin SPEAKER_LAYOUT SPEAKER_LAYOUT_NAME PLUGIN_CODE_SU ear_monitoring_${SPEAKER_LAYOUT}_VST3 PRIVATE SPEAKER_LAYOUT="${SPEAKER_LAYOUT}" SPEAKER_LAYOUT_NAME="${SPEAKER_LAYOUT_NAME}" + AUDIO_PACK_FORMAT_ID="${AUDIO_PACK_FORMAT_ID}" ) target_link_libraries(ear_monitoring_${SPEAKER_LAYOUT}_VST3 PRIVATE ear-plugin-base) install_juce_vst3_plugin(ear_monitoring_${SPEAKER_LAYOUT} "${EPS_PLUGIN_INSTALL_PREFIX}VST3/ear-production-suite") endfunction() -add_monitoring_plugin("0+2+0" "2.0" "A0") # Let's start monitoring suffixes from A0 and increment +add_monitoring_plugin("0+2+0" "2.0" "AP_00010002" "A0") # Let's start monitoring suffixes from A0 and increment if(EAR_PLUGINS_BUILD_ALL_MONITORING_PLUGINS) - add_monitoring_plugin("0+5+0" "5.1" "A1") - add_monitoring_plugin("2+5+0" "5.1+2H" "A2") - add_monitoring_plugin("4+5+0" "5.1+4H" "A3") - add_monitoring_plugin("4+5+1" "" "A4") - add_monitoring_plugin("3+7+0" "7.2+3H" "A5") - add_monitoring_plugin("4+9+0" "9.1+4H" "A6") - add_monitoring_plugin("9+10+3" "22.2" "A7") - add_monitoring_plugin("0+7+0" "7.1" "A8") - add_monitoring_plugin("4+7+0" "7.1+4H" "A9") + add_monitoring_plugin("0+5+0" "5.1" "AP_00010003" "A1") + add_monitoring_plugin("2+5+0" "5.1+2H" "AP_00010004" "A2") + add_monitoring_plugin("4+5+0" "5.1+4H" "AP_00010005" "A3") + add_monitoring_plugin("4+5+1" "" "AP_00010010" "A4") + add_monitoring_plugin("3+7+0" "7.2+3H" "AP_00010007" "A5") + add_monitoring_plugin("4+9+0" "9.1+4H" "AP_00010008" "A6") + add_monitoring_plugin("9+10+3" "22.2" "AP_00010009" "A7") + add_monitoring_plugin("0+7+0" "7.1" "AP_0001000f" "A8") + add_monitoring_plugin("4+7+0" "7.1+4H" "AP_00010017" "A9") endif() diff --git a/ear-production-suite/plugins/monitoring/src/monitoring_plugin_editor.cpp b/ear-production-suite/plugins/monitoring/src/monitoring_plugin_editor.cpp index 09ee600f9..1209b178d 100644 --- a/ear-production-suite/plugins/monitoring/src/monitoring_plugin_editor.cpp +++ b/ear-production-suite/plugins/monitoring/src/monitoring_plugin_editor.cpp @@ -59,7 +59,7 @@ EarMonitoringAudioProcessorEditor::EarMonitoringAudioProcessorEditor( addAndMakeVisible(speakerMeterBoxTop_.get()); addAndMakeVisible(speakerMeterBoxBottom_.get()); - auto speakers = ear::plugin::speakerSetupByName(SPEAKER_LAYOUT).speakers; + auto speakers = ear::plugin::speakerSetupByPackFormatId(AUDIO_PACK_FORMAT_ID).speakers; for (int i = 0; i < speakers.size(); ++i) { std::string ituLabel = speakers.at(i).label; auto pos = ituLabel.find("-"); diff --git a/ear-production-suite/test/scene_gains_calculator_tests.cpp b/ear-production-suite/test/scene_gains_calculator_tests.cpp index e991ad360..eaf81295b 100644 --- a/ear-production-suite/test/scene_gains_calculator_tests.cpp +++ b/ear-production-suite/test/scene_gains_calculator_tests.cpp @@ -207,7 +207,7 @@ void updateExpectedGainMatrix( TEST_CASE("scene gain calculation (DirectSpeakers)") { proto::SceneStore store; - auto obj1 = proto::convertSpeakerSetupToEpsMetadata(4); + auto obj1 = proto::convertSpeakerSetupToEpsMetadata(14); REQUIRE(obj1->speakers_size() == 10); auto layout = ear::getLayout("0+5+0"); diff --git a/submodules/libadm b/submodules/libadm index af5bb5e3e..1f1eaa415 160000 --- a/submodules/libadm +++ b/submodules/libadm @@ -1 +1 @@ -Subproject commit af5bb5e3e4096f3dd97ddf9553fee6809371b56a +Subproject commit 1f1eaa41505a6e5ccbb4985b27cc553f931496a8