Instance Method

readIntoBuffer:error:

Read an entire buffer.

Declaration

- (BOOL)readIntoBuffer:(AVAudioPCMBuffer *)buffer error:(NSError * _Nullable *)outError;

Parameters

buffer

The buffer from which to read the file. Its format must match the file’s processing format.

outError

Returns, by-reference, a description of the error, if an error occurs.

Return Value

YES, if the read was successful; otherwise NO.

Discussion

Reading sequentially from the framePosition property, attempts to fill the buffer to its capacity. On return, the buffer’s length property indicates the number of sample frames successfully read.

See Also

Reading and Writing the Audio Buffer

- readIntoBuffer:frameCount:error:

Read a portion of a buffer.