ACMDRVSTREAMINSTANCE

See also ACMDM_STREAM_CONVERT, ACMDM_STREAM_OPEN, ACMDM_STREAM_PREPARE, ACMDM_STREAM_RESET, ACMDM_STREAM_SIZE, ACMDM_STREAM_UNPREPARE, ACMDRVOPENDESC, ACMDRVSTREAMHEADER, ACMDRVSTREAMSIZE


typedef struct {
    DWORD cbStruct;           
    LPWAVEFORMATEX pwfxSrc;   
    LPWAVEFORMATEX pwfxDst;   
    LPWAVEFILTER pwfltr;      
    DWORD dwCallback;         
    DWORD dwInstance;         
    DWORD fdwOpen;            
    DWORD fdwDriver;          
    DWORD dwDriver;           
    HACMSTREAM has;           
} ACMDRVSTREAMINSTANCE;

Contains instance information for an open Audio Compression Manager (ACM) driver conversion stream. This structure is passed as the lParam1 parameter for all ACM driver messages for conversion streams. Except where noted, no members of this structure can be modified by the driver, because they are intended for state information about a conversion stream and are maintained by the ACM.

cbStruct

Size, in bytes, of the ACMDRVSTREAMINSTANCE structure. This member is initialized by the ACM before calling the driver. This member can be greater than the size, in bytes, of the base ACMDRVSTREAMINSTANCE structure. An ACM driver should ignore any members that are not contained in the base ACMDRVSTREAMINSTANCE structure. This member should not be modified by the driver.

pwfxSrc

Address of a WAVEFORMATEX structure that defines the source format for a conversion stream. This member will never be NULL. This member should not be modified by the driver.

pwfxDst

Address of a WAVEFORMATEX structure that defines the destination format for a conversion stream. This member will never be NULL. This member should not be modified by the driver.

pwfltr

Address of an optional WAVEFILTER structure that defines the filter to be used on a conversion stream. This member will be NULL if no filter is being used on the conversion stream. This member should not be modified by the driver.

dwCallback

Specifies the address of a callback function, a window handle, or a handle to an event, depending on the flags specified in the fdwOpen member. The driver uses this information to notify the client via the DriverCallback function. Note that this member is valid only for streams opened with the ACM_STREAMOPEN_ASYNC flag. If this member is zero, no callback should be performed on a open, close, or buffer-completion operation for a conversion stream.

dwInstance

Specifies 32 bits of instance information for the client. This instance information must be returned to the client whenever the driver notifies the client via the DriverCallback function.

fdwOpen

This member defines flags used for opening an ACM conversion stream. This member is identical to the fdwOpen parameter passed to acmStreamOpen. This member should not be modified by the driver.

ACM_STREAMOPENF_ASYNC

Specifies that conversion of the stream should be performed asynchronously. If this flag is specified, the application can use a callback to be notified when the conversion stream is opened and closed, and after each buffer is converted. In addition to using a callback, an application can examine the fdwStatus of the ACMSTREAMHEADER structure for the ACMSTREAMHEADER_STATUSF_DONE flag.

ACM_STREAMOPENF_NONREALTIME

Specifies that the driver should not consider time constraints when converting the data. By default, the driver should attempt to convert the data in real time. If the conversion cannot be performed in real time, the driver should fail to open the conversion stream by returning ACMERR_NOTPOSSIBLE for the ACMDM_STREAM_OPEN message.

ACM_STREAMOPENF_QUERY

Specifies that the driver is being queried to determine whether it supports the given conversion. A conversion stream will not be opened.

CALLBACK_EVENT

Specifies that dwCallback is a handle to an event.

CALLBACK_FUNCTION

Specifies that dwCallback is a callback procedure address. The function prototype must conform to the acmStreamConvertCallback convention.

CALLBACK_WINDOW

Specifies that dwCallback is a window handle.


fdwDriver

32 bits of driver-defined flags. This member is intended for drivers to use for driver-specific flags. However, this member can be any instance data specified by the driver. Note that this member is set by the driver and can be modified during any conversion-stream driver messages. This member will be passed back with all conversion-stream driver messages unmodified by the ACM while the conversion stream remains open.

dwDriver

32 bits of driver-defined data. This can be any instance data specified by the driver. Note that this member is set by the driver and can be modified during any conversion- stream driver messages. This member will be passed back with all conversion-stream driver messages unmodified by the ACM while the conversion stream remains open.

has

Client handle to the open conversion stream assigned by the ACM. This handle must be used when notifying the client with the DriverCallback function for asynchronous conversions.

The ACMDRVSTREAMINSTANCE structure is used to contain instance data for a conversion stream. This structure will be passed as the lParam1 parameter of all conversion-stream driver messages. No members of this structure will change from the initial state passed to the ACMDM_STREAM_OPEN message. Therefore, a driver never needs to validate information in this structure after succeeding the ACMDM_STREAM_OPEN message.

The fdwDriver and dwDriver members of the ACMDRVSTREAMINSTANCE structure can be modified by the driver at any time. All remaining members must not be modified by the driver under any circumstances.