AudioQueue.AllocateBufferWithPacketDescriptors(Int32, Int32, IntPtr) Method

Definition

Allocates an audio queue object for variable-bit-rate buffers.

public AudioToolbox.AudioQueueStatus AllocateBufferWithPacketDescriptors (int bufferSize, int nPackets, out IntPtr audioQueueBuffer);
member this.AllocateBufferWithPacketDescriptors : int * int *  -> AudioToolbox.AudioQueueStatus

Parameters

bufferSize
Int32

Size of the buffer to allocate.

nPackets
Int32

Number of packets descriptors in the audio queue buffer.

audioQueueBuffer
IntPtr

nativeint

The allocated buffer on return

Returns

AudioQueueStatus.Ok on success and the audioQueueBuffer pointing to the buffer, otherwise the error.

Remarks

Use the AllocateBuffer(Int32, AudioQueueBuffer*) to allocate buffers that will be used with fixed bit rate encodings.

Use FreeBuffer(IntPtr) to dispose the buffer.

Applies to