Merge master.
[dcpomatic.git] / src / lib / audio_content.cc
index d9e00ff1401ca4e3335ea51c2944aff404a94fae..e8fd4bbd39d0e93813bd78b325624307e60e4750 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include <libcxml/cxml.h>
+#include <dcp/raw_convert.h>
 #include "audio_content.h"
 #include "analyse_audio_job.h"
 #include "job_manager.h"
@@ -30,8 +31,8 @@
 using std::string;
 using std::vector;
 using boost::shared_ptr;
-using boost::lexical_cast;
 using boost::dynamic_pointer_cast;
+using dcp::raw_convert;
 
 int const AudioContentProperty::AUDIO_CHANNELS = 200;
 int const AudioContentProperty::AUDIO_LENGTH = 201;
@@ -59,8 +60,6 @@ AudioContent::AudioContent (shared_ptr<const Film> f, boost::filesystem::path p)
 AudioContent::AudioContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node)
        : Content (f, node)
 {
-       LocaleGuard lg;
-       
        _audio_gain = node->number_child<float> ("AudioGain");
        _audio_delay = node->number_child<int> ("AudioDelay");
 }
@@ -90,11 +89,9 @@ AudioContent::AudioContent (shared_ptr<const Film> f, vector<shared_ptr<Content>
 void
 AudioContent::as_xml (xmlpp::Node* node) const
 {
-       LocaleGuard lg;
-       
        boost::mutex::scoped_lock lm (_mutex);
-       node->add_child("AudioGain")->add_child_text (lexical_cast<string> (_audio_gain));
-       node->add_child("AudioDelay")->add_child_text (lexical_cast<string> (_audio_delay));
+       node->add_child("AudioGain")->add_child_text (raw_convert<string> (_audio_gain));
+       node->add_child("AudioDelay")->add_child_text (raw_convert<string> (_audio_delay));
 }