Changeset 1686fcf
- Timestamp:
- Jun 27, 2017, 4:56:00 PM (7 years ago)
- Branches:
- sampler
- Parents:
- 04d0c89
- Location:
- src/synth
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/synth/sampler.c
r04d0c89 r1686fcf 57 57 uint_t samplerate; 58 58 uint_t blocksize; 59 uint_t duration; 59 60 // current reading mode (can be a file or an array) 60 61 uint_t reading_from; … … 129 130 s->samplerate = samplerate; 130 131 s->blocksize = blocksize; 132 s->duration = 0; 131 133 s->source = NULL; 132 134 s->playing = 0; … … 279 281 o->opened = 1; 280 282 ret = AUBIO_OK; 283 o->duration = duration; 281 284 AUBIO_MSG("sampler: loaded %s\n", uri); 282 285 #ifdef HAVE_THREADS … … 811 814 812 815 uint_t 816 aubio_sampler_get_duration (aubio_sampler_t *o) 817 { 818 if (o->duration !=0) { 819 return o->duration; 820 } else { 821 AUBIO_WRN("sampler: failed getting duration for %s\n", o->uri); 822 return 0; 823 } 824 } 825 826 uint_t 813 827 aubio_sampler_get_opened (aubio_sampler_t *o) 814 828 { -
src/synth/sampler.h
r04d0c89 r1686fcf 218 218 uint_t aubio_sampler_get_samplerate(aubio_sampler_t * o); 219 219 220 /** get duration 221 222 \param o sampler, created by new_aubio_sampler() 223 224 \return duration of the opened uri, in samples 225 226 */ 227 uint_t aubio_sampler_get_duration(aubio_sampler_t * o); 228 220 229 /** get the number of samples that were set to zero while opening a file 221 230
Note: See TracChangeset
for help on using the changeset viewer.