Changeset 52efae1


Ignore:
Timestamp:
Jan 3, 2014, 11:50:36 PM (10 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:
8e21476
Parents:
5158c22
Message:

src/io/source.c: add source_wavread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source.c

    r5158c22 r52efae1  
    3333#include "io/source_sndfile.h"
    3434#endif /* HAVE_SNDFILE */
     35#ifdef HAVE_WAVREAD
     36#include "io/source_wavread.h"
     37#endif /* HAVE_WAVREAD */
    3538
    3639typedef void (*aubio_source_do_t)(aubio_source_t * s, fvec_t * data, uint_t * read);
     
    8992  }
    9093#endif /* HAVE_SNDFILE */
     94#if HAVE_WAVREAD
     95  s->source = (void *)new_aubio_source_wavread(uri, samplerate, hop_size);
     96  if (s->source) {
     97    s->s_do = (aubio_source_do_t)(aubio_source_wavread_do);
     98    s->s_do_multi = (aubio_source_do_multi_t)(aubio_source_wavread_do_multi);
     99    s->s_get_channels = (aubio_source_get_channels_t)(aubio_source_wavread_get_channels);
     100    s->s_get_samplerate = (aubio_source_get_samplerate_t)(aubio_source_wavread_get_samplerate);
     101    s->s_seek = (aubio_source_seek_t)(aubio_source_wavread_seek);
     102    s->s_del = (del_aubio_source_t)(del_aubio_source_wavread);
     103    return s;
     104  }
     105#endif /* HAVE_WAVREAD */
    91106  AUBIO_ERROR("failed creating aubio source with %s\n", uri);
    92107  AUBIO_FREE(s);
Note: See TracChangeset for help on using the changeset viewer.