Changeset 3504dfe7


Ignore:
Timestamp:
Jul 13, 2012, 11:28:43 PM (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:
a40eea8
Parents:
4d75b46
Message:

src/io/source_apple_audio.{c,h}: added simple file read using ExtAudioFile?

Location:
src/io
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/io/source.c

    r4d75b46 r3504dfe7  
    2323#include "fvec.h"
    2424#include "io/source.h"
     25#ifdef __APPLE__
     26#include "io/source_apple_audio_file.h"
     27#endif /* __APPLE__ */
    2528
    2629struct _aubio_source_t {
    27   uint_t hopsize;
    28   uint_t samplerate;
     30  void *source;
    2931};
    3032
    3133aubio_source_t * new_aubio_source(char_t * uri, uint_t hop_size, uint_t samplerate) {
    32   return NULL;
     34  aubio_source_t * s = AUBIO_NEW(aubio_source_t);
     35#ifdef __APPLE__
     36  s->source= (void *)new_aubio_source_apple_audio(uri, hop_size, samplerate);
     37#endif /* __APPLE__ */
     38  if (s->source == NULL) return NULL;
     39  return s;
    3340}
    3441
    35 fvec_t * aubio_source_do(aubio_source_t * s, fvec_t * write_data) {
    36   return NULL;
     42void aubio_source_do(aubio_source_t * s, fvec_t * data, uint_t * read) {
     43#ifdef __APPLE__
     44  aubio_source_apple_audio_do((aubio_source_apple_audio_t *)s->source, data, read);
     45#endif /* __APPLE__ */
    3746}
    3847
    3948void del_aubio_source(aubio_source_t * s) {
    40   return;
     49#ifdef __APPLE__
     50  del_aubio_source_apple_audio((aubio_source_apple_audio_t *)s->source);
     51#endif /* __APPLE__ */
     52  AUBIO_FREE(s);
    4153}
    4254
  • src/io/source.h

    r4d75b46 r3504dfe7  
    3333
    3434typedef struct _aubio_source_t aubio_source_t;
    35 aubio_source_t * new_aubio_source(char_t * uri, uint_t hop_size, uint_t samplerate);
    36 fvec_t * aubio_source_do(aubio_source_t * s);
     35aubio_source_t * new_aubio_source(char_t * method, uint_t hop_size, uint_t samplerate);
     36void aubio_source_do(aubio_source_t * s, fvec_t * read_data, uint_t * read);
    3737void del_aubio_source(aubio_source_t * s);
    3838
Note: See TracChangeset for help on using the changeset viewer.