C++11 tidying.
[dcpomatic.git] / src / lib / audio_content.cc
index 3d9f6ac051ca9fa102daf1adffc42e8291bc89f9..748cbb7d0d6403b487ec540abd2ab2e8768b3d66 100644 (file)
@@ -52,7 +52,6 @@ using namespace dcpomatic;
 int const AudioContentProperty::STREAMS = 200;
 int const AudioContentProperty::GAIN = 201;
 int const AudioContentProperty::DELAY = 202;
-int const AudioContentProperty::LANGUAGE = 203;
 
 
 AudioContent::AudioContent (Content* parent)
@@ -90,10 +89,6 @@ AudioContent::AudioContent (Content* parent, cxml::ConstNodePtr node)
 {
        _gain = node->number_child<double> ("AudioGain");
        _delay = node->number_child<int> ("AudioDelay");
-       auto lang = node->optional_node_child ("Language");
-       if (lang) {
-               _language = dcp::LanguageTag (lang->content());
-       }
 
        /* Backwards compatibility */
        auto r = node->optional_number_child<double>("AudioVideoFrameRate");
@@ -117,16 +112,11 @@ AudioContent::AudioContent (Content* parent, vector<shared_ptr<Content> > c)
                if (c[i]->audio->delay() != ref->delay()) {
                        throw JoinError (_("Content to be joined must have the same audio delay."));
                }
-
-               if (c[i]->audio->language() != ref->language()) {
-                       throw JoinError (_("Content to be joined must have the same audio language."));
-               }
        }
 
        _gain = ref->gain ();
        _delay = ref->delay ();
        _streams = ref->streams ();
-       _language = ref->language ();
 }
 
 
@@ -136,9 +126,6 @@ AudioContent::as_xml (xmlpp::Node* node) const
        boost::mutex::scoped_lock lm (_mutex);
        node->add_child("AudioGain")->add_child_text(raw_convert<string>(_gain));
        node->add_child("AudioDelay")->add_child_text(raw_convert<string>(_delay));
-       if (_language) {
-               node->add_child("Language")->add_child_text(_language->to_string());
-       }
 }
 
 
@@ -156,13 +143,6 @@ AudioContent::set_delay (int d)
 }
 
 
-void
-AudioContent::set_language (optional<dcp::LanguageTag> language)
-{
-       maybe_set (_language, language, AudioContentProperty::LANGUAGE);
-}
-
-
 string
 AudioContent::technical_summary () const
 {