ACMDM_STREAM_SIZE

The ACMDM_STREAM_SIZE message requests an ACM driver to return the size required for a source (or destination) buffer, given a specified destination (or source) buffer size along with source and destination format descriptions.

Parameters

dwDriverID
Driver instance identifier. This is the value returned by the driver in response to the ACM_Open function.
hDriver
Driver handle.
uMsg
ACMDM_STREAM_SIZE
lParam1
Pointer to an ACMDRVSTREAMINSTANCE structure.
lParam2
Pointer to an ACMDRVSTREAMSIZE structure.

Return Value

The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR error codes defined in Mmsystem.h, or one of the ACMERR error codes defined in Msacm.h.

Comments

The ACM (WAVEAPI.DLL) sends the ACMDM_STREAM_SIZE message by calling the ACM driver's ACM_IOControl() entry point via DeviceIoControl(). The ACM sends this message when an application calls the acmStreamSize function, which is described in the Win32 SDK.

All ACM drivers that provide stream conversions must support this message. For more information about stream conversions, see Converting Data Streams in the Windows NT DDK.

Based on the input arguments, the driver must answer one of the following questions:

The ACMDRVSTREAMINSTANCE structure received with this message is the same structure that was received with a previous ACMDM_STREAM_OPEN message. The driver does not need to validate the structure's contents again.

The driver examines the ACMDRVSTREAMSIZE structure to determine which buffer (source or destination) the client has supplied. The ACMDRVSTREAMINSTANCE structure contains structures that describe the source and destination formats, and, possibly, a filter specification. The driver uses this information to determine the size of the requested buffer.

If the driver returns a buffer length of zero, the ACM provides an error return code of ACMERR_NOTPOSSIBLE to acmStreamSize.