Defines an audio queue buffer.


typedef struct AudioQueueBuffer {
} AudioQueueBuffer;


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.


Instance Properties


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


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.


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


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


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.


An array of AudioStreamPacketDescription structures for the buffer.


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