Previous Next

IMXF::SetState

The SetState method is used to set the state of the MIDI transform interface.

NTSTATUS
  SetState(
    IN KSSTATE  kState
    );

Parameter

kState
Specifies the state that the filter graph is to be set to. This parameter is a KSSTATE enumeration value. See the following Comments section.

Return Value

SetState returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.

Headers

Declared in dmusicks.h. Include dmusicks.h.

Comments

For an audio filter graph, the four KSSTATE enumeration values are interpreted as follows:

The behavior of the miniport driver depends on the state of the filter graph. This behavior differs for render (output) and capture (input).

On the output side, if the current state is anything other than KSSTATE_RUN, the IMXF interface should hold onto the data and not pass it to the hardware. If the current state is KSTATE_STOP then the miniport driver should discard any data it is given by passing that data to the allocator.

On the input side, if the input stream is in either KSSTATE_RUN or KSSTATE_PAUSE, it is legal for the miniport driver to get messages from the allocator and send them upstream to the capture sink. If the state is KSSTATE_STOP or KSSTATE_ACQUIRE and the hardware is trying to produce data, that data should be thrown away.

See Also

KSSTATE, KSPROPERTY_CONNECTION_STATE