Changes in src/io/source_apple_audio.c [6bbdcff:987fb86]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_apple_audio.c
r6bbdcff r987fb86 238 238 239 239 uint_t aubio_source_apple_audio_seek (aubio_source_apple_audio_t * s, uint_t pos) { 240 if (1) { 241 AudioBufferList *bufferList = &s->bufferList; 242 UInt32 samples = s->block_size * s->channels; 243 Float64 rateRatio = s->samplerate / s->source_samplerate; 244 uint_t segmentSize= (uint_t)(samples * rateRatio + .5); 245 bufferList->mBuffers[0].mDataByteSize = segmentSize * sizeof(short); 246 } 240 247 SInt64 resampled_pos = (SInt64)ROUND( pos * s->source_samplerate * 1. / s->samplerate ); 241 248 OSStatus err = ExtAudioFileSeek(s->audioFile, resampled_pos);
Note: See TracChangeset
for help on using the changeset viewer.