diff options
| author | cah <cth@carlh.net> | 2025-07-10 22:47:19 +0200 |
|---|---|---|
| committer | cah <cth@carlh.net> | 2025-07-10 22:47:19 +0200 |
| commit | 4be4e97abf911e7633172ada950d107a3ed28834 (patch) | |
| tree | c9deceb5f3684fa081db0613da88264732093fcb /src/lib/resampler.cc | |
| parent | 727c1aa7da8b325dfa38c8443b1dd356acaf6ec3 (diff) | |
| parent | 42bde2d97039f6d0d645d83db90612d18ebf225a (diff) | |
Merge branch 'compose-to-fmt-take2'
This removes all uses of String::compose, replacing them with fmt and
updating the i18n strings where required.
Diffstat (limited to 'src/lib/resampler.cc')
| -rw-r--r-- | src/lib/resampler.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/resampler.cc b/src/lib/resampler.cc index 2c6594a6d..a23f771c4 100644 --- a/src/lib/resampler.cc +++ b/src/lib/resampler.cc @@ -22,7 +22,6 @@ #include "resampler.h" #include "audio_buffers.h" #include "exceptions.h" -#include "compose.hpp" #include "dcpomatic_assert.h" #include <samplerate.h> #include <iostream> @@ -51,7 +50,7 @@ Resampler::Resampler (int in, int out, int channels) int error; _src = src_new (SRC_SINC_BEST_QUALITY, _channels, &error); if (!_src) { - throw runtime_error (String::compose(N_("could not create sample-rate converter (%1)"), error)); + throw runtime_error (fmt::format(N_("could not create sample-rate converter ({})"), error)); } } @@ -73,7 +72,7 @@ Resampler::set_fast () int error; _src = src_new (SRC_LINEAR, _channels, &error); if (!_src) { - throw runtime_error (String::compose(N_("could not create sample-rate converter (%1)"), error)); + throw runtime_error (fmt::format(N_("could not create sample-rate converter ({})"), error)); } } @@ -119,8 +118,8 @@ Resampler::run (shared_ptr<const AudioBuffers> in) int const r = src_process (_src, &data); if (r) { throw EncodeError ( - String::compose ( - N_("could not run sample-rate converter (%1) [processing %2 to %3, %4 channels]"), + fmt::format( + N_("could not run sample-rate converter ({}) [processing {} to {}, {} channels]"), src_strerror (r), in_frames, max_resampled_frames, @@ -174,7 +173,7 @@ Resampler::flush () int const r = src_process (_src, &data); if (r) { - throw EncodeError (String::compose(N_("could not run sample-rate converter (%1)"), src_strerror(r))); + throw EncodeError (fmt::format(N_("could not run sample-rate converter ({})"), src_strerror(r))); } out->set_frames (out_offset + data.output_frames_gen); |
