The ACMDM_STREAM_UNPREPARE message requests an ACM driver to clear the preparation of the buffers associated with an ACMDRVSTREAMHEADER structure.
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_UNPREPARE message by calling the driver’s DriverProc entry point, passing the specified parameters. The ACM sends this message when an application calls the acmStreamUnprepareHeader function, which is described in the Win32 SDK.
Support for this message is optional. If a driver supports ACMDM_STREAM_PREPARE, it must support ACMDM_STREAM_UNPREPARE.
If the driver returns MMSYSERR_NOTSUPPORTED, the ACM clears the buffer preparation. For most drivers, this behavior is sufficient. If the driver does clear buffer preparation, it should return MMSYSERR_NOERROR. In either case, the ACM clears ACMSTREAMHEADER_STATUSF_PREPARED in the ACMDRVSTREAMHEADER structure’s fdwStatus member. The driver never modifies this flag. (If you want both your driver and the ACM to clear buffer preparations, the driver should return MMSYSERR_NOTSUPPORTED after clearing its preparation. The ACM can then also clear its preparation.)
Before calling the driver’s DriverProc function, the ACM verifies that:
For more information about the use of ACMDM_STREAM_UNPREPARE, see Converting Data Streams.