summaryrefslogtreecommitdiff
path: root/src/lib/resampler.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-06-26 01:21:21 +0100
committerCarl Hetherington <cth@carlh.net>2013-06-26 17:04:31 +0100
commit09a9ac376db005a40a351736bcff4077f098825d (patch)
tree64ea69741155d15d114ad96daf0f90e24b3abe28 /src/lib/resampler.h
parent46cd0fe7b5b514f0d9456b25f670679cc584a218 (diff)
Another try at sorting out the thorny question of timing.
Diffstat (limited to 'src/lib/resampler.h')
-rw-r--r--src/lib/resampler.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/resampler.h b/src/lib/resampler.h
new file mode 100644
index 000000000..cda718934
--- /dev/null
+++ b/src/lib/resampler.h
@@ -0,0 +1,21 @@
+#include <boost/shared_ptr.hpp>
+extern "C" {
+#include <libswresample/swresample.h>
+}
+
+class AudioBuffers;
+
+class Resampler
+{
+public:
+ Resampler (int, int, int);
+ ~Resampler ();
+
+ boost::shared_ptr<const AudioBuffers> run (boost::shared_ptr<const AudioBuffers>);
+
+private:
+ SwrContext* _swr_context;
+ int _in_rate;
+ int _out_rate;
+ int _channels;
+};