Changes in / [dea34a1:85ebab8]


Ignore:
Location:
src/io
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/io/source.c

    rdea34a1 r85ebab8  
    7272}
    7373
     74uint_t aubio_source_get_samplerate(aubio_source_t * s) {
     75#ifdef __APPLE__
     76  return aubio_source_apple_audio_get_samplerate((aubio_source_apple_audio_t *)s->source);
     77#else /* __APPLE__ */
     78#if HAVE_SNDFILE
     79  return aubio_source_sndfile_get_samplerate((aubio_source_sndfile_t *)s->source);
     80#endif /* HAVE_SNDFILE */
     81#endif /* __APPLE__ */
     82}
     83
  • src/io/source.h

    rdea34a1 r85ebab8  
    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.c

    rdea34a1 r85ebab8  
    9090  if (err) { AUBIO_ERROR("error in ExtAudioFileGetProperty, %d\n", (int)err); goto beach;}
    9191
     92  if (s->samplerate == 1) {
     93    clientFormat.mSampleRate = fileFormat.mSampleRate;
     94    s->samplerate = fileFormat.mSampleRate;
     95  }
     96
    9297  // set the client format description
    9398  err = ExtAudioFileSetProperty(s->audioFile, kExtAudioFileProperty_ClientDataFormat,
     
    176181}
    177182
     183uint_t aubio_source_apple_audio_get_samplerate(aubio_source_apple_audio_t * s) {
     184  return s->samplerate;
     185}
     186
    178187#endif /* __APPLE__ */
  • src/io/source_apple_audio.h

    rdea34a1 r85ebab8  
    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
Note: See TracChangeset for help on using the changeset viewer.