read(into:frameCount:)
Reads a portion of an audio buffer using the number of frames you specify.
Declaration
func read(into buffer: AVAudioPCMBuffer, frameCount frames: AVAudioFrameCount) throwsParameters
- buffer:
The buffer from which to read the file. Its format must match the file’s processing format.
- frames:
The number of frames to read.
Discussion
You use this method to read fewer frames than the buffer’s frameCapacity.