ACMDRVSTREAMHEADER

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.

Members

cbStruct

Contains the size, in bytes, of the ACMDRVSTREAMHEADER structure.

fdwStatus

Contains status flags. The defined flags are as follows:

Flag Meaning
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 the structure has been queued for conversion. The driver is responsible for setting and clearing this flag. See ACMDM_STREAM_CONVERT.

dwUser

Contains 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

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

Length, in bytes, of source data that has been converted. This value is set by the driver 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

Contains 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

Length, in bytes, of the destination buffer pointed to by pbDst.

cbDstLengthUsed

Length, in bytes, of destination data that has been converted. This value is set by the driver 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 zero.

dwDstUser

Contains information supplied by a client for its own use.

fdwConvert

Contains one of the following values:

·For the ACMDM_STREAM_PREPARE message, the value specified as the acmStreamPrepareHeader function's fdwPrepare argument. (Not used.)

·For the ACMDM_STREAM_UNPREPARE message, the value specified as the acmStreamUnprepareHeader function's fdwUnprepare argument. (Not used.)

·For the ACMDM_STREAM_CONVERT message, the value specified as the acmStreamConvert function's fdwConvert argument.

For ACMDM_STREAM_CONVERT, the following flags are defined.

Flags Meaning
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 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_
START
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_
END
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.

padshNext

Pointer to another ACMDRVSTREAMHEADER structure. An asynchronous driver can use this member for creating a queue of pending conversion requests. The ACM clears the 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 any purpose you wish. 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

Contains stream instance information supplied by the driver for its own use. You can use this member for any purpose you wish. 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

Used by ACM only. Contains the fdwPrepared argument to the acmStreamPrepareHeader function.

dwPrepared

Used by ACM only. Contains the has argument to the acmStreamPrepareHeader function.

pbPreparedSrc

Used by ACM only. Contains the address of source the buffer supplied with the acmStreamPrepareHeader function.

cbPreparedSrcLength

Used by ACM only. Contains the length of the source buffer supplied with the acmStreamPrepareHeader function.

pbPreparedDst

Used by ACM only. Contains the address of the destination buffer supplied with the acmStreamPrepareHeader function.

cbPreparedDstLength

Used by ACM only. Contains the length of the destination buffer supplied with the acmStreamPrepareHeader function.