diff base/Resampler.h @ 1038:cc27f35aa75c cxx11

Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author Chris Cannam
date Tue, 03 Mar 2015 15:18:24 +0000
parents 6a94bb528e9d
children
line wrap: on
line diff
--- a/base/Resampler.h	Tue Mar 03 09:33:59 2015 +0000
+++ b/base/Resampler.h	Tue Mar 03 15:18:24 2015 +0000
@@ -21,6 +21,8 @@
 #ifndef _RESAMPLER_H_
 #define _RESAMPLER_H_
 
+#include "BaseTypes.h"
+
 #include <sys/types.h>
 
 class Resampler
@@ -28,16 +30,16 @@
 public:
     enum Quality { Best, FastestTolerable, Fastest };
 
-    Resampler(Quality quality, int channels, int chunkSize = 0);
+    Resampler(Quality quality, int channels, sv_frame_t chunkSize = 0);
     ~Resampler();
 
-    int resample(float **in, float **out,
-                    int incount, float ratio,
-                    bool final = false);
+    sv_frame_t resample(float **in, float **out,
+                        sv_frame_t incount, double ratio,
+                        bool final = false);
 
-    int resampleInterleaved(float *in, float *out,
-                               int incount, float ratio,
-                               bool final = false);
+    sv_frame_t resampleInterleaved(float *in, float *out,
+                                   sv_frame_t incount, double ratio,
+                                   bool final = false);
 
     void reset();