summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-06 14:29:40 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-06 14:29:40 +0000
commite9fa6f47c5cd52f0b56f277fdeaf6a4f636ddf01 (patch)
tree8de2a6e777f7ab90406847a517c13a56919266fa /src/lib/util.cc
parente6917a6ec22b1b5ed07ecede0182ffb7857a5627 (diff)
Try to put mono sound tracks on the centre speaker.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 45965385c..395c53e31 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -364,6 +364,20 @@ dcp_audio_sample_rate (int fs)
return 96000;
}
+int
+dcp_audio_channels (int f)
+{
+ if (f) {
+ /* 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);