ACMDRVSTREAMHEADER

This structure describes a source buffer and a destination buffer associated with a conversion stream. This structure is used with the ACMDM_STREAM_PREPARE, ACMDM_STREAM_UNPREPARE, and ACMDM_STREAM_CONVERT messages.

Syntax

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;

Members

cbStruct
Specifies the size, in bytes, of the structure.
fdwStatus
Contains status flags. The defined flags are as follows:
ACMSTREAMHEADER_STATUSF_DONE
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_STATUSF_PREPARED
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_STATUSF_INQUEUE
Used by the driver during asynchronous conversions to indicate that the structure has been queued for conversion. The driver is responsible for setting and clearing this flag. See ACMDM_STREAM_CONVERT.
dwUser
Specifies information supplied by a client for its own use.
pbSrc
Pointer to a source buffer. For an ACMDM_STREAM_CONVERT message, this buffer contains the data to be converted.
cbSrcLength
Specifies the length, in bytes, of the source buffer pointed to by pbSrc. For the ACMDM_STREAM_PREPARE and ACMDM_STREAM_UNPREPARE messages, this value represents the maximum source buffer size. For ACMDM_STREAM_CONVERT, this value represents the length of the data in the buffer.
cbSrcLengthUsed
Specifies the length, in bytes, of source data that has been converted. The driver sets this value to indicate the number of bytes in the source buffer that the driver actually converted. The value cannot be greater than the value in cbSrcLength.
dwSrcUser
Specifies information supplied by a client for its own use.
pbDst
Pointer to a destination buffer. For an ACMDM_STREAM_CONVERT message, the driver fills this buffer with converted data.
cbDstLength
Specifies the length, in bytes, of the destination buffer pointed to by pbDst.
cbDstLengthUsed
Specifies the length, in bytes, of destination data that has been converted. The driver sets this value to indicate the number of converted bytes that it has placed in the destination buffer. The value cannot be greater than the value in cbDstLength. If the conversion fails, the driver must set this value to 0.
dwDstUser
Specifies information supplied by a client for its own use.
fdwConvert
Specifies one of the following values:
ACMDM_STREAM_PREPARE
Not used.
ACMDM_STREAM_UNPREPARE
Not used.
ACMDM_STREAM_CONVERT
Specifies the acmStreamConvert function’s fdwConvert parameter.

For ACMDM_STREAM_CONVERT, the following flags are defined:

ACM_STREAMCONVERTF_BLOCKALIGN
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 this 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_START
Indicates that the driver re-initializes 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_END
Indicates that the driver returns 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.
padshNext
Pointer to another ACMDRVSTREAMHEADER structure. An asynchronous driver can use this member for creating a queue of pending conversion requests. The ACM clears this member prior to sending an ACMDM_STREAM_PREPARE or ACMDM_STREAM_CONVERT message.
fdwDriver
Contains stream instance information supplied by the driver for its own use. This member is intended for storing driver-defined flags, but you can use it for storing any data that fits into a DWORD. The ACM clears this member prior to sending an ACMDM_STREAM_PREPARE message. Otherwise its value is preserved from one message to the next.
dwDriver
Specifies stream instance information supplied by the driver for its own use. You can use this member for any purpose. The ACM clears this member prior to sending an ACMDM_STREAM_PREPARE message. Otherwise, its value is preserved from one message to the next.
fdwPrepared
Specifies the fdwPrepared member to the acmStreamPrepareHeader function. Used by the ACM only.
dwPrepared
Specifies the parameter to the acmStreamPrepareHeader function. Used by the ACM only.
pbPreparedSrc
Pointer to the source buffer supplied with the acmStreamPrepareHeader function. Used by the ACM only.
cbPreparedSrcLength
Specifies the length of the source buffer supplied with the acmStreamPrepareHeader function. Used by the ACM only.
pbPreparedDst
Pointer to the destination buffer supplied with the acmStreamPrepareHeader function. Used by the ACM only.
cbPreparedDstLength
Specifies the length of the destination buffer supplied with the acmStreamPrepareHeader function. Used by the ACM only.

Remarks

This structure is declared in the Msacmdrv.h header file.