Reads bytes of audio data from an audio file.
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
The audio file whose bytes of audio data you want to read.
trueif you want to cache the data. You should cache reads and writes if you read or write the same portion of a file multiple times. To request that the data not be cached, if possible, set to
false. You should not cache reads and writes if you read or write data from a file only once.
The byte offset of the audio data you want to be returned.
On input, a pointer to the number of bytes to read. On output, a pointer to the number of bytes actually read.
A pointer to user-allocated memory large enough for the requested bytes.
A result code. See Result Codes.
In most cases, you should use
Audio instead of this function.
This function returns
eof when the read operation encounters the end of the file. Note that Audio File Services only reads one 32-bit chunk of a file at a time.