changeset 53:338f5eb29e41

Small syntax change for array arguments so they are pointers rather than array[]. Just personal preference.
author Adam Stark <adamstark@users.noreply.github.com>
date Wed, 22 Jan 2014 01:34:04 +0000
parents 45231107c9d6
children 9699024bb3d0
files src/BTrack.cpp src/BTrack.h src/OnsetDetectionFunction.cpp src/OnsetDetectionFunction.h
diffstat 4 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/BTrack.cpp	Wed Jan 22 01:13:45 2014 +0000
+++ b/src/BTrack.cpp	Wed Jan 22 01:34:04 2014 +0000
@@ -368,7 +368,7 @@
 }
 
 //=======================================================================
-void BTrack :: adapt_thresh(float x[],int N)
+void BTrack :: adapt_thresh(float *x,int N)
 {
 	//int N = 512; // length of df
 	int i = 0;
@@ -434,7 +434,7 @@
 }
 
 //=======================================================================
-void BTrack :: acf_bal(float df_thresh[])
+void BTrack :: acf_bal(float *df_thresh)
 {
 	int l, n = 0;
 	float sum, tmp;
@@ -456,7 +456,7 @@
 }
 
 //=======================================================================
-float BTrack :: mean_array(float array[],int start,int end)
+float BTrack :: mean_array(float *array,int start,int end)
 {
 	int i;
 	double sum = 0;
@@ -480,7 +480,7 @@
 }
 
 //=======================================================================
-void BTrack :: normalise(float array[],int N)
+void BTrack :: normalise(float *array,int N)
 {
 	double sum = 0;
 	
--- a/src/BTrack.h	Wed Jan 22 01:13:45 2014 +0000
+++ b/src/BTrack.h	Wed Jan 22 01:34:04 2014 +0000
@@ -68,16 +68,16 @@
     /** calculates an adaptive threshold which is used to remove low level energy from detection 
      * function and emphasise peaks 
      */
-	void adapt_thresh(float x[],int N);
+	void adapt_thresh(float *x,int N);
     
     /** calculates the mean of values in an array from index locations [start,end] */
-	float mean_array(float array[],int start,int end);
+	float mean_array(float *array,int start,int end);
     
     /** normalises a given array */
-	void normalise(float array[],int N);
+	void normalise(float *array,int N);
     
     /** calculates the balanced autocorrelation of the smoothed detection function */
-	void acf_bal(float df_thresh[]);
+	void acf_bal(float *df_thresh);
     
     /** returns the output of the comb filter */
 	void getrcfoutput();
--- a/src/OnsetDetectionFunction.cpp	Wed Jan 22 01:13:45 2014 +0000
+++ b/src/OnsetDetectionFunction.cpp	Wed Jan 22 01:34:04 2014 +0000
@@ -168,7 +168,7 @@
 }
 
 //=======================================================================
-double OnsetDetectionFunction :: getDFsample(double inputbuffer[])
+double OnsetDetectionFunction :: getDFsample(double *inputbuffer)
 {	
 	double df_sample;
 		
--- a/src/OnsetDetectionFunction.h	Wed Jan 22 01:13:45 2014 +0000
+++ b/src/OnsetDetectionFunction.h	Wed Jan 22 01:34:04 2014 +0000
@@ -38,7 +38,7 @@
 	void initialise(int arg_hsize,int arg_fsize,int arg_df_type,int arg_win_type);
 	
     /** process input buffer and calculate detection function sample */
-	double getDFsample(double inputbuffer[]);
+	double getDFsample(double *inputbuffer);
     
     /** set the detection function type */
 	void set_df_type(int arg_df_type);