Changeset 2de7cfa for src/io/sink.c
- Timestamp:
- Dec 13, 2018, 2:42:24 AM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- d013a93
- Parents:
- 1a30c43
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink.c
r1a30c43 r2de7cfa 102 102 aubio_sink_t * new_aubio_sink(const char_t * uri, uint_t samplerate) { 103 103 aubio_sink_t * s = AUBIO_NEW(aubio_sink_t); 104 #if defined(HAVE_VORBISENC) || defined(HAVE_FLAC) 105 const char_t * uri_ext = aubio_get_extension(uri); 106 #endif /* defined(HAVE_VORBISENC) || defined(HAVE_FLAC) */ 104 107 105 108 #ifdef HAVE_VORBISENC 106 109 // check if this uri could be for us 107 110 uint_t match_oggstream = 0; 108 if (strcmp ( aubio_get_extension(uri), "ogg") == 0) match_oggstream = 1;111 if (strcmp (uri_ext, "ogg") == 0) match_oggstream = 1; 109 112 if (match_oggstream) { 110 113 s->sink = (void *)new_aubio_sink_vorbis(uri, samplerate); … … 126 129 // check if this uri could be for us 127 130 uint_t match_flacstream = 0; 128 if (strcmp ( aubio_get_extension(uri), "flac") == 0) match_flacstream = 1;131 if (strcmp (uri_ext, "flac") == 0) match_flacstream = 1; 129 132 if (match_flacstream) { 130 133 s->sink = (void *)new_aubio_sink_flac(uri, samplerate); … … 187 190 #if !defined(HAVE_WAVWRITE) && \ 188 191 !defined(HAVE_SNDFILE) && \ 189 !defined(HAVE_SINK_APPLE_AUDIO) 192 !defined(HAVE_SINK_APPLE_AUDIO) && \ 193 !defined(HAVE_VORBISENC) && \ 194 !defined(HAVE_FLAC) 190 195 AUBIO_ERROR("sink: failed creating '%s' at %dHz (no sink built-in)\n", uri, samplerate); 191 196 #endif
Note: See TracChangeset
for help on using the changeset viewer.