Changeset 8aed26d for src/io/sink.c


Ignore:
Timestamp:
Jul 15, 2012, 8:18:28 PM (8 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:
42e6a5e
Parents:
11a1abe
Message:

src/io/sink*: read write size instead of returning it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink.c

    r11a1abe r8aed26d  
    2323#include "fvec.h"
    2424#include "io/sink.h"
     25#ifdef __APPLE__
     26#include "io/sink_apple_audio.h"
     27#endif /* __APPLE__ */
     28#ifdef HAVE_SNDFILE
     29#include "io/sink_sndfile.h"
     30#endif
    2531
    2632struct _aubio_sink_t {
    27   uint_t hopsize;
    28   uint_t samplerate;
     33  void *sink;
    2934};
    3035
    31 aubio_sink_t * new_aubio_sink(char_t * uri, uint_t hop_size, uint_t samplerate) {
     36aubio_sink_t * new_aubio_sink(char_t * uri, uint_t samplerate) {
    3237  aubio_sink_t * s = AUBIO_NEW(aubio_sink_t);
    33   return s;
     38#ifdef __APPLE__
     39  s->sink = (void *)new_aubio_sink_apple_audio(uri, samplerate);
     40  if (s->sink) return s;
     41#else /* __APPLE__ */
     42#if HAVE_SNDFILE
     43  s->sink = (void *)new_aubio_sink_sndfile(uri, samplerate);
     44  if (s->sink) return s;
     45#endif /* HAVE_SNDFILE */
     46#endif /* __APPLE__ */
     47  if (s->sink == NULL) { AUBIO_FREE(s); return NULL; }
    3448}
    3549
    36 void aubio_sink_do(aubio_sink_t * s, fvec_t * write_data, uint_t * written) {
     50void aubio_sink_do(aubio_sink_t * s, fvec_t * write_data, uint_t write) {
    3751}
    3852
Note: See TracChangeset for help on using the changeset viewer.