diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-12 00:57:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-12 00:57:51 +0100 |
| commit | df085fc0ea4f1a3f009de5a7a5bf9f241173bcba (patch) | |
| tree | 597ff1fe90446aa684e5fede3a72217b0b5c3d1a /src/lib/sndfile_content.cc | |
| parent | 1b576d63f5b5babda35c3995dd375e39baa16947 (diff) | |
Remove LocaleGuard and lexical_cast<> in favour of libdcp::raw_convert,
which should get things right with both decimal and thousands
separators; LocaleGuard fixed decimal separators ok but not, it appears,
thousands ones.
Diffstat (limited to 'src/lib/sndfile_content.cc')
| -rw-r--r-- | src/lib/sndfile_content.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index a8388ab77..fcdf88778 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ */ #include <libcxml/cxml.h> +#include <libdcp/raw_convert.h> #include "sndfile_content.h" #include "sndfile_decoder.h" #include "film.h" @@ -31,7 +32,7 @@ using std::string; using std::stringstream; using std::cout; using boost::shared_ptr; -using boost::lexical_cast; +using libdcp::raw_convert; int const SndfileContentProperty::VIDEO_FRAME_RATE = 600; @@ -137,9 +138,9 @@ SndfileContent::as_xml (xmlpp::Node* node) const Content::as_xml (node); AudioContent::as_xml (node); - node->add_child("AudioChannels")->add_child_text (lexical_cast<string> (audio_channels ())); - node->add_child("AudioLength")->add_child_text (lexical_cast<string> (audio_length ())); - node->add_child("AudioFrameRate")->add_child_text (lexical_cast<string> (content_audio_frame_rate ())); + node->add_child("AudioChannels")->add_child_text (raw_convert<string> (audio_channels ())); + node->add_child("AudioLength")->add_child_text (raw_convert<string> (audio_length ())); + node->add_child("AudioFrameRate")->add_child_text (raw_convert<string> (content_audio_frame_rate ())); _audio_mapping.as_xml (node->add_child("AudioMapping")); } |
