Changeset 1160f11 for src


Ignore:
Timestamp:
Jan 12, 2017, 10:58:19 PM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler, yinfft+
Children:
0f2c1f4
Parents:
e9a2af1
Message:

src/pitch/pitchspecacf.c: return NULL if fft creation failed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchspecacf.c

    re9a2af1 r1160f11  
    4343{
    4444  aubio_pitchspecacf_t *p = AUBIO_NEW (aubio_pitchspecacf_t);
     45  p->fft = new_aubio_fft (bufsize);
     46  if (!p->fft) goto beach;
    4547  p->win = new_aubio_window ("hanningz", bufsize);
    4648  p->winput = new_fvec (bufsize);
    47   p->fft = new_aubio_fft (bufsize);
    4849  p->fftout = new_fvec (bufsize);
    4950  p->sqrmag = new_fvec (bufsize);
     
    5253  p->confidence = 0.;
    5354  return p;
     55
     56beach:
     57  AUBIO_FREE(p);
     58  return NULL;
    5459}
    5560
Note: See TracChangeset for help on using the changeset viewer.