summaryrefslogtreecommitdiff
path: root/src/lib/audio_analysis.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-30 15:43:14 +0100
committerCarl Hetherington <cth@carlh.net>2025-01-05 12:58:13 +0100
commitb03f2277a205ff7e7cdaa12c6e52322ea474a7af (patch)
treed6067668105b2f0c6d0651bd1b8bd4186e0b8893 /src/lib/audio_analysis.cc
parente46ff5f1cf168fb73ea930f3e8469165e5f6644e (diff)
Bump libdcp for raw_convert changes.
raw_convert<string> is gone, so here we use fmt::{to_string,format} instead. Other raw_converts now use fast_float.
Diffstat (limited to 'src/lib/audio_analysis.cc')
-rw-r--r--src/lib/audio_analysis.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/audio_analysis.cc b/src/lib/audio_analysis.cc
index ac990ee18..8375ae770 100644
--- a/src/lib/audio_analysis.cc
+++ b/src/lib/audio_analysis.cc
@@ -29,6 +29,7 @@
LIBDCP_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
LIBDCP_ENABLE_WARNINGS
+#include <fmt/format.h>
#include <boost/filesystem.hpp>
#include <stdint.h>
#include <cmath>
@@ -140,7 +141,7 @@ AudioAnalysis::write (boost::filesystem::path filename)
auto doc = make_shared<xmlpp::Document>();
auto root = doc->create_root_node("AudioAnalysis");
- cxml::add_text_child(root, "Version", raw_convert<string>(_current_state_version));
+ cxml::add_text_child(root, "Version", fmt::to_string(_current_state_version));
for (auto& i: _data) {
auto channel = cxml::add_child(root, "Channel");
@@ -151,31 +152,31 @@ AudioAnalysis::write (boost::filesystem::path filename)
for (size_t i = 0; i < _sample_peak.size(); ++i) {
auto n = cxml::add_child(root, "SamplePeak");
- n->add_child_text (raw_convert<string> (_sample_peak[i].peak));
- n->set_attribute("time", raw_convert<string> (_sample_peak[i].time.get()));
+ n->add_child_text(fmt::to_string(_sample_peak[i].peak));
+ n->set_attribute("time", fmt::to_string(_sample_peak[i].time.get()));
}
for (auto i: _true_peak) {
- cxml::add_text_child(root, "TruePeak", raw_convert<string>(i));
+ cxml::add_text_child(root, "TruePeak", fmt::to_string(i));
}
if (_integrated_loudness) {
- cxml::add_text_child(root, "IntegratedLoudness", raw_convert<string>(_integrated_loudness.get()));
+ cxml::add_text_child(root, "IntegratedLoudness", fmt::to_string(_integrated_loudness.get()));
}
if (_loudness_range) {
- cxml::add_text_child(root, "LoudnessRange", raw_convert<string>(_loudness_range.get()));
+ cxml::add_text_child(root, "LoudnessRange", fmt::to_string(_loudness_range.get()));
}
if (_analysis_gain) {
- cxml::add_text_child(root, "AnalysisGain", raw_convert<string>(_analysis_gain.get()));
+ cxml::add_text_child(root, "AnalysisGain", fmt::to_string(_analysis_gain.get()));
}
- cxml::add_text_child(root, "SamplesPerPoint", raw_convert<string>(_samples_per_point));
- cxml::add_text_child(root, "SampleRate", raw_convert<string>(_sample_rate));
+ cxml::add_text_child(root, "SamplesPerPoint", fmt::to_string(_samples_per_point));
+ cxml::add_text_child(root, "SampleRate", fmt::to_string(_sample_rate));
if (_leqm) {
- cxml::add_text_child(root, "Leqm", raw_convert<string>(*_leqm));
+ cxml::add_text_child(root, "Leqm", fmt::to_string(*_leqm));
}
doc->write_to_file_formatted (filename.string ());