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.
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.
A client sends the ACMDM_STREAM_SIZE message by calling the driver’s DriverProc entry point, passing the specified parameters. 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.
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.