From b03f2277a205ff7e7cdaa12c6e52322ea474a7af Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 30 Dec 2024 15:43:14 +0100 Subject: Bump libdcp for raw_convert changes. raw_convert is gone, so here we use fmt::{to_string,format} instead. Other raw_converts now use fast_float. --- src/lib/audio_analysis.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/lib/audio_analysis.cc') 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 LIBDCP_ENABLE_WARNINGS +#include #include #include #include @@ -140,7 +141,7 @@ AudioAnalysis::write (boost::filesystem::path filename) auto doc = make_shared(); auto root = doc->create_root_node("AudioAnalysis"); - cxml::add_text_child(root, "Version", raw_convert(_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 (_sample_peak[i].peak)); - n->set_attribute("time", raw_convert (_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(i)); + cxml::add_text_child(root, "TruePeak", fmt::to_string(i)); } if (_integrated_loudness) { - cxml::add_text_child(root, "IntegratedLoudness", raw_convert(_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(_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(_analysis_gain.get())); + cxml::add_text_child(root, "AnalysisGain", fmt::to_string(_analysis_gain.get())); } - cxml::add_text_child(root, "SamplesPerPoint", raw_convert(_samples_per_point)); - cxml::add_text_child(root, "SampleRate", raw_convert(_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(*_leqm)); + cxml::add_text_child(root, "Leqm", fmt::to_string(*_leqm)); } doc->write_to_file_formatted (filename.string ()); -- cgit v1.2.3