AllocateAudioBufferWithNotification method allocates a cyclic buffer for audio data when you want to implement DMA-driven event notification. If you do not want event notification, you must use IMiniportWaveRTStream::AllocateAudioBuffer.
NTSTATUS AllocateBufferWithNotification( ULONG NotificationCount, ULONG RequestedSize, PMDL *AudioBufferMdl, ULONG *ActualSize, ULONG *OffsetFromFirstPage, MEMORY_CACHING_TYPE *CacheType );
Specifies the number of notifications wanted per buffer cycle. Valid values are 1 or 2, where 1 indicates a single notification at the end of the cyclic buffer and 2 indicates two notifications per buffer cycle, one at the mid-point of the buffer and one at the end.
Specifies the requested size, in bytes, of the audio buffer.
Output pointer for a memory descriptor list (MDL) that describes the audio buffer. This parameter points to a caller-allocated pointer variable into which the method writes a pointer to the MDL.
Output pointer for the actual size, in bytes, of the allocated buffer. This parameter points to a ULONG variable into which the method writes the size value.
Output pointer for the offset (in bytes) of the buffer, from the start of the first page in the MDL. This parameter points to a caller-allocated ULONG variable into which the method writes the offset value.
Specifies the type of caching that the client requests for the audio buffer. This parameter is a MEMORY_CACHING_TYPE enumeration value
AllocateBufferWithNotification returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error status code. The following table shows some of the possible error status codes.
||The driver does not support the specified combination of buffer attributes.|
||There is insufficient memory available to allocate the buffer.|
||The device is not ready.|
AllocateBufferWithNotificationmethod to allocate a cyclic buffer that the port driver can later map to the virtual address space of the client.
AllocateBufferWithNotificationoperates in a manner similar to IMiniportWaveRTStream::AllocateAudioBuffer. Additionally,
AllocateBufferWithNotificationidentifies to the WaveRT port driver that DMA-driven event notification is wanted, and it specifies how many notifications per cycle of the cyclic buffer are needed.
|Minimum supported client||Available in Windows Vista and later Windows operating systems.|