acmStreamPrepareHeader(3mms) — Subroutines
Name
acmStreamPrepareHeader --- Prepare an ACMSTREAMHEADER data structure for ACM stream conversion
Syntax
#include <mme/mme_api.h>
MMRESULT acmStreamPrepareHeader(HACMSTREAM has,
LPACMSTREAMHEADER pash,
DWORD fdwPrepare)
Arguments
HACMSTREAM has
Specifies a handle to the conversion steam.
LPACMSTREAMHEADER pash
Specifies a pointer to an ACMSTREAMHEADER data structure that identifies the source and destination data buffers to be prepared.
The pash argument must be allocated with the mmeAllocMem function. See mmeAllocMem for more information about memory allocation.
The ACMSTREAMHEADER data structure and the source and destination data buffers pointed to by its (pbSrc) and (pbDst) fields must be allocated with the fImmeAllocBuffer function. Preparing a stream header that has already been prepared has no effect, and the function returns zero. However, an application should take care to structure code so multiple prepares do not occur.
DWORD fdwPrepare
Is not used and must be set to zero.
Description
The acmStreamPrepareHeader function prepares an ACMSTREAMHEADER data structure for an Audio Compression Manager (ACM) stream conversion. This function must be called for every stream header before it can be used in a conversion stream. An application only needs to prepare a stream header once for the life of a given stream; the stream header can be reused as long as the size of the source and destination buffers do not exceed the sizes used when the stream header was originally prepared.
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} MMSYSERR_NOMEM@T{ Unable to allocate resources. T}