Merge master.
[dcpomatic.git] / src / lib / util.cc
index 9d42a52e50f06a980464b3f1e17debb5b2b38edb..987c2b9e53a5c37112a3f9b92de6fa2d9d3d420e 100644 (file)
@@ -367,6 +367,20 @@ dcp_audio_sample_rate (int fs)
        return 96000;
 }
 
+int
+dcp_audio_channels (int f)
+{
+       if (f == 1) {
+               /* The source is mono, so to put the mono channel into
+                  the centre we need to generate a 5.1 soundtrack.
+               */
+               return 6;
+       }
+
+       return f;
+}
+
+
 bool operator== (Size const & a, Size const & b)
 {
        return (a.width == b.width && a.height == b.height);