Changeset 01e158d


Ignore:
Timestamp:
Jul 27, 2012, 6:38:19 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
d00e223
Parents:
1ebfa8c6
Message:

src/io/source_apple_audio.{c,h}: if samplerate = 1, use actual source one

Location:
src/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_apple_audio.c

    r1ebfa8c6 r01e158d  
    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

    r1ebfa8c6 r01e158d  
    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.