Changes in / [6e765ed:985d5c4]
Legend:
- Unmodified
- Added
- Removed
-
src/io/source.c
r6e765ed r985d5c4 41 41 typedef uint_t (*aubio_source_get_samplerate_t)(aubio_source_t * s); 42 42 typedef uint_t (*aubio_source_get_channels_t)(aubio_source_t * s); 43 typedef uint_t (*aubio_source_get_duration_t)(aubio_source_t * s);44 43 typedef uint_t (*aubio_source_seek_t)(aubio_source_t * s, uint_t seek); 45 44 typedef uint_t (*aubio_source_close_t)(aubio_source_t * s); … … 52 51 aubio_source_get_samplerate_t s_get_samplerate; 53 52 aubio_source_get_channels_t s_get_channels; 54 aubio_source_get_duration_t s_get_duration;55 53 aubio_source_seek_t s_seek; 56 54 aubio_source_close_t s_close; … … 67 65 s->s_get_channels = (aubio_source_get_channels_t)(aubio_source_avcodec_get_channels); 68 66 s->s_get_samplerate = (aubio_source_get_samplerate_t)(aubio_source_avcodec_get_samplerate); 69 s->s_get_duration = (aubio_source_get_duration_t)(aubio_source_avcodec_get_duration);70 67 s->s_seek = (aubio_source_seek_t)(aubio_source_avcodec_seek); 71 68 s->s_close = (aubio_source_close_t)(aubio_source_avcodec_close); … … 81 78 s->s_get_channels = (aubio_source_get_channels_t)(aubio_source_apple_audio_get_channels); 82 79 s->s_get_samplerate = (aubio_source_get_samplerate_t)(aubio_source_apple_audio_get_samplerate); 83 s->s_get_duration = (aubio_source_get_duration_t)(aubio_source_apple_audio_get_duration);84 80 s->s_seek = (aubio_source_seek_t)(aubio_source_apple_audio_seek); 85 81 s->s_close = (aubio_source_close_t)(aubio_source_apple_audio_close); … … 95 91 s->s_get_channels = (aubio_source_get_channels_t)(aubio_source_sndfile_get_channels); 96 92 s->s_get_samplerate = (aubio_source_get_samplerate_t)(aubio_source_sndfile_get_samplerate); 97 s->s_get_duration = (aubio_source_get_duration_t)(aubio_source_sndfile_get_duration);98 93 s->s_seek = (aubio_source_seek_t)(aubio_source_sndfile_seek); 99 94 s->s_close = (aubio_source_close_t)(aubio_source_sndfile_close); … … 109 104 s->s_get_channels = (aubio_source_get_channels_t)(aubio_source_wavread_get_channels); 110 105 s->s_get_samplerate = (aubio_source_get_samplerate_t)(aubio_source_wavread_get_samplerate); 111 s->s_get_duration = (aubio_source_get_duration_t)(aubio_source_wavread_get_duration);112 106 s->s_seek = (aubio_source_seek_t)(aubio_source_wavread_seek); 113 107 s->s_close = (aubio_source_close_t)(aubio_source_wavread_close); … … 148 142 } 149 143 150 uint_t aubio_source_get_duration(aubio_source_t *s) {151 return s->s_get_duration((void *)s->source);152 }153 154 144 uint_t aubio_source_seek (aubio_source_t * s, uint_t seek ) { 155 145 return s->s_seek((void *)s->source, seek); -
src/io/source.h
r6e765ed r985d5c4 150 150 /** 151 151 152 get the duration of source object, in frames153 154 \param s source object, created with ::new_aubio_source155 \return number of frames in file156 157 */158 uint_t aubio_source_get_duration (aubio_source_t * s);159 160 /**161 162 152 close source object 163 153
Note: See TracChangeset
for help on using the changeset viewer.