Ignore:
Timestamp:
Dec 4, 2009, 1:46:40 AM (14 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
aea235c
Parents:
c17a0ee
Message:

examples: switch to mono

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiotrack.c

    rc17a0ee r4621cd6  
    2929
    3030static int aubio_process(smpl_t **input, smpl_t **output, int nframes) {
    31   unsigned int i;       /*channels*/
    3231  unsigned int j;       /*frames*/
    3332  for (j=0;j<(unsigned)nframes;j++) {
    3433    if(usejack) {
    35       for (i=0;i<channels;i++) {
    36         /* write input to datanew */
    37         fvec_write_sample(ibuf, input[i][j], i, pos);
    38         /* put synthnew in output */
    39         output[i][j] = fvec_read_sample(obuf, i, pos);
    40       }
     34      /* write input to datanew */
     35      fvec_write_sample(ibuf, input[0][j], pos);
     36      /* put synthnew in output */
     37      output[0][j] = fvec_read_sample(obuf, pos);
    4138    }
    4239    /*time for fft*/
     
    4441      /* block loop */
    4542      aubio_tempo_do (bt,ibuf,tempo_out);
    46       istactus = fvec_read_sample (tempo_out, 0, 0);
    47       isonset = fvec_read_sample (tempo_out, 0, 1);
     43      istactus = fvec_read_sample (tempo_out, 0);
     44      isonset = fvec_read_sample (tempo_out, 1);
    4845      if (istactus > 0.) {
    4946        fvec_copy (woodblock, obuf);
     
    7673  examples_common_init(argc,argv);
    7774
    78   tempo_out = new_fvec(2,channels);
    79   bt = new_aubio_tempo(onset_mode,buffer_size,overlap_size,channels, samplerate);
     75  tempo_out = new_fvec(2);
     76  bt = new_aubio_tempo(onset_mode,buffer_size,overlap_size, samplerate);
    8077  if (threshold != 0.) aubio_tempo_set_threshold (bt, threshold);
    8178
Note: See TracChangeset for help on using the changeset viewer.