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