X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fresampler.h;h=e53e3f1070f05096efadf024d3bd340e096a0c2f;hb=f5c1d56e9a15975f587a8d9c5255aea608d8abe9;hp=9e9304fb421c7d46ca529702c635a09c67133ed1;hpb=0a2fe723109c6a8fbb61ea5721b5a475e4b480d0;p=dcpomatic.git diff --git a/src/lib/resampler.h b/src/lib/resampler.h index 9e9304fb4..e53e3f107 100644 --- a/src/lib/resampler.h +++ b/src/lib/resampler.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington + Copyright (C) 2013-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,29 +18,35 @@ */ -#include "types.h" + #include -#include -#include +#include + class AudioBuffers; -class Resampler : public boost::noncopyable + +class Resampler { public: Resampler (int, int, int); ~Resampler (); - std::pair, Frame> run (boost::shared_ptr, Frame); - std::pair, Frame> flush (); + Resampler (Resampler const&) = delete; + Resampler& operator= (Resampler const&) = delete; + + std::shared_ptr run (std::shared_ptr); + std::shared_ptr flush (); void reset (); void set_fast (); + int channels() const { + return _channels; + } + private: - SRC_STATE* _src; + SRC_STATE* _src = nullptr; int _in_rate; int _out_rate; int _channels; - boost::optional _next_in; - boost::optional _next_out; };