Structure

AudioQueueBuffer

Defines an audio queue buffer.

Declaration

typedef struct AudioQueueBuffer {
    ...
} AudioQueueBuffer;

Overview

Each audio queue has an associated set of audio queue buffers. To allocate a buffer, call the AudioQueueAllocateBuffer function. To dispose of a buffer, call the AudioQueueFreeBuffer function.

If using a VBR compressed audio data format, you may want to instead use the AudioQueueAllocateBufferWithPacketDescriptions function. This function allocates a buffer with additional space for packet descriptions. The mPacketDescriptionCapacity, mPacketDescriptions, and mPacketDescriptionCount fields may only be used with buffers allocated with AudioQueueAllocateBufferWithPacketDescriptions.

Topics

Instance Properties

mAudioData

The audio data owned the audio queue buffer. The buffer address cannot be changed.

mAudioDataByteSize

The number of bytes of valid audio data in the audio queue buffer’s mAudioData field, initially set to 0. Your callback must set this value for a playback audio queue; for recording, the recording audio queue sets the value.

mAudioDataBytesCapacity

The size of the audio queue buffer, in bytes. This size is set when a buffer is allocated and cannot be changed.

mPacketDescriptionCapacity

The maximum number of packet descriptions that can be stored in the mPacketDescriptions field.

mPacketDescriptionCount

The number of valid packet descriptions in the buffer. You set this value when providing buffers for playback. The audio queue sets this value when returning buffers from a recording queue.

mPacketDescriptions

An array of AudioStreamPacketDescription structures for the buffer.

mUserData

The custom data structure you specify, for use by your callback function, when creating a recording or playback audio queue.