Ignore:
Timestamp:
Dec 4, 2009, 1:46:40 AM (10 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:
aea235c
Parents:
c17a0ee
Message:

examples: switch to mono

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubioquiet.c

    rc17a0ee r4621cd6  
    2626int aubio_process(smpl_t **input, smpl_t **output, int nframes);
    2727int aubio_process(smpl_t **input, smpl_t **output, int nframes) {
    28   unsigned int i;       /*channels*/
    2928  unsigned int j;       /*frames*/
    3029  for (j=0;j<(unsigned)nframes;j++) {
    3130    if(usejack) {
    32       for (i=0;i<channels;i++) {
    33         /* write input to datanew */
    34         fvec_write_sample(ibuf, input[i][j], i, pos);
    35         /* put synthnew in output */
    36         output[i][j] = fvec_read_sample(obuf, i, pos);
    37       }
     31      /* write input to datanew */
     32      fvec_write_sample(ibuf, input[0][j], pos);
     33      /* put synthnew in output */
     34      output[0][j] = fvec_read_sample(obuf, pos);
    3835    }
    3936    /*time for fft*/
     
    4138      /* test for silence */
    4239      if (aubio_silence_detection(ibuf, silence)==1) {
    43         if (wassilence==1) issilence = 1;
    44         else issilence = 2;
     40        if (wassilence==1) issilence = 1;
     41        else issilence = 2;
    4542        wassilence=1;
    4643      } else {
    47         if (wassilence<=0) issilence = 0;
    48         else issilence = -1;
     44        if (wassilence<=0) issilence = 0;
     45        else issilence = -1;
    4946        wassilence=0;
    5047      }
Note: See TracChangeset for help on using the changeset viewer.