acmStreamUnprepareHeader(3mms) — Subroutines
Name
acmStreamUnprepare --- Clean up the preparation performed by the acmStreamPrepareHeader function for an ACM stream
Syntax
#include <mme/mme_api.h>
MMRESULT acmStreamUnprepareHeader(HACMSTREAM has,
LPACMSTREAMHEADER pash,
DWORD fdwUnprepare)
Arguments
HACMSTREAM has
Specifies a handle to the conversion stream.
LPACMSTREAMHEADER pash
Specifies a pointer to an ACMSTREAMHEADER data structure that identifies the source and destination data buffers to be unprepared.
DWORD fdwUnprepare
Is not used and must be set to zero.
Description
The acmStreamUnprepare function cleans up the preparation performed by the acmStreamPrepareHeader function for an Audio Compression Manager (ACM) stream. This function must be called after the ACM is finished with the given buffers. An application must call this function before freeing the source and destination buffers.
Unpreparing a stream header that has already been unprepared is an error. An application must specify the source and destination buffer lengths (cbSrcLength and cbDstLength, respectively) that were used during the corresponding acmStreamPrepareHeader call. Failing to reset these field values will cause acmStreamUnprepare to fail with MMSYSERR_INVALPARAM.
Note that there are some errors that the ACM can recover from. The ACM will return a nonzero error, yet the stream header will be properly unprepared. To determine whether the stream header was actually unprepared, an application can examine the ACMSTREAMHEADER_STATUSF_PREPARED flag. The header will always be unprepared if the acmStreamUnprepare function returns success.
Extensions
None.
Return Values
Returns zero if the function is successful; otherwise, it returns a nonzero error number or one of the following error codes:
MMSYSERR_INVALHANDLE@T{ The specified handle is invalid. T} MMSYSERR_INVALPARAM@T{ One or more arguments passed is invalid. T} MMSYSERR_INVALFLAG@T{ One or more flags is invalid. T} ACMERR_BUSY@T{ The stream header pash is currently in use and cannot be unprepared. T} ACMERR_UNPREPARED@T{ The stream header pash is currently not prepared by the acmStreamPrepareHeader function. T}