diff options
author | Christian Glöckner <cgloeckner@freenet.de> | 2016-03-29 11:09:12 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2016-03-31 17:35:47 +0200 |
commit | bc35d8c71b92dfb5f56a6d2f7a870812da994db6 (patch) | |
tree | 56fb21f591032151cab720d5c6407d4ce8028223 /src/chresampler.h | |
parent | 94d33d51ee136d88a2d81bfce47efd2836e845d0 (diff) |
Refactored class CHResampler
Diffstat (limited to 'src/chresampler.h')
-rw-r--r-- | src/chresampler.h | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/chresampler.h b/src/chresampler.h index ae6cb3b..cd5d571 100644 --- a/src/chresampler.h +++ b/src/chresampler.h @@ -24,9 +24,9 @@ * along with DrumGizmo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __DRUMGIZMO_CHRESAMPLER_H__ -#define __DRUMGIZMO_CHRESAMPLER_H__ +#pragma once +#include <memory> #include <stdlib.h> /** @@ -36,30 +36,28 @@ * If WITH_RESAMPLER=="zita" zita-resampler will be used. * If WITH_RESAMPLER=="src" Secret Rabbit Code will be used. */ -class CHResampler { +class CHResampler +{ public: - CHResampler(); - ~CHResampler(); + CHResampler(); + ~CHResampler(); - void setup(double input_fs, double output_fs); + void setup(double input_fs, double output_fs); - void setInputSamples(float *samples, size_t count); - void setOutputSamples(float *samples, size_t count); + void setInputSamples(float* samples, size_t count); + void setOutputSamples(float* samples, size_t count); - void process(); + void process(); - size_t getInputSampleCount(); - size_t getOutputSampleCount(); + size_t getInputSampleCount() const; + size_t getOutputSampleCount() const; - double ratio(); + double getRatio() const; private: - class Prv; - Prv *prv; + class Prv; + std::unique_ptr<Prv> prv; - double input_fs; - double output_fs; + double input_fs; + double output_fs; }; - - -#endif/*__DRUMGIZMO_CHRESAMPLER_H__*/ |