AudioQueue.AllocateBufferWithPacketDescriptors(Int32, Int32, IntPtr) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.