- Timestamp:
- Apr 21, 2016, 7:30:25 PM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- ce3ff2b
- Parents:
- 23493b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/synth/sampler.c
r23493b5 reaee767 56 56 } 57 57 58 uint_t aubio_sampler_load( aubio_sampler_t * o, c har_t * uri )58 uint_t aubio_sampler_load( aubio_sampler_t * o, const char_t * uri ) 59 59 { 60 60 if (o->source) del_aubio_source(o->source); 61 o->uri = uri; 61 62 if (s->uri) AUBIO_FREE(s->uri); 63 s->uri = AUBIO_ARRAY(char_t, strnlen(uri, PATH_MAX)); 64 strncpy(s->uri, uri, strnlen(uri, PATH_MAX)); 65 62 66 o->source = new_aubio_source(uri, o->samplerate, o->blocksize); 63 67 if (o->source) return 0; … … 66 70 } 67 71 68 void aubio_sampler_do ( aubio_sampler_t * o, fvec_t * input, fvec_t * output)72 void aubio_sampler_do ( aubio_sampler_t * o, const fvec_t * input, fvec_t * output) 69 73 { 70 74 uint_t read = 0, i; … … 83 87 } 84 88 85 void aubio_sampler_do_multi ( aubio_sampler_t * o, fmat_t * input, fmat_t * output)89 void aubio_sampler_do_multi ( aubio_sampler_t * o, const fmat_t * input, fmat_t * output) 86 90 { 87 91 uint_t read = 0, i, j; … … 104 108 } 105 109 106 uint_t aubio_sampler_get_playing ( aubio_sampler_t * o )110 uint_t aubio_sampler_get_playing ( const aubio_sampler_t * o ) 107 111 { 108 112 return o->playing; … … 131 135 del_aubio_source(o->source); 132 136 } 137 if (s->uri) AUBIO_FREE(s->uri); 133 138 del_fvec(o->source_output); 134 139 del_fmat(o->source_output_multi);
Note: See TracChangeset
for help on using the changeset viewer.