Index: src/spectral/fft.c
===================================================================
--- src/spectral/fft.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/fft.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -231,15 +231,15 @@
 }
 
-void aubio_fft_do(aubio_fft_t * s, fvec_t * input, cvec_t * spectrum) {
+void aubio_fft_do(aubio_fft_t * s, const fvec_t * input, cvec_t * spectrum) {
   aubio_fft_do_complex(s, input, s->compspec);
   aubio_fft_get_spectrum(s->compspec, spectrum);
 }
 
-void aubio_fft_rdo(aubio_fft_t * s, cvec_t * spectrum, fvec_t * output) {
+void aubio_fft_rdo(aubio_fft_t * s, const cvec_t * spectrum, fvec_t * output) {
   aubio_fft_get_realimag(spectrum, s->compspec);
   aubio_fft_rdo_complex(s, s->compspec, output);
 }
 
-void aubio_fft_do_complex(aubio_fft_t * s, fvec_t * input, fvec_t * compspec) {
+void aubio_fft_do_complex(aubio_fft_t * s, const fvec_t * input, fvec_t * compspec) {
   uint_t i;
 #ifndef HAVE_MEMCPY_HACKS
@@ -292,5 +292,5 @@
 }
 
-void aubio_fft_rdo_complex(aubio_fft_t * s, fvec_t * compspec, fvec_t * output) {
+void aubio_fft_rdo_complex(aubio_fft_t * s, const fvec_t * compspec, fvec_t * output) {
   uint_t i;
 #ifdef HAVE_FFTW3
@@ -347,15 +347,15 @@
 }
 
-void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum) {
+void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum) {
   aubio_fft_get_phas(compspec, spectrum);
   aubio_fft_get_norm(compspec, spectrum);
 }
 
-void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec) {
+void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec) {
   aubio_fft_get_imag(spectrum, compspec);
   aubio_fft_get_real(spectrum, compspec);
 }
 
-void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum) {
+void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum) {
   uint_t i;
   if (compspec->data[0] < 0) {
@@ -375,5 +375,5 @@
 }
 
-void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum) {
+void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum) {
   uint_t i = 0;
   spectrum->norm[0] = ABS(compspec->data[0]);
@@ -386,5 +386,5 @@
 }
 
-void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec) {
+void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec) {
   uint_t i;
   for (i = 1; i < ( compspec->length + 1 ) / 2 /*- 1 + 1*/; i++) {
@@ -394,5 +394,5 @@
 }
 
-void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec) {
+void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec) {
   uint_t i;
   for (i = 0; i < compspec->length / 2 + 1; i++) {
Index: src/spectral/fft.h
===================================================================
--- src/spectral/fft.h	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/fft.h	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -66,5 +66,5 @@
 
 */
-void aubio_fft_do (aubio_fft_t *s, fvec_t * input, cvec_t * spectrum);
+void aubio_fft_do (aubio_fft_t *s, const fvec_t * input, cvec_t * spectrum);
 /** compute backward (inverse) FFT
 
@@ -74,5 +74,5 @@
 
 */
-void aubio_fft_rdo (aubio_fft_t *s, cvec_t * spectrum, fvec_t * output);
+void aubio_fft_rdo (aubio_fft_t *s, const cvec_t * spectrum, fvec_t * output);
 
 /** compute forward FFT
@@ -83,5 +83,5 @@
 
 */
-void aubio_fft_do_complex (aubio_fft_t *s, fvec_t * input, fvec_t * compspec);
+void aubio_fft_do_complex (aubio_fft_t *s, const fvec_t * input, fvec_t * compspec);
 /** compute backward (inverse) FFT from real/imag
 
@@ -91,5 +91,5 @@
 
 */
-void aubio_fft_rdo_complex (aubio_fft_t *s, fvec_t * compspec, fvec_t * output);
+void aubio_fft_rdo_complex (aubio_fft_t *s, const fvec_t * compspec, fvec_t * output);
 
 /** convert real/imag spectrum to norm/phas spectrum
@@ -99,5 +99,5 @@
 
 */
-void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum);
 /** convert real/imag spectrum to norm/phas spectrum
 
@@ -106,5 +106,5 @@
 
 */
-void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec);
 
 /** compute phas spectrum from real/imag parts
@@ -114,5 +114,5 @@
 
 */
-void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum);
 /** compute imaginary part from the norm/phas cvec
 
@@ -121,5 +121,5 @@
 
 */
-void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec);
 
 /** compute norm component from real/imag parts
@@ -129,5 +129,5 @@
 
 */
-void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum);
+void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum);
 /** compute real part from norm/phas components
 
@@ -136,5 +136,5 @@
 
 */
-void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec);
+void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec);
 
 #ifdef __cplusplus
Index: src/spectral/filterbank.c
===================================================================
--- src/spectral/filterbank.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/filterbank.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -57,5 +57,5 @@
 
 void
-aubio_filterbank_do (aubio_filterbank_t * f, cvec_t * in, fvec_t * out)
+aubio_filterbank_do (aubio_filterbank_t * f, const cvec_t * in, fvec_t * out)
 {
   /* apply filter to all input channel, provided out has enough channels */
@@ -74,5 +74,5 @@
 
 fmat_t *
-aubio_filterbank_get_coeffs (aubio_filterbank_t * f)
+aubio_filterbank_get_coeffs (const aubio_filterbank_t * f)
 {
   return f->filters;
@@ -80,5 +80,5 @@
 
 uint_t
-aubio_filterbank_set_coeffs (aubio_filterbank_t * f, fmat_t * filter_coeffs)
+aubio_filterbank_set_coeffs (aubio_filterbank_t * f, const fmat_t * filter_coeffs)
 {
   fmat_copy(filter_coeffs, f->filters);
Index: src/spectral/filterbank.h
===================================================================
--- src/spectral/filterbank.h	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/filterbank.h	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -67,5 +67,5 @@
 
 */
-void aubio_filterbank_do (aubio_filterbank_t * f, cvec_t * in, fvec_t * out);
+void aubio_filterbank_do (aubio_filterbank_t * f, const cvec_t * in, fvec_t * out);
 
 /** return a pointer to the matrix object containing all filter coefficients
@@ -74,5 +74,5 @@
 
  */
-fmat_t *aubio_filterbank_get_coeffs (aubio_filterbank_t * f);
+fmat_t *aubio_filterbank_get_coeffs (const aubio_filterbank_t * f);
 
 /** copy filter coefficients to the filterbank
@@ -82,5 +82,5 @@
 
  */
-uint_t aubio_filterbank_set_coeffs (aubio_filterbank_t * f, fmat_t * filters);
+uint_t aubio_filterbank_set_coeffs (aubio_filterbank_t * f, const fmat_t * filters);
 
 #ifdef __cplusplus
Index: src/spectral/filterbank_mel.c
===================================================================
--- src/spectral/filterbank_mel.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/filterbank_mel.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -30,5 +30,5 @@
 uint_t
 aubio_filterbank_set_triangle_bands (aubio_filterbank_t * fb,
-    fvec_t * freqs, smpl_t samplerate)
+    const fvec_t * freqs, smpl_t samplerate)
 {
 
Index: src/spectral/filterbank_mel.h
===================================================================
--- src/spectral/filterbank_mel.h	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/filterbank_mel.h	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -51,5 +51,5 @@
 */
 uint_t aubio_filterbank_set_triangle_bands (aubio_filterbank_t * fb,
-    fvec_t * freqs, smpl_t samplerate);
+    const fvec_t * freqs, smpl_t samplerate);
 
 /** filterbank initialization for Mel filters using Slaney's coefficients
Index: src/spectral/mfcc.c
===================================================================
--- src/spectral/mfcc.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/mfcc.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -101,5 +101,5 @@
 
 void
-aubio_mfcc_do (aubio_mfcc_t * mf, cvec_t * in, fvec_t * out)
+aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out)
 {
   /* compute filterbank */
Index: src/spectral/mfcc.h
===================================================================
--- src/spectral/mfcc.h	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/mfcc.h	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -71,5 +71,5 @@
 
 */
-void aubio_mfcc_do (aubio_mfcc_t * mf, cvec_t * in, fvec_t * out);
+void aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out);
 
 #ifdef __cplusplus
Index: src/spectral/phasevoc.c
===================================================================
--- src/spectral/phasevoc.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/phasevoc.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -45,10 +45,10 @@
 
 /** returns data and dataold slided by hop_s */
-static void aubio_pvoc_swapbuffers(aubio_pvoc_t *pv, fvec_t *new);
+static void aubio_pvoc_swapbuffers(aubio_pvoc_t *pv, const fvec_t *new);
 
 /** do additive synthesis from 'old' and 'cur' */
 static void aubio_pvoc_addsynth(aubio_pvoc_t *pv, fvec_t * synthnew);
 
-void aubio_pvoc_do(aubio_pvoc_t *pv, fvec_t * datanew, cvec_t *fftgrain) {
+void aubio_pvoc_do(aubio_pvoc_t *pv, const fvec_t * datanew, cvec_t *fftgrain) {
   /* slide  */
   aubio_pvoc_swapbuffers(pv, datanew);
@@ -137,5 +137,5 @@
 }
 
-static void aubio_pvoc_swapbuffers(aubio_pvoc_t *pv, fvec_t *new)
+static void aubio_pvoc_swapbuffers(aubio_pvoc_t *pv, const fvec_t *new)
 {
   /* some convenience pointers */
Index: src/spectral/phasevoc.h
===================================================================
--- src/spectral/phasevoc.h	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/phasevoc.h	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -68,5 +68,5 @@
 
 */
-void aubio_pvoc_do(aubio_pvoc_t *pv, fvec_t *in, cvec_t * fftgrain);
+void aubio_pvoc_do(aubio_pvoc_t *pv, const fvec_t *in, cvec_t * fftgrain);
 /** compute signal from spectral frame
 
Index: src/spectral/specdesc.c
===================================================================
--- src/spectral/specdesc.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/specdesc.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -27,26 +27,26 @@
 #include "utils/hist.h"
 
-void aubio_specdesc_energy(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-void aubio_specdesc_hfc(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-void aubio_specdesc_complex(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-void aubio_specdesc_phase(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-void aubio_specdesc_specdiff(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-void aubio_specdesc_kl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-void aubio_specdesc_mkl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-void aubio_specdesc_specflux(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset);
-
-extern void aubio_specdesc_centroid (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-extern void aubio_specdesc_spread (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-extern void aubio_specdesc_skewness (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-extern void aubio_specdesc_kurtosis (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-extern void aubio_specdesc_slope (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-extern void aubio_specdesc_decrease (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-extern void aubio_specdesc_rolloff (aubio_specdesc_t * o, cvec_t * spec,
+void aubio_specdesc_energy(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+void aubio_specdesc_hfc(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+void aubio_specdesc_complex(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+void aubio_specdesc_phase(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+void aubio_specdesc_specdiff(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+void aubio_specdesc_kl(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+void aubio_specdesc_mkl(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+void aubio_specdesc_specflux(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
+
+extern void aubio_specdesc_centroid (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+extern void aubio_specdesc_spread (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+extern void aubio_specdesc_skewness (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+extern void aubio_specdesc_kurtosis (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+extern void aubio_specdesc_slope (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+extern void aubio_specdesc_decrease (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+extern void aubio_specdesc_rolloff (aubio_specdesc_t * o, const cvec_t * spec,
     fvec_t * desc);
 
@@ -76,5 +76,5 @@
   /** Pointer to aubio_specdesc_<type> function */
   void (*funcpointer)(aubio_specdesc_t *o,
-      cvec_t * fftgrain, fvec_t * onset);
+      const cvec_t * fftgrain, fvec_t * onset);
   smpl_t threshold;      /**< minimum norm threshold for phase and specdiff */
   fvec_t *oldmag;        /**< previous norm vector */
@@ -88,5 +88,5 @@
 /* Energy based onset detection function */
 void aubio_specdesc_energy  (aubio_specdesc_t *o UNUSED,
-    cvec_t * fftgrain, fvec_t * onset) {
+    const cvec_t * fftgrain, fvec_t * onset) {
   uint_t j;
   onset->data[0] = 0.;
@@ -98,5 +98,5 @@
 /* High Frequency Content onset detection function */
 void aubio_specdesc_hfc(aubio_specdesc_t *o UNUSED,
-    cvec_t * fftgrain, fvec_t * onset){
+    const cvec_t * fftgrain, fvec_t * onset){
   uint_t j;
   onset->data[0] = 0.;
@@ -108,5 +108,5 @@
 
 /* Complex Domain Method onset detection function */
-void aubio_specdesc_complex (aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset) {
+void aubio_specdesc_complex (aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset) {
   uint_t j;
   uint_t nbins = fftgrain->length;
@@ -132,5 +132,5 @@
 /* Phase Based Method onset detection function */
 void aubio_specdesc_phase(aubio_specdesc_t *o, 
-    cvec_t * fftgrain, fvec_t * onset){
+    const cvec_t * fftgrain, fvec_t * onset){
   uint_t j;
   uint_t nbins = fftgrain->length;
@@ -162,5 +162,5 @@
 /* Spectral difference method onset detection function */
 void aubio_specdesc_specdiff(aubio_specdesc_t *o,
-    cvec_t * fftgrain, fvec_t * onset){
+    const cvec_t * fftgrain, fvec_t * onset){
   uint_t j;
   uint_t nbins = fftgrain->length;
@@ -189,5 +189,5 @@
  * note we use ln(1+Xn/(Xn-1+0.0001)) to avoid 
  * negative (1.+) and infinite values (+1.e-10) */
-void aubio_specdesc_kl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){
+void aubio_specdesc_kl(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset){
   uint_t j;
     onset->data[0] = 0.;
@@ -203,5 +203,5 @@
  * note we use ln(1+Xn/(Xn-1+0.0001)) to avoid 
  * negative (1.+) and infinite values (+1.e-10) */
-void aubio_specdesc_mkl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){
+void aubio_specdesc_mkl(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset){
   uint_t j;
     onset->data[0] = 0.;
@@ -214,5 +214,5 @@
 
 /* Spectral flux */
-void aubio_specdesc_specflux(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){ 
+void aubio_specdesc_specflux(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset){ 
   uint_t j;
   onset->data[0] = 0.;
@@ -226,5 +226,5 @@
 /* Generic function pointing to the choosen one */
 void 
-aubio_specdesc_do (aubio_specdesc_t *o, cvec_t * fftgrain, 
+aubio_specdesc_do (aubio_specdesc_t *o, const cvec_t * fftgrain, 
     fvec_t * onset) {
   o->funcpointer(o,fftgrain,onset);
@@ -235,5 +235,5 @@
  */
 aubio_specdesc_t * 
-new_aubio_specdesc (char_t * onset_mode, uint_t size){
+new_aubio_specdesc (const char_t * onset_mode, uint_t size){
   aubio_specdesc_t * o = AUBIO_NEW(aubio_specdesc_t);
   uint_t rsize = size/2+1;
Index: src/spectral/specdesc.h
===================================================================
--- src/spectral/specdesc.h	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/specdesc.h	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -165,5 +165,5 @@
 
 */
-void aubio_specdesc_do (aubio_specdesc_t * o, cvec_t * fftgrain,
+void aubio_specdesc_do (aubio_specdesc_t * o, const cvec_t * fftgrain,
     fvec_t * desc);
 
@@ -179,5 +179,5 @@
 
 */
-aubio_specdesc_t *new_aubio_specdesc (char_t * method, uint_t buf_size);
+aubio_specdesc_t *new_aubio_specdesc (const char_t * method, uint_t buf_size);
 
 /** deletion of a spectral descriptor
Index: src/spectral/statistics.c
===================================================================
--- src/spectral/statistics.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/statistics.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -23,27 +23,27 @@
 #include "spectral/specdesc.h"
 
-void aubio_specdesc_centroid (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-void aubio_specdesc_spread (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-void aubio_specdesc_skewness (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-void aubio_specdesc_kurtosis (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-void aubio_specdesc_slope (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-void aubio_specdesc_decrease (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-void aubio_specdesc_rolloff (aubio_specdesc_t * o, cvec_t * spec,
-    fvec_t * desc);
-
-
-smpl_t cvec_sum (cvec_t * s);
-smpl_t cvec_mean (cvec_t * s);
-smpl_t cvec_centroid (cvec_t * s);
-smpl_t cvec_moment (cvec_t * s, uint_t moment);
-
-smpl_t
-cvec_sum (cvec_t * s)
+void aubio_specdesc_centroid (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+void aubio_specdesc_spread (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+void aubio_specdesc_skewness (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+void aubio_specdesc_kurtosis (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+void aubio_specdesc_slope (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+void aubio_specdesc_decrease (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+void aubio_specdesc_rolloff (aubio_specdesc_t * o, const cvec_t * spec,
+    fvec_t * desc);
+
+
+smpl_t cvec_sum (const cvec_t * s);
+smpl_t cvec_mean (const cvec_t * s);
+smpl_t cvec_centroid (const cvec_t * s);
+smpl_t cvec_moment (const cvec_t * s, uint_t moment);
+
+smpl_t
+cvec_sum (const cvec_t * s)
 {
   uint_t j;
@@ -56,5 +56,5 @@
 
 smpl_t
-cvec_mean (cvec_t * s)
+cvec_mean (const cvec_t * s)
 {
   return cvec_sum (s) / (smpl_t) (s->length);
@@ -62,5 +62,5 @@
 
 smpl_t
-cvec_centroid (cvec_t * spec)
+cvec_centroid (const cvec_t * spec)
 {
   smpl_t sum = 0., sc = 0.;
@@ -78,5 +78,5 @@
 
 smpl_t
-cvec_moment (cvec_t * spec, uint_t order)
+cvec_moment (const cvec_t * spec, uint_t order)
 {
   smpl_t sum = 0., centroid = 0., sc = 0.;
@@ -95,5 +95,5 @@
 
 void
-aubio_specdesc_centroid (aubio_specdesc_t * o UNUSED, cvec_t * spec,
+aubio_specdesc_centroid (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
     fvec_t * desc)
 {
@@ -102,5 +102,5 @@
 
 void
-aubio_specdesc_spread (aubio_specdesc_t * o UNUSED, cvec_t * spec,
+aubio_specdesc_spread (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
     fvec_t * desc)
 {
@@ -109,5 +109,5 @@
 
 void
-aubio_specdesc_skewness (aubio_specdesc_t * o UNUSED, cvec_t * spec,
+aubio_specdesc_skewness (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
     fvec_t * desc)
 {
@@ -123,5 +123,5 @@
 
 void
-aubio_specdesc_kurtosis (aubio_specdesc_t * o UNUSED, cvec_t * spec,
+aubio_specdesc_kurtosis (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
     fvec_t * desc)
 {
@@ -137,5 +137,5 @@
 
 void
-aubio_specdesc_slope (aubio_specdesc_t * o UNUSED, cvec_t * spec,
+aubio_specdesc_slope (aubio_specdesc_t * o UNUSED, const cvec_t * spec,
     fvec_t * desc)
 {
@@ -165,5 +165,5 @@
 
 void
-aubio_specdesc_decrease (aubio_specdesc_t *o UNUSED, cvec_t * spec,
+aubio_specdesc_decrease (aubio_specdesc_t *o UNUSED, const cvec_t * spec,
     fvec_t * desc)
 {
@@ -183,5 +183,5 @@
 
 void
-aubio_specdesc_rolloff (aubio_specdesc_t *o UNUSED, cvec_t * spec,
+aubio_specdesc_rolloff (aubio_specdesc_t *o UNUSED, const cvec_t * spec,
     fvec_t *desc)
 {
Index: src/spectral/tss.c
===================================================================
--- src/spectral/tss.c	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/tss.c	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -41,5 +41,5 @@
 };
 
-void aubio_tss_do(aubio_tss_t *o, cvec_t * input, 
+void aubio_tss_do(aubio_tss_t *o, const cvec_t * input,
     cvec_t * trans, cvec_t * stead)
 {
Index: src/spectral/tss.h
===================================================================
--- src/spectral/tss.h	(revision ce3ff2bd7f533f9b7d3f511bd842160347fc8d99)
+++ src/spectral/tss.h	(revision feb694b1e033d7ebae4249e6c9e998dc1f92b941)
@@ -70,5 +70,5 @@
 
 */
-void aubio_tss_do (aubio_tss_t * o, cvec_t * input, cvec_t * trans,
+void aubio_tss_do (aubio_tss_t * o, const cvec_t * input, cvec_t * trans,
     cvec_t * stead);
 
