summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
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.cc
parent7a68de9aa2aba678f9ae9c6f9e11d9fc20c1c8e2 (diff)
Config option to disable preview audio.
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index b099cbc85..01a67522f 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -116,7 +116,8 @@ Config::set_defaults ()
_dcp_metadata_filename_format = dcp::NameFormat ("%t");
_dcp_asset_filename_format = dcp::NameFormat ("%t");
_jump_to_selected = true;
- _sound_output = optional<string> ();
+ _preview_sound = false;
+ _preview_sound_output = optional<string> ();
_allowed_dcp_frame_rates.clear ();
_allowed_dcp_frame_rates.push_back (24);
@@ -310,7 +311,8 @@ try
_dcp_metadata_filename_format = dcp::NameFormat (f.optional_string_child("DCPMetadataFilenameFormat").get_value_or ("%t"));
_dcp_asset_filename_format = dcp::NameFormat (f.optional_string_child("DCPAssetFilenameFormat").get_value_or ("%t"));
_jump_to_selected = f.optional_bool_child("JumpToSelected").get_value_or (true);
- _sound_output = f.optional_string_child("SoundOutput");
+ _preview_sound = f.optional_bool_child("PreviewSound").get_value_or (false);
+ _preview_sound_output = f.optional_string_child("PreviewSoundOutput");
/* Replace any cinemas from config.xml with those from the configured file */
if (boost::filesystem::exists (_cinemas_file)) {
@@ -479,8 +481,9 @@ Config::write_config () const
root->add_child("DCPMetadataFilenameFormat")->add_child_text (_dcp_metadata_filename_format.specification ());
root->add_child("DCPAssetFilenameFormat")->add_child_text (_dcp_asset_filename_format.specification ());
root->add_child("JumpToSelected")->add_child_text (_jump_to_selected ? "1" : "0");
- if (_sound_output) {
- root->add_child("SoundOutput")->add_child_text (_sound_output.get());
+ root->add_child("PreviewSound")->add_child_text (_preview_sound ? "1" : "0");
+ if (_preview_sound_output) {
+ root->add_child("PreviewSoundOutput")->add_child_text (_preview_sound_output.get());
}
try {