Changeset 5288874


Ignore:
Timestamp:
Jul 13, 2008, 9:53:30 PM (16 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:
4d7ced9
Parents:
bf9d8a6
Message:

src/pitch/pitchschmitt.c: move buffer to private structure, closes #8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchschmitt.c

    rbf9d8a6 r5288874  
    2929        signed short int *schmittBuffer;
    3030        signed short int *schmittPointer;
     31        signed short int *buf;
    3132};
    3233
     
    3637  p->blockSize = size;
    3738  p->schmittBuffer = AUBIO_ARRAY(signed short int,p->blockSize);
     39  p->buf = AUBIO_ARRAY(signed short int,p->blockSize);
    3840  p->schmittPointer = p->schmittBuffer;
    3941  p->rate = samplerate;
     
    4345smpl_t aubio_pitchschmitt_detect (aubio_pitchschmitt_t *p, fvec_t * input)
    4446{
    45   signed short int buf[input->length];
    4647  uint_t i;
    4748  for (i=0; i<input->length; i++) {
    48     buf[i] = input->data[0][i]*32768.;
     49    p->buf[i] = input->data[0][i]*32768.;
    4950  }
    50   return aubio_schmittS16LE(p, input->length, buf);
     51  return aubio_schmittS16LE(p, input->length, p->buf);
    5152}
    5253
Note: See TracChangeset for help on using the changeset viewer.