From bc35d8c71b92dfb5f56a6d2f7a870812da994db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Tue, 29 Mar 2016 11:09:12 +0200 Subject: Refactored class CHResampler --- src/chresampler.h | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'src/chresampler.h') 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 #include /** @@ -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; - double input_fs; - double output_fs; + double input_fs; + double output_fs; }; - - -#endif/*__DRUMGIZMO_CHRESAMPLER_H__*/ -- cgit v1.2.3