src/temporal/: add const qualifiers
authorPaul Brossier <piem@piem.org>
Thu, 21 Apr 2016 17:11:55 +0000 (19:11 +0200)
committerPaul Brossier <piem@piem.org>
Thu, 21 Apr 2016 17:11:55 +0000 (19:11 +0200)
src/temporal/filter.c
src/temporal/filter.h
src/temporal/resampler.c
src/temporal/resampler.h

index 8032e50..776d2e6 100644 (file)
@@ -39,7 +39,7 @@ struct _aubio_filter_t
 };
 
 void
-aubio_filter_do_outplace (aubio_filter_t * f, fvec_t * in, fvec_t * out)
+aubio_filter_do_outplace (aubio_filter_t * f, const fvec_t * in, fvec_t * out)
 {
   fvec_copy (in, out);
   aubio_filter_do (f, out);
@@ -93,25 +93,25 @@ aubio_filter_do_filtfilt (aubio_filter_t * f, fvec_t * in, fvec_t * tmp)
 }
 
 lvec_t *
-aubio_filter_get_feedback (aubio_filter_t * f)
+aubio_filter_get_feedback (const aubio_filter_t * f)
 {
   return f->a;
 }
 
 lvec_t *
-aubio_filter_get_feedforward (aubio_filter_t * f)
+aubio_filter_get_feedforward (const aubio_filter_t * f)
 {
   return f->b;
 }
 
 uint_t
-aubio_filter_get_order (aubio_filter_t * f)
+aubio_filter_get_order (const aubio_filter_t * f)
 {
   return f->order;
 }
 
 uint_t
-aubio_filter_get_samplerate (aubio_filter_t * f)
+aubio_filter_get_samplerate (const aubio_filter_t * f)
 {
   return f->samplerate;
 }
index 13c7cba..3b3a954 100644 (file)
@@ -86,7 +86,7 @@ void aubio_filter_do (aubio_filter_t * f, fvec_t * in);
   \param out output vector to store filtered input
 
 */
-void aubio_filter_do_outplace (aubio_filter_t * f, fvec_t * in, fvec_t * out);
+void aubio_filter_do_outplace (aubio_filter_t * f, const fvec_t * in, fvec_t * out);
 
 /** filter input vector forward and backward
 
@@ -104,7 +104,7 @@ void aubio_filter_do_filtfilt (aubio_filter_t * f, fvec_t * in, fvec_t * tmp);
   \return a pointer to the \f$ a_0 ... a_i ... a_P \f$ coefficients
 
 */
-lvec_t *aubio_filter_get_feedback (aubio_filter_t * f);
+lvec_t *aubio_filter_get_feedback (const aubio_filter_t * f);
 
 /** returns a pointer to feedforward coefficients \f$ b_i \f$
 
@@ -113,7 +113,7 @@ lvec_t *aubio_filter_get_feedback (aubio_filter_t * f);
   \return a pointer to the \f$ b_0 ... b_i ... b_P \f$ coefficients
 
 */
-lvec_t *aubio_filter_get_feedforward (aubio_filter_t * f);
+lvec_t *aubio_filter_get_feedforward (const aubio_filter_t * f);
 
 /** get order of the filter
 
@@ -122,7 +122,7 @@ lvec_t *aubio_filter_get_feedforward (aubio_filter_t * f);
   \return the order of the filter
 
 */
-uint_t aubio_filter_get_order (aubio_filter_t * f);
+uint_t aubio_filter_get_order (const aubio_filter_t * f);
 
 /** get sampling rate of the filter
 
@@ -131,7 +131,7 @@ uint_t aubio_filter_get_order (aubio_filter_t * f);
   \return the sampling rate of the filter, in Hz
 
 */
-uint_t aubio_filter_get_samplerate (aubio_filter_t * f);
+uint_t aubio_filter_get_samplerate (const aubio_filter_t * f);
 
 /** get sampling rate of the filter
 
index 041703e..99c3271 100644 (file)
@@ -61,7 +61,7 @@ del_aubio_resampler (aubio_resampler_t * s)
 }
 
 void
-aubio_resampler_do (aubio_resampler_t * s, fvec_t * input, fvec_t * output)
+aubio_resampler_do (aubio_resampler_t * s, const fvec_t * input, fvec_t * output)
 {
   s->proc->input_frames = input->length;
   s->proc->output_frames = output->length;
@@ -92,7 +92,7 @@ del_aubio_resampler (aubio_resampler_t * s UNUSED)
 }
 
 void
-aubio_resampler_do (aubio_resampler_t * s UNUSED, fvec_t * input UNUSED, fvec_t * output UNUSED)
+aubio_resampler_do (aubio_resampler_t * s UNUSED, const fvec_t * input UNUSED, fvec_t * output UNUSED)
 {
 }
 #endif /* HAVE_SAMPLERATE */
index 1684f75..4d5e729 100644 (file)
@@ -55,7 +55,7 @@ void del_aubio_resampler (aubio_resampler_t * s);
   \param output output buffer of size N*ratio
 
 */
-void aubio_resampler_do (aubio_resampler_t * s, fvec_t * input,
+void aubio_resampler_do (aubio_resampler_t * s, const fvec_t * input,
     fvec_t * output);
 
 #ifdef __cplusplus