Changes in / [88fc249:fc117d0]


Ignore:
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_source.py

    r88fc249 rfc117d0  
    88    print 'usage: %s <inputfile>' % sys.argv[0]
    99    sys.exit(1)
    10   f = source(sys.argv[1], 8000, 256)
     10  f = source(sys.argv[1], 1, 256)
     11  samplerate = f.get_samplerate()
    1112  total_frames, read = 0, 256
    1213  while read:
    1314    vec, read = f()
    1415    total_frames += read
    15   print "read", total_frames / float(f.samplerate), "seconds from", f.uri
     16  print "read", total_frames / float(samplerate), "seconds from", f.uri
  • src/io/source.h

    r88fc249 rfc117d0  
    3535aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_size);
    3636void aubio_source_do(aubio_source_t * s, fvec_t * read_data, uint_t * read);
     37uint_t aubio_source_get_samplerate(aubio_source_t * s);
    3738void del_aubio_source(aubio_source_t * s);
    3839
  • src/io/source_apple_audio.h

    r88fc249 rfc117d0  
    2525aubio_source_apple_audio_t * new_aubio_source_apple_audio(char_t * path, uint_t samplerate, uint_t block_size);
    2626void aubio_source_apple_audio_do(aubio_source_apple_audio_t * s, fvec_t * read_to, uint_t * read);
     27uint_t aubio_source_apple_audio_get_samplerate(aubio_source_apple_audio_t * s);
    2728void del_aubio_source_apple_audio(aubio_source_apple_audio_t * s);
    2829
  • src/io/source_sndfile.c

    r88fc249 rfc117d0  
    173173}
    174174
     175uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s) {
     176  return s->samplerate;
     177}
     178
    175179void del_aubio_source_sndfile(aubio_source_sndfile_t * s){
    176180  if (!s) return;
  • src/io/source_sndfile.h

    r88fc249 rfc117d0  
    2525aubio_source_sndfile_t * new_aubio_source_sndfile(char_t * path, uint_t samplerate, uint_t block_size);
    2626void aubio_source_sndfile_do(aubio_source_sndfile_t * s, fvec_t * read_to, uint_t * read);
     27uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s);
    2728void del_aubio_source_sndfile(aubio_source_sndfile_t * s);
    2829
Note: See TracChangeset for help on using the changeset viewer.