Changeset f264b17 for src/synth/sampler.c
- Timestamp:
- Jun 22, 2016, 1:00:10 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:
- 4b9443c4
- Parents:
- 60fc05b (diff), 6769586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/synth/sampler.c
r60fc05b rf264b17 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 (o->uri) AUBIO_FREE(o->uri); 63 o->uri = AUBIO_ARRAY(char_t, strnlen(uri, PATH_MAX)); 64 strncpy(o->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 (o->uri) AUBIO_FREE(o->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.