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.
Caution
Call 'AllocateBuffer(int, int, out AudioQueueBuffer*)' instead.
Allocates an audio queue object for variable-bit-rate buffers.
public AudioToolbox.AudioQueueStatus AllocateBufferWithPacketDescriptors(int bufferSize, int nPackets, out IntPtr audioQueueBuffer);
[System.Obsolete("Call 'AllocateBuffer(int, int, out AudioQueueBuffer*)' instead.")]
public AudioToolbox.AudioQueueStatus AllocateBufferWithPacketDescriptors(int bufferSize, int nPackets, out IntPtr audioQueueBuffer);
member this.AllocateBufferWithPacketDescriptors : int * int * nativeint -> AudioToolbox.AudioQueueStatus
[<System.Obsolete("Call 'AllocateBuffer(int, int, out AudioQueueBuffer*)' instead.")>]
member this.AllocateBufferWithPacketDescriptors : int * int * nativeint -> AudioToolbox.AudioQueueStatus
Parameters
- bufferSize
- Int32
Size of the audio data in the allocated buffer, in bytes.
- nPackets
- Int32
The number of elements in the packet descriptions array in the returned buffer.
- audioQueueBuffer
-
IntPtr
nativeint
The allocated buffer on return. Cast this to a pointer to a AudioQueueBuffer to use it.
Returns
Ok on success and the audioQueueBuffer pointing to the buffer, otherwise the error code.
- Attributes
Remarks
Use the AllocateBuffer(Int32, AudioQueueBuffer*) to allocate buffers that will be used with fixed bit rate encodings.
Use FreeBuffer(IntPtr) to free the buffer (if not it will be freed when this audio queue is disposed).