Changeset 3684ab4


Ignore:
Timestamp:
Mar 3, 2013, 7:40:05 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
2fcb973
Parents:
9547247
Message:

tests/src/temporal/: improve examples

Location:
tests/src/temporal
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/src/temporal/test-a_weighting.c

    r9547247 r3684ab4  
    11#include <aubio.h>
    22
    3 int main(){
     3int main ()
     4{
    45 
    56  aubio_filter_t * f;
  • tests/src/temporal/test-biquad.c

    r9547247 r3684ab4  
    11#include <aubio.h>
    22
    3 int main () {
     3int main ()
     4{
    45  uint_t win_s = 64; // window size
    56
  • tests/src/temporal/test-c_weighting.c

    r9547247 r3684ab4  
    11#include <aubio.h>
    22
    3 int main(){
    4  
     3int main ()
     4{
    55  aubio_filter_t * f;
    66
  • tests/src/temporal/test-filter.c

    r9547247 r3684ab4  
    11#include <aubio.h>
    22
    3 int
    4 main (void)
     3int main ()
    54{
    6   /* allocate some memory */
    7   uint_t win_s = 32;            /* window size */
    8   fvec_t *in = new_fvec (win_s);      /* input buffer */
    9   fvec_t *out = new_fvec (win_s);     /* input buffer */
    10 
     5  uint_t win_s = 32; // window size
     6  fvec_t *in = new_fvec (win_s); // input buffer
     7  fvec_t *out = new_fvec (win_s); // input buffer
    118
    129  aubio_filter_t *o = new_aubio_filter_c_weighting (44100);
     
    1714  del_aubio_filter (o);
    1815
    19   o = new_aubio_filter_c_weighting (44100);
     16  o = new_aubio_filter_a_weighting (32000);
    2017  in->data[12] = 0.5;
    2118  fvec_print (in);
    2219  aubio_filter_do_outplace (o, in, out);
    2320  fvec_print (out);
    24   del_aubio_filter (o);
    2521
    26   o = new_aubio_filter_c_weighting (44100);
     22  aubio_filter_set_a_weighting (o, 32000);
    2723  in->data[12] = 0.5;
    2824  fvec_print (in);
    2925  aubio_filter_do_filtfilt (o, in, out);
    3026  fvec_print (out);
    31   del_aubio_filter (o);
    3227
    3328  del_fvec (in);
    3429  del_fvec (out);
     30  del_aubio_filter (o);
    3531  aubio_cleanup ();
    3632
  • tests/src/temporal/test-resampler.c

    r9547247 r3684ab4  
    1 #include <stdio.h>
    21#include <aubio.h>
    32
    4 int
    5 main ()
     3int main ()
    64{
    7   /* allocate some memory */
    8   uint_t win_s = 1024;          /* window size */
     5  uint_t win_s = 1024; // window size
    96  smpl_t ratio = 0.5;
    10   fvec_t *in = new_fvec (win_s);      /* input buffer */
    11   fvec_t *out = new_fvec ((uint_t) (win_s * ratio));  /* input buffer */
     7  fvec_t *in = new_fvec (win_s); // input buffer
     8  fvec_t *out = new_fvec ((uint_t) (win_s * ratio)); // output buffer
    129  aubio_resampler_t *o = new_aubio_resampler (0.5, 0);
    1310  uint_t i = 0;
Note: See TracChangeset for help on using the changeset viewer.