ExtAudioFileRead(_:_:_:)
Performs a synchronous, sequential read operation on an audio file.
Declaration
func ExtAudioFileRead(_ inExtAudioFile: ExtAudioFileRef, _ ioNumberFrames: UnsafeMutablePointer<UInt32>, _ ioData: UnsafeMutablePointer<AudioBufferList>) -> OSStatusParameters
- inExtAudioFile:
The extended audio file object that represents the file you want to read.
- ioNumberFrames:
On input, the number of frames to read from the file. On output, the number of frames actually read. Fewer frames may be read than were requested. For example, the supplied buffers may not be large enough to accommodate the requested data. If
0frames are returned, end-of-file was reached. - ioData:
One or more buffers into which the audio data is read.
Return Value
A result code.
Discussion
If the extended audio file object has an application data format, then the object’s converter converts the file data to the application format.
This function works only on a single thread. If you want your application to read an audio file on multiple threads, use Audio File Services instead.