summaryrefslogtreecommitdiff
path: root/src/wx/wx_util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-07-15 22:53:21 +0100
committerCarl Hetherington <cth@carlh.net>2016-07-15 22:53:21 +0100
commitbb5434e9845556a0bd58792c3082a8a15abd127e (patch)
treeaf13c14ba9d2aa8af5fba9d2ecdef1b3c5fbfad8 /src/wx/wx_util.cc
parent49b0830290ed067f94c5f87690e9167c5706d532 (diff)
Add channel count hints to the default audio channel count preference,
and remove the choice for default to zero channels. Remove em-dash from hints as it apparently does not render on Windows for some reason.
Diffstat (limited to 'src/wx/wx_util.cc')
-rw-r--r--src/wx/wx_util.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 40e72543a..e12443dd3 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -26,6 +26,7 @@
#include "file_picker_ctrl.h"
#include "lib/config.h"
#include "lib/util.h"
+#include <dcp/raw_convert.h>
#include <wx/spinctrl.h>
#include <boost/thread.hpp>
@@ -357,3 +358,26 @@ time_to_timecode (DCPTime t, double fps)
int const f = lrint (w * fps);
return wxString::Format (wxT("%02d:%02d:%02d.%02d"), h, m, s, f);
}
+
+void
+setup_audio_channels_choice (wxChoice* choice, int minimum)
+{
+ vector<pair<string, string> > items;
+ for (int i = minimum; i <= 16; i += 2) {
+ if (i == 2) {
+ items.push_back (make_pair (wx_to_std (_("2 - stereo")), dcp::raw_convert<string> (i)));
+ } else if (i == 4) {
+ items.push_back (make_pair (wx_to_std (_("4 - L/C/R/Lfe")), dcp::raw_convert<string> (i)));
+ } else if (i == 6) {
+ items.push_back (make_pair (wx_to_std (_("6 - 5.1")), dcp::raw_convert<string> (i)));
+ } else if (i == 8) {
+ items.push_back (make_pair (wx_to_std (_("8 - 5.1/HI/VI")), dcp::raw_convert<string> (i)));
+ } else if (i == 12) {
+ items.push_back (make_pair (wx_to_std (_("12 - 7.1/HI/VI")), dcp::raw_convert<string> (i)));
+ } else {
+ items.push_back (make_pair (dcp::raw_convert<string> (i), dcp::raw_convert<string> (i)));
+ }
+ }
+
+ checked_set (choice, items);
+}