shithub: aubio

Download patch

ref: 4d75b463d1e048823c070a48afb05a8e35fbfbb3
parent: eae5898461eaf335dee156fdc68c56d1b015ec2c
author: Paul Brossier <piem@piem.org>
date: Fri Jul 13 09:05:32 EDT 2012

src/io/sink.*: fix prototypes, draft implementation

--- a/src/io/sink.c
+++ b/src/io/sink.c
@@ -29,13 +29,14 @@
 };
 
 aubio_sink_t * new_aubio_sink(char_t * uri, uint_t hop_size, uint_t samplerate) {
-  return NULL;
+  aubio_sink_t * s = AUBIO_NEW(aubio_sink_t);
+  return s;
 }
 
-uint_t aubio_sink_do(aubio_sink_t * s, fvec_t * write_data) {
-  return 0;
+void aubio_sink_do(aubio_sink_t * s, fvec_t * write_data, uint_t * written) {
 }
 
 void del_aubio_sink(aubio_sink_t * s) {
+  AUBIO_FREE(s);
   return;
 }
--- a/src/io/sink.h
+++ b/src/io/sink.h
@@ -32,8 +32,8 @@
 */
 
 typedef struct _aubio_sink_t aubio_sink_t;
-aubio_sink_t * new_aubio_sink(char_t * uri, uint_t hop_size, uint_t samplerate);
-uint_t aubio_sink_do(aubio_sink_t * s, fvec_t * write_data);
+aubio_sink_t * new_aubio_sink(char_t * method, uint_t hop_size, uint_t samplerate);
+void aubio_sink_do(aubio_sink_t * s, fvec_t * write_data, uint_t * written);
 void del_aubio_sink(aubio_sink_t * s);
 
 #ifdef __cplusplus