Add support for 20 as a MainSoundConfiguration. 2419-main-sound-configuration
authorCarl Hetherington <cth@carlh.net>
Sun, 15 Jan 2023 20:15:16 +0000 (21:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 15 Jan 2023 20:15:16 +0000 (21:15 +0100)
src/types.cc
src/types.h

index 15a05f79710f378acb51075515b435d79bd851d8..9b1aca31635e2663356da5949dedbac06aa8587c 100644 (file)
@@ -477,7 +477,12 @@ MainSoundConfiguration::MainSoundConfiguration (string s)
                throw MainSoundConfigurationError (s);
        }
 
-       if (parts[0] == "51") {
+       if (parts[0] == "20") {
+               /* I can't find any mention in the standard of 20 being OK here, but Deluxe fail
+                * QCs if the audio is stereo and 51 is used here.
+                */
+               _field = MCASoundField::STEREO;
+       } else if (parts[0] == "51") {
                _field = MCASoundField::FIVE_POINT_ONE;
        } else if (parts[0] == "71") {
                _field = MCASoundField::SEVEN_POINT_ONE;
@@ -513,10 +518,18 @@ string
 MainSoundConfiguration::to_string () const
 {
        string c;
-       if (_field == MCASoundField::FIVE_POINT_ONE) {
+       switch (_field) {
+       case MCASoundField::STEREO:
+               c = "20/";
+               break;
+       case MCASoundField::FIVE_POINT_ONE:
                c = "51/";
-       } else {
+               break;
+       case MCASoundField::SEVEN_POINT_ONE:
                c = "71/";
+               break;
+       default:
+               DCP_ASSERT(false);
        }
 
        for (auto i: _channels) {
index a60193a49d75532b16744a2f5cfa35db6aed4f42..7e0ae9a93eb11c10a006859a46f39ff621dc1494 100644 (file)
@@ -118,6 +118,7 @@ std::vector<dcp::Channel> used_audio_channels ();
 
 enum class MCASoundField
 {
+       STEREO,
        FIVE_POINT_ONE,
        SEVEN_POINT_ONE
 };