Instance Method

writeFromBuffer:error:

Write a buffer.

Declaration

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

Parameters

buffer

The buffer from which to write to 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 write was successful.

Discussion

Writes sequentially. The buffer’s frameLength signifies how much of the buffer is to be written.

See Also

Reading and Writing the Audio Buffer

- readIntoBuffer:error:

Read an entire buffer.

- readIntoBuffer:frameCount:error:

Read a portion of a buffer.