summaryrefslogtreecommitdiff
path: root/src/lib/config.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-04-19 10:56:44 +0100
committerCarl Hetherington <cth@carlh.net>2017-04-19 23:04:32 +0100
commit565a0ab9fc8be5c21685b019aa06d37e6c66160c (patch)
treef69349ecb0231f9babeeba26749edd17be02e65b /src/lib/config.h
parent7a68de9aa2aba678f9ae9c6f9e11d9fc20c1c8e2 (diff)
Config option to disable preview audio.
Diffstat (limited to 'src/lib/config.h')
-rw-r--r--src/lib/config.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/lib/config.h b/src/lib/config.h
index 2fd36059a..a574cc261 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -67,7 +67,8 @@ public:
USE_ANY_SERVERS,
SERVERS,
CINEMAS,
- SOUND_OUTPUT,
+ PREVIEW_SOUND,
+ PREVIEW_SOUND_OUTPUT,
OTHER
};
@@ -307,8 +308,12 @@ public:
return _jump_to_selected;
}
- boost::optional<std::string> sound_output () const {
- return _sound_output;
+ bool preview_sound () const {
+ return _preview_sound;
+ }
+
+ boost::optional<std::string> preview_sound_output () const {
+ return _preview_sound_output;
}
/** @param n New number of local encoding threads */
@@ -526,18 +531,22 @@ public:
maybe_set (_confirm_kdm_email, s);
}
- void set_sound_output (std::string o)
+ void set_preview_sound (bool s) {
+ maybe_set (_preview_sound, s, PREVIEW_SOUND);
+ }
+
+ void set_preview_sound_output (std::string o)
{
- maybe_set (_sound_output, o, SOUND_OUTPUT);
+ maybe_set (_preview_sound_output, o, PREVIEW_SOUND_OUTPUT);
}
- void unset_sound_output ()
+ void unset_preview_sound_output ()
{
- if (!_sound_output) {
+ if (!_preview_sound_output) {
return;
}
- _sound_output = boost::none;
+ _preview_sound_output = boost::none;
changed ();
}
@@ -699,8 +708,9 @@ private:
dcp::NameFormat _dcp_metadata_filename_format;
dcp::NameFormat _dcp_asset_filename_format;
bool _jump_to_selected;
- /** name of a specific sound output stream to use for preview */
- boost::optional<std::string> _sound_output;
+ bool _preview_sound;
+ /** name of a specific sound output stream to use for preview, or empty to use the default */
+ boost::optional<std::string> _preview_sound_output;
/** Singleton instance, or 0 */
static Config* _instance;