- Timestamp:
- Mar 15, 2017, 7:07:06 PM (8 years ago)
- Branches:
- sampler
- Children:
- bff692e
- Parents:
- 388c2e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/synth/sampler.c
r388c2e7 rebed7e6 69 69 // reading from a source 70 70 aubio_source_t *source; 71 c onst char_t *uri;71 char_t *uri; 72 72 uint_t playing; 73 73 uint_t opened; … … 94 94 pthread_mutex_t open_mutex; 95 95 uint_t waited; // number of frames skipped while opening 96 c onst char_t *next_uri;96 char_t *next_uri; 97 97 uint_t open_thread_running; 98 98 sint_t available; // number of samples currently available … … 263 263 o->samplerate = aubio_source_get_samplerate(o->source); 264 264 } 265 o->uri = uri; 265 if (o->uri) AUBIO_FREE(o->uri); 266 o->uri = AUBIO_ARRAY(char_t, strnlen(uri, PATH_MAX) + 1); 267 strncpy(o->uri, uri, strnlen(uri, PATH_MAX) + 1); 266 268 o->finished = 0; 267 269 o->eof = 0; … … 344 346 o->started = 0; 345 347 o->available = 0; 346 o->next_uri = uri; 348 if (o->next_uri) AUBIO_FREE(o->next_uri); 349 o->next_uri = AUBIO_ARRAY(char_t, strnlen(uri, PATH_MAX) + 1); 350 strncpy(o->next_uri, uri, strnlen(uri, PATH_MAX) + 1); 347 351 o->waited = 0; 348 352 if (pthread_create(&o->open_thread, 0, aubio_sampler_openfn, o) != 0) {
Note: See TracChangeset
for help on using the changeset viewer.