shithub: aubio

Download patch

ref: 0683ee200bed4b17abe35f593daa216aa9ce4775
parent: 45989463296ac74bd151affc216eeb83a93c919e
author: Paul Brossier <piem@piem.org>
date: Wed Sep 2 07:38:31 EDT 2015

src/*.h: remove trailing spaces, update copyrights

--- a/src/aubio_priv.h
+++ b/src/aubio_priv.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
@@ -20,7 +20,7 @@
 
 /** @file
  * Private include file
- * 
+ *
  * This file is for inclusion from _within_ the library only.
  */
 
@@ -29,7 +29,7 @@
 
 /*********************
  *
- * External includes 
+ * External includes
  *
  */
 
@@ -71,7 +71,7 @@
 #include "mathutils.h"
 
 /****
- * 
+ *
  * SYSTEM INTERFACE
  *
  */
--- a/src/cvec.h
+++ b/src/cvec.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
--- a/src/fmat.h
+++ b/src/fmat.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009-2013 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2009-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
@@ -62,7 +62,7 @@
 
   \param s vector to read from
   \param channel channel to read from
-  \param position sample position to read from 
+  \param position sample position to read from
 
 */
 smpl_t fmat_get_sample(fmat_t *s, uint_t channel, uint_t position);
@@ -69,10 +69,10 @@
 
 /** write sample value in a buffer
 
-  \param s vector to write to 
+  \param s vector to write to
   \param data value to write in s->data[channel][position]
-  \param channel channel to write to 
-  \param position sample position to write to 
+  \param channel channel to write to
+  \param position sample position to write to
 
 */
 void  fmat_set_sample(fmat_t *s, smpl_t data, uint_t channel, uint_t position);
@@ -101,9 +101,9 @@
 */
 smpl_t ** fmat_get_data(fmat_t *s);
 
-/** print out fmat data 
+/** print out fmat data
 
-  \param s vector to print out 
+  \param s vector to print out
 
 */
 void fmat_print(fmat_t *s);
@@ -116,7 +116,7 @@
 */
 void fmat_set(fmat_t *s, smpl_t val);
 
-/** set all elements to zero 
+/** set all elements to zero
 
   \param s vector to modify
 
@@ -123,7 +123,7 @@
 */
 void fmat_zeros(fmat_t *s);
 
-/** set all elements to ones 
+/** set all elements to ones
 
   \param s vector to modify
 
@@ -148,7 +148,7 @@
 */
 void fmat_weight(fmat_t *s, fmat_t *weight);
 
-/** make a copy of a matrix 
+/** make a copy of a matrix
 
   \param s source vector
   \param t vector to copy to
--- a/src/fvec.h
+++ b/src/fvec.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
@@ -86,7 +86,7 @@
 /** read sample value in a buffer
 
   \param s vector to read from
-  \param position sample position to read from 
+  \param position sample position to read from
 
 */
 smpl_t fvec_get_sample(fvec_t *s, uint_t position);
@@ -93,9 +93,9 @@
 
 /** write sample value in a buffer
 
-  \param s vector to write to 
+  \param s vector to write to
   \param data value to write in s->data[position]
-  \param position sample position to write to 
+  \param position sample position to write to
 
 */
 void  fvec_set_sample(fvec_t *s, smpl_t data, uint_t position);
@@ -107,9 +107,9 @@
 */
 smpl_t * fvec_get_data(fvec_t *s);
 
-/** print out fvec data 
+/** print out fvec data
 
-  \param s vector to print out 
+  \param s vector to print out
 
 */
 void fvec_print(fvec_t *s);
@@ -122,7 +122,7 @@
 */
 void fvec_set_all (fvec_t *s, smpl_t val);
 
-/** set all elements to zero 
+/** set all elements to zero
 
   \param s vector to modify
 
@@ -129,7 +129,7 @@
 */
 void fvec_zeros(fvec_t *s);
 
-/** set all elements to ones 
+/** set all elements to ones
 
   \param s vector to modify
 
--- a/src/lvec.h
+++ b/src/lvec.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
@@ -61,7 +61,7 @@
 /** read sample value in a buffer
 
   \param s vector to read from
-  \param position sample position to read from 
+  \param position sample position to read from
 
 */
 lsmp_t lvec_get_sample(lvec_t *s, uint_t position);
@@ -68,9 +68,9 @@
 
 /** write sample value in a buffer
 
-  \param s vector to write to 
+  \param s vector to write to
   \param data value to write in s->data[position]
-  \param position sample position to write to 
+  \param position sample position to write to
 
 */
 void  lvec_set_sample(lvec_t *s, lsmp_t data, uint_t position);
@@ -82,9 +82,9 @@
 */
 lsmp_t * lvec_get_data(lvec_t *s);
 
-/** print out lvec data 
+/** print out lvec data
 
-  \param s vector to print out 
+  \param s vector to print out
 
 */
 void lvec_print(lvec_t *s);
@@ -97,7 +97,7 @@
 */
 void lvec_set_all(lvec_t *s, smpl_t val);
 
-/** set all elements to zero 
+/** set all elements to zero
 
   \param s vector to modify
 
@@ -104,7 +104,7 @@
 */
 void lvec_zeros(lvec_t *s);
 
-/** set all elements to ones 
+/** set all elements to ones
 
   \param s vector to modify
 
--- a/src/mathutils.h
+++ b/src/mathutils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2003-2014 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
@@ -82,20 +82,20 @@
 uint_t fvec_max_elem (fvec_t * s);
 
 /** swap the left and right halves of a vector
-  
+
   This function swaps the left part of the signal with the right part of the
 signal. Therefore
 
   \f$ a[0], a[1], ..., a[\frac{N}{2}], a[\frac{N}{2}+1], ..., a[N-1], a[N] \f$
-  
+
   becomes
-  
+
   \f$ a[\frac{N}{2}+1], ..., a[N-1], a[N], a[0], a[1], ..., a[\frac{N}{2}] \f$
 
   This operation, known as 'fftshift' in the Matlab Signal Processing Toolbox,
 can be used before computing the FFT to simplify the phase relationship of the
 resulting spectrum. See Amalia de Götzen's paper referred to above.
-  
+
 */
 void fvec_shift (fvec_t * v);
 
@@ -111,20 +111,20 @@
 /** compute the High Frequency Content of a vector
 
   The High Frequency Content is defined as \f$ \sum_0^{N-1} (k+1) v[k] \f$.
- 
-  \param v vector to get the energy from 
 
+  \param v vector to get the energy from
+
   \return the HFC of v
- 
+
 */
 smpl_t fvec_local_hfc (fvec_t * v);
 
-/** computes the p-norm of a vector 
- 
+/** computes the p-norm of a vector
+
   Computes the p-norm of a vector for \f$ p = \alpha \f$
 
   \f$ L^p = ||x||_p = (|x_1|^p + |x_2|^p + ... + |x_n|^p ) ^ \frac{1}{p} \f$
-  
+
   If p = 1, the result is the Manhattan distance.
 
   If p = 2, the result is the Euclidean distance.
@@ -133,7 +133,7 @@
 input vector.
 
   References:
-  
+
     - <a href="http://en.wikipedia.org/wiki/Lp_space">\f$L^p\f$ space</a> on
   Wikipedia
 
@@ -141,13 +141,13 @@
   \param p order of the computed norm
 
   \return the p-norm of v
- 
+
 */
 smpl_t fvec_alpha_norm (fvec_t * v, smpl_t p);
 
 /**  alpha normalisation
 
-  This function divides all elements of a vector by the p-norm as computed by 
+  This function divides all elements of a vector by the p-norm as computed by
 fvec_alpha_norm().
 
   \param v vector to compute norm from
@@ -165,7 +165,7 @@
 void fvec_add (fvec_t * v, smpl_t c);
 
 /** remove the minimum value of the vector to each elements
-  
+
   \param v vector to remove minimum from
 
 */
@@ -176,14 +176,14 @@
   This function computes the moving median threshold value of at the given
 position of a vector, taking the median among post elements before and up to
 pre elements after pos.
- 
+
   \param v input vector
   \param tmp temporary vector of length post+1+pre
-  \param post length of causal part to take before pos 
+  \param post length of causal part to take before pos
   \param pre length of anti-causal part to take after pos
-  \param pos index to compute threshold for 
+  \param pos index to compute threshold for
 
-  \return moving median threshold value 
+  \return moving median threshold value
 
 */
 smpl_t fvec_moving_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre,
@@ -196,13 +196,13 @@
 
   \param v input vector
   \param tmp temporary vector of length post+1+pre
-  \param post length of causal part to take before pos 
+  \param post length of causal part to take before pos
   \param pre length of anti-causal part to take after pos
 
 */
 void fvec_adapt_thres (fvec_t * v, fvec_t * tmp, uint_t post, uint_t pre);
 
-/** returns the median of a vector 
+/** returns the median of a vector
 
   The QuickSelect routine is based on the algorithm described in "Numerical
 recipes in C", Second Edition, Cambridge University Press, 1992, Section 8.5,
@@ -215,7 +215,7 @@
   \param v vector to get median from
 
   \return the median of v
- 
+
 */
 smpl_t fvec_median (fvec_t * v);
 
@@ -248,13 +248,13 @@
 smpl_t fvec_quadratic_peak_mag (fvec_t * x, smpl_t p);
 
 /** Quadratic interpolation using Lagrange polynomial.
- 
+
   Inspired from ``Comparison of interpolation algorithms in real-time sound
-processing'', Vladimir Arnost, 
-  
-  \param s0,s1,s2 are 3 consecutive samples of a curve 
+processing'', Vladimir Arnost,
+
+  \param s0,s1,s2 are 3 consecutive samples of a curve
   \param pf is the floating point index [0;2]
- 
+
   \return \f$ s0 + (pf/2.)*((pf-3.)*s0-2.*(pf-2.)*s1+(pf-1.)*s2); \f$
 
 */
--- a/src/musicutils.h
+++ b/src/musicutils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
@@ -29,11 +29,11 @@
 extern "C" {
 #endif
 
-/** create window 
+/** create window
 
   \param window_type type of the window to create
   \param size length of the window to create (see fvec_set_window())
- 
+
 */
 fvec_t *new_aubio_window (char_t * window_type, uint_t size);
 
@@ -49,7 +49,7 @@
   "default" is equivalent to "hanningz".
 
   References:
-    
+
     - <a href="http://en.wikipedia.org/wiki/Window_function">Window
 function</a> on Wikipedia
     - Amalia de Götzen, Nicolas Bernardini, and Daniel Arfib. Traditional (?)
@@ -68,7 +68,7 @@
 range \f$ [-\pi, \pi] \f$.
 
   \param phase unwrapped phase to map to the unit circle
-  
+
   \return equivalent phase wrapped to the unit circle
 
 */
@@ -93,7 +93,7 @@
 smpl_t aubio_miditofreq (smpl_t midi);
 
 /** clean up cached memory at the end of program
- 
+
   This function should be used at the end of programs to purge all cached
   memory. So far it is only useful to clean FFTW's cache.
 
@@ -137,7 +137,7 @@
 smpl_t aubio_db_spl (fvec_t * v);
 
 /** check if buffer level in dB SPL is under a given threshold
- 
+
   \param v vector to get level from
   \param threshold threshold in dB SPL
 
--- a/src/types.h
+++ b/src/types.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.
 
@@ -22,9 +22,9 @@
 #define _AUBIO__TYPES_H
 
 /** \file
- 
+
   Definition of data types used in aubio
- 
+
 */
 
 #ifdef __cplusplus
--- a/src/vecutils.h
+++ b/src/vecutils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009-2013 Paul Brossier <piem@aubio.org>
+  Copyright (C) 2009-2015 Paul Brossier <piem@aubio.org>
 
   This file is part of aubio.