Changeset 927f630


Ignore:
Timestamp:
Feb 10, 2013, 2:13:55 AM (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:
985ec9e
Parents:
25c9f9a
Message:

src/temporal/resampler.c: safer new_ and del_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/temporal/resampler.c

    r25c9f9a r927f630  
    4343  int error = 0;
    4444  s->stat = src_new (type, 1, &error);  /* only one channel */
     45  if (error) {
     46    AUBIO_ERR ("Failed creating resampler: %s\n", src_strerror (error));
     47    del_aubio_resampler(s);
     48    return NULL;
     49  }
    4550  s->proc = AUBIO_NEW (SRC_DATA);
    46   if (error)
    47     AUBIO_ERR ("%s\n", src_strerror (error));
    4851  s->ratio = ratio;
    4952  return s;
     
    5356del_aubio_resampler (aubio_resampler_t * s)
    5457{
    55   src_delete (s->stat);
     58  if (s->stat) src_delete (s->stat);
    5659  AUBIO_FREE (s->proc);
    5760  AUBIO_FREE (s);
Note: See TracChangeset for help on using the changeset viewer.