typedef struct { DWORD cbStruct; DWORD fdwStatus; DWORD dwUser; LPBYTE pbSrc; DWORD cbSrcLength; DWORD cbSrcLengthUsed; DWORD dwSrcUser; LPBYTE pbDst; DWORD cbDstLength; DWORD cbDstLengthUsed; DWORD dwDstUser; DWORD fdwConvert; LPACMDRVSTREAMHEADER padshNext; DWORD fdwDriver; DWORD dwDriver; DWORD fdwPrepared; DWORD dwPrepared; LPBYTE pbPreparedSrc; DWORD cbPreparedSrcLength; LPBYTE pbPreparedDst; DWORD cbPreparedDstLength; } ACMDRVSTREAMHEADER;
The ACMDRVSTREAMHEADER structure describes a source buffer and a destination buffer associated with a conversion stream. The structure is used with the ACMDM_STREAM_PREPARE, ACMDM_STREAM_UNPREPARE, and ACMDM_STREAM_CONVERT messages. ACMDRVSTREAMHEADER is defined in msacmdrv.h.
Flag |
Meaning |
ACMSTREAMHEADER_ |
Indicates that a conversion is complete. For synchronous conversion, the ACM sets this flag when the driver returns from an ACMDM_STREAM_CONVERT message. For asynchronous drivers, the driver sets this flag after the data has been converted. The ACM clears the flag before sending each ACMDM_STREAM_CONVERT message. |
ACMSTREAMHEADER_ |
Indicates that the data buffers have been prepared. This flag is set by the ACM, regardless of whether the driver or the ACM prepared the buffers. See ACMDM_STREAM_PREPARE and ACMDM_STREAM_UNPREPARE. |
ACMSTREAMHEADER_ |
Used by the driver, during asynchronous conversions, to indicate the structure has been queued for conversion. The driver is responsible for setting and clearing this flag. See ACMDM_STREAM_CONVERT. |
For ACMDM_STREAM_CONVERT, the following flags are defined.
Flags |
Meaning |
ACM_STREAMCONVERTF_ |
Indicates that only whole blocks of source data should be converted. The size of a block is obtained from the source format’s WAVEFORMATEX structure (see ACMDRVSTREAMINSTANCE). If the flag is set, the driver should not convert extra bytes that do not make up a whole block. Generally, clients set this flag for all buffers in a conversion stream except the last one. |
ACM_STREAMCONVERTF_ |
Indicates that the driver should re-initialize stream instance data, such as predictor coefficients or scale factors, to default starting values. This flag can be specified with the ACM_STREAMCONVERTF_END flag. |
ACM_STREAMCONVERTF_ |
Indicates that the driver should return end-of-stream data, such as tail end echo data for an echo filter, in the destination buffer, along with data converted from the source buffer. This flag can be specified with the ACM_STREAMCONVERTF_START flag. |