Function

AudioFileWriteBytes

Writes bytes of audio data to an audio file.

Declaration

OSStatus AudioFileWriteBytes(AudioFileID inAudioFile, Boolean inUseCache, SInt64 inStartingByte, UInt32 *ioNumBytes, const void *inBuffer);

Parameters

inAudioFile

The audio file to which you want to write bytes of data.

inUseCache

Set to true if you want to cache the data. Otherwise, set to false.

inStartingByte

The byte offset where the audio data should be written.

ioNumBytes

On input, a pointer the number of bytes to write. On output, a pointer to the number of bytes actually written.

inBuffer

A pointer to a buffer containing the bytes to be written.

Return Value

A result code. See Result Codes.

Discussion

In most cases, you should use AudioFileWritePackets instead of this function.

See Also

Reading and Writing Audio Files

AudioFileReadBytes

Reads bytes of audio data from an audio file.

AudioFileReadPacketData

Reads packets of audio data from an audio file.

AudioFileReadPackets

Reads a fixed duration of audio data from an audio file.

Deprecated
AudioFileWritePackets

Writes packets of audio data to an audio data file.