projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use dcp::compose rather than our own.
[dcpomatic.git]
/
src
/
lib
/
resampler.cc
diff --git
a/src/lib/resampler.cc
b/src/lib/resampler.cc
index 056b2e1ee5c6416e779c7062f48346a858d77923..30164ca21914b8cff27af280de8aa1f2ed66827c 100644
(file)
--- a/
src/lib/resampler.cc
+++ b/
src/lib/resampler.cc
@@
-22,8
+22,8
@@
#include "resampler.h"
#include "audio_buffers.h"
#include "exceptions.h"
#include "resampler.h"
#include "audio_buffers.h"
#include "exceptions.h"
-#include "compose.hpp"
#include "dcpomatic_assert.h"
#include "dcpomatic_assert.h"
+#include <dcp/compose.h>
#include <samplerate.h>
#include <iostream>
#include <cmath>
#include <samplerate.h>
#include <iostream>
#include <cmath>
@@
-51,7
+51,7
@@
Resampler::Resampler (int in, int out, int channels)
int error;
_src = src_new (SRC_SINC_BEST_QUALITY, _channels, &error);
if (!_src) {
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 (
dcp
::compose(N_("could not create sample-rate converter (%1)"), error));
}
}
}
}
@@
-73,7
+73,7
@@
Resampler::set_fast ()
int error;
_src = src_new (SRC_LINEAR, _channels, &error);
if (!_src) {
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 (
dcp
::compose(N_("could not create sample-rate converter (%1)"), error));
}
}
}
}
@@
-117,7
+117,7
@@
Resampler::run (shared_ptr<const AudioBuffers> in)
int const r = src_process (_src, &data);
if (r) {
throw EncodeError (
int const r = src_process (_src, &data);
if (r) {
throw EncodeError (
-
String
::compose (
+
dcp
::compose (
N_("could not run sample-rate converter (%1) [processing %2 to %3, %4 channels]"),
src_strerror (r),
in_frames,
N_("could not run sample-rate converter (%1) [processing %2 to %3, %4 channels]"),
src_strerror (r),
in_frames,
@@
-173,7
+173,7
@@
Resampler::flush ()
int const r = src_process (_src, &data);
if (r) {
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 (
dcp
::compose(N_("could not run sample-rate converter (%1)"), src_strerror(r)));
}
out->ensure_size (out_offset + data.output_frames_gen);
}
out->ensure_size (out_offset + data.output_frames_gen);