- Timestamp:
- Mar 23, 2013, 12:32:58 AM (12 years ago)
- 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:
- 3286230, 52d6145
- Parents:
- 6bbdcff
- 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.