Changeset 1a30c43
- Timestamp:
- Dec 13, 2018, 2:17:50 AM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- 2de7cfa
- Parents:
- 56174a2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink.c
r56174a2 r1a30c43 72 72 write_data, uint_t write); 73 73 #endif /* HAVE_VORBISENC */ 74 75 #ifdef HAVE_FLAC 76 typedef struct _aubio_sink_flac_t aubio_sink_flac_t; 77 extern aubio_sink_flac_t * new_aubio_sink_flac(const char_t *uri, 78 uint_t samplerate); 79 extern void del_aubio_sink_flac (aubio_sink_flac_t *s); 80 extern uint_t aubio_sink_flac_open(aubio_sink_flac_t *s); 81 extern uint_t aubio_sink_flac_close(aubio_sink_flac_t *s); 82 extern uint_t aubio_sink_flac_preset_channels(aubio_sink_flac_t *s, 83 uint_t channels); 84 extern uint_t aubio_sink_flac_preset_samplerate(aubio_sink_flac_t *s, 85 uint_t samplerate); 86 extern uint_t aubio_sink_flac_get_channels(aubio_sink_flac_t *s); 87 extern uint_t aubio_sink_flac_get_samplerate(aubio_sink_flac_t *s); 88 extern void aubio_sink_flac_do(aubio_sink_flac_t *s, fvec_t* 89 write_data, uint_t write); 90 extern void aubio_sink_flac_do_multi(aubio_sink_flac_t *s, fmat_t* 91 write_data, uint_t write); 92 #endif /* HAVE_FLAC */ 74 93 75 94 static const char_t *aubio_get_extension(const char_t *filename) … … 104 123 #endif /* HAVE_VORBISENC */ 105 124 125 #ifdef HAVE_FLAC 126 // check if this uri could be for us 127 uint_t match_flacstream = 0; 128 if (strcmp (aubio_get_extension(uri), "flac") == 0) match_flacstream = 1; 129 if (match_flacstream) { 130 s->sink = (void *)new_aubio_sink_flac(uri, samplerate); 131 if (s->sink) { 132 s->s_do = (aubio_sink_do_t)(aubio_sink_flac_do); 133 s->s_do_multi = (aubio_sink_do_multi_t)(aubio_sink_flac_do_multi); 134 s->s_preset_samplerate = (aubio_sink_preset_samplerate_t)(aubio_sink_flac_preset_samplerate); 135 s->s_preset_channels = (aubio_sink_preset_channels_t)(aubio_sink_flac_preset_channels); 136 s->s_get_samplerate = (aubio_sink_get_samplerate_t)(aubio_sink_flac_get_samplerate); 137 s->s_get_channels = (aubio_sink_get_channels_t)(aubio_sink_flac_get_channels); 138 s->s_close = (aubio_sink_close_t)(aubio_sink_flac_close); 139 s->s_del = (del_aubio_sink_t)(del_aubio_sink_flac); 140 return s; 141 } 142 } 143 #endif /* HAVE_FLAC */ 144 106 145 #ifdef HAVE_SINK_APPLE_AUDIO 107 146 s->sink = (void *)new_aubio_sink_apple_audio(uri, samplerate);
Note: See TracChangeset
for help on using the changeset viewer.