Changeset 65f7886 for src/effects
- Timestamp:
- May 10, 2019, 9:53:24 AM (6 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/timestretch, fix/ffmpeg5, master
- Children:
- c62243f
- Parents:
- 7a02ce9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/effects/rubberband_utils.c
r7a02ce9 r65f7886 18 18 #include <stdlib.h> 19 19 #include <string.h> 20 #include <assert.h>21 20 22 21 char_t** aubio_split_str(const char_t* str, const char_t sep) { … … 45 44 result = AUBIO_ARRAY(char_t*, count); 46 45 if (result) { 47 uint_t idx 46 uint_t idx = 0; 48 47 char_t* params = strtok(input, delim); 49 48 while (params) { 50 49 // make sure we don't got in the wild 51 assert(idx < count); 50 if (idx >= count) 51 break; 52 52 *(result + idx++) = strdup(params); 53 53 params = strtok(0, delim); 54 54 } 55 assert(idx == count - 1);56 // add null string at the end57 *(result + idx) = 0;55 // add null string at the end if needed 56 if (idx < count - 1) 57 *(result + idx) = 0; 58 58 } 59 59 return result;
Note: See TracChangeset
for help on using the changeset viewer.