4

Let's say I have an AVAudioFile with a duration of 10 seconds. I want to load that file into an AVAudioPCMBuffer but I only want to load the audio frames that come after a certain number of seconds/milliseconds or after a certain AVAudioFramePosition.

It doesn't look like AVAudioFile's readIntoBuffer methods give me that kind of precision so I'm assuming I'll have to work at the AVAudioBuffer level or lower?

halfer
  • 19,824
  • 17
  • 99
  • 186
WongWray
  • 2,414
  • 1
  • 20
  • 25

1 Answers1

5

You just need to set the AVAudioFile's framePosition property before reading.

dave234
  • 4,793
  • 1
  • 14
  • 29