Changeset a9fd272 for src/io/sink.c
- Timestamp:
- Jan 26, 2014, 8:16:59 PM (10 years ago)
- 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:
- 422452b
- Parents:
- 082c88b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink.c
r082c88b ra9fd272 39 39 typedef uint_t (*aubio_sink_get_channels_t)(aubio_sink_t * s); 40 40 #endif 41 typedef uint_t (*aubio_sink_close_t)(aubio_sink_t * s); 41 42 typedef void (*del_aubio_sink_t)(aubio_sink_t * s); 42 43 … … 49 50 aubio_sink_get_channels_t s_get_channels; 50 51 #endif 52 aubio_sink_close_t s_close; 51 53 del_aubio_sink_t s_del; 52 54 }; … … 58 60 if (s->sink) { 59 61 s->s_do = (aubio_sink_do_t)(aubio_sink_apple_audio_do); 62 s->s_close = (aubio_sink_close_t)(aubio_sink_apple_audio_close); 60 63 s->s_del = (del_aubio_sink_t)(del_aubio_sink_apple_audio); 61 64 return s; … … 66 69 if (s->sink) { 67 70 s->s_do = (aubio_sink_do_t)(aubio_sink_sndfile_do); 71 s->s_close = (aubio_sink_close_t)(aubio_sink_sndfile_close); 68 72 s->s_del = (del_aubio_sink_t)(del_aubio_sink_sndfile); 69 73 return s; … … 74 78 if (s->sink) { 75 79 s->s_do = (aubio_sink_do_t)(aubio_sink_wavwrite_do); 80 s->s_close = (aubio_sink_close_t)(aubio_sink_wavwrite_close); 76 81 s->s_del = (del_aubio_sink_t)(del_aubio_sink_wavwrite); 77 82 return s; 78 83 } 79 84 #endif /* HAVE_WAVWRITE */ 80 AUBIO_ERROR("sink: failed creating aubio sink with %s\n", uri); 85 AUBIO_ERROR("sink: failed creating %s with samplerate %dHz\n", 86 uri, samplerate); 81 87 AUBIO_FREE(s); 82 88 return NULL; … … 87 93 } 88 94 95 uint_t aubio_sink_close(aubio_sink_t *s) { 96 return s->s_close((void *)s->sink); 97 } 98 89 99 void del_aubio_sink(aubio_sink_t * s) { 90 100 if (!s) return;
Note: See TracChangeset
for help on using the changeset viewer.