X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fresampler.h;h=95b71c222e814570a8f1a5bc6cf92bfb7244df5f;hb=7108fbbd446f7e895460e64a3e789f4665c90b0b;hp=9d620b96282ecba02139414fa5612a5d070d7d3e;hpb=dc78a40b0c7ce4569874fd1e77a86df907937d50;p=dcpomatic.git diff --git a/src/lib/resampler.h b/src/lib/resampler.h index 9d620b962..95b71c222 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,28 +18,31 @@ */ -#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 (); private: - SRC_STATE* _src; + SRC_STATE* _src = nullptr; int _in_rate; int _out_rate; int _channels; - boost::optional _next_in; - boost::optional _next_out; };