Changeset cf387e3
- Timestamp:
- Dec 16, 2018, 7:15:42 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- e406835
- Parents:
- 0f5d372
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_apple_audio.c
r0f5d372 rcf387e3 62 62 s->async = false; 63 63 64 if ( (uri == NULL) || (str len(uri) < 1) ) {64 if ( (uri == NULL) || (strnlen(uri, PATH_MAX) < 1) ) { 65 65 AUBIO_ERROR("sink_apple_audio: Aborted opening null path\n"); 66 66 goto beach; 67 67 } 68 if (s->path != NULL) AUBIO_FREE(s->path); 68 69 69 s->path = AUBIO_ARRAY(char_t, strnlen(uri, PATH_MAX) + 1); 70 70 strncpy(s->path, uri, strnlen(uri, PATH_MAX) + 1); … … 92 92 return s; 93 93 beach: 94 AUBIO_FREE(s);94 del_aubio_sink_apple_audio(s); 95 95 return NULL; 96 96 } … … 103 103 s->samplerate = samplerate; 104 104 // automatically open when both samplerate and channels have been set 105 if ( s->samplerate != 0 &&s->channels != 0) {105 if (/* s->samplerate != 0 && */ s->channels != 0) { 106 106 return aubio_sink_apple_audio_open(s); 107 107 } … … 116 116 s->channels = channels; 117 117 // automatically open when both samplerate and channels have been set 118 if (s->samplerate != 0 && s->channels != 0) {118 if (s->samplerate != 0 /* && s->channels != 0 */) { 119 119 return aubio_sink_apple_audio_open(s); 120 120 } … … 250 250 251 251 void del_aubio_sink_apple_audio(aubio_sink_apple_audio_t * s) { 252 if (s->audioFile) aubio_sink_apple_audio_close (s); 253 if (s->path) AUBIO_FREE(s->path); 252 AUBIO_ASSERT(s); 253 if (s->audioFile) 254 aubio_sink_apple_audio_close (s); 255 if (s->path) 256 AUBIO_FREE(s->path); 254 257 freeAudioBufferList(&s->bufferList); 255 258 AUBIO_FREE(s); 256 return;257 259 } 258 260
Note: See TracChangeset
for help on using the changeset viewer.