/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#include "types.h"
#include <samplerate.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
+
class AudioBuffers;
-class Resampler : public boost::noncopyable
+
+class Resampler
{
public:
Resampler (int, int, int);
~Resampler ();
- std::pair<boost::shared_ptr<const AudioBuffers>, Frame> run (boost::shared_ptr<const AudioBuffers>, Frame);
- boost::shared_ptr<const AudioBuffers> flush ();
+ Resampler (Resampler const&) = delete;
+ Resampler& operator= (Resampler const&) = delete;
+
+ std::shared_ptr<const AudioBuffers> run (std::shared_ptr<const AudioBuffers>);
+ std::shared_ptr<const AudioBuffers> flush ();
+ void reset ();
void set_fast ();
private:
- SRC_STATE* _src;
+ SRC_STATE* _src = nullptr;
int _in_rate;
int _out_rate;
int _channels;
- boost::optional<Frame> _next_in;
- boost::optional<Frame> _next_out;
};