Changeset 98874a6


Ignore:
Timestamp:
Feb 10, 2013, 8:22:38 AM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
9a226ef
Parents:
7b4ea49
Message:

examples/utils.c: get samplerate from file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    r7b4ea49 r98874a6  
    6060uint_t overlap_size = 256;      //512;
    6161uint_t samplerate = 44100;
    62 
    6362
    6463aubio_source_t *this_source = NULL;
     
    204203  if (!usejack) {
    205204    debug ("Opening files ...\n");
    206     // TODO get actual samplerate
    207     samplerate = 44100;
    208     this_source = new_aubio_source ((char_t*)source_uri, samplerate, overlap_size);
     205    this_source = new_aubio_source ((char_t*)source_uri, 0, overlap_size);
    209206    if (this_source == NULL) {
    210207      outmsg ("Could not open input file %s.\n", source_uri);
    211208      exit (1);
    212209    }
    213     // TODO get actual samplerate
    214     //samplerate = aubio_sndfile_samplerate (this_source);
     210    samplerate = aubio_source_get_samplerate(this_source);
    215211    if (sink_uri != NULL) {
    216212      this_sink = new_aubio_sink ((char_t*)sink_uri, samplerate);
Note: See TracChangeset for help on using the changeset viewer.