- Timestamp:
- Apr 25, 2016, 4:42:43 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:
- b4e1438
- Parents:
- b60f297
- Location:
- src/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_sndfile.c
rb60f297 rc6e7ba1 54 54 int input_channels; 55 55 int input_format; 56 int duration; 56 57 57 58 // resampling stuff … … 106 107 s->input_channels = sfinfo.channels; 107 108 s->input_format = sfinfo.format; 109 s->duration = sfinfo.frames; 108 110 109 111 if (samplerate == 0) { … … 273 275 } 274 276 277 uint_t aubio_source_sndfile_get_duration (const aubio_source_sndfile_t * s) { 278 if (s && s->duration) { 279 return s->duration; 280 } 281 return 0; 282 } 283 275 284 uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t * s, uint_t pos) { 276 285 uint_t resampled_pos = (uint_t)ROUND(pos / s->ratio); -
src/io/source_sndfile.h
rb60f297 rc6e7ba1 121 121 /** 122 122 123 get the duration of source object, in frames 124 125 \param s source object, created with ::new_aubio_source_sndfile 126 \return number of frames in file 127 128 */ 129 uint_t aubio_source_sndfile_get_duration (const aubio_source_sndfile_t *s); 130 131 /** 132 123 133 close source 124 134
Note: See TracChangeset
for help on using the changeset viewer.