The SetState method sets the new state of playback or recording for the stream.
NTSTATUS
SetState(
IN KSSTATE State
);
SetState returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.
Declared in portcls.h. Include portcls.h.
For an audio filter graph, the four KSSTATE enumeration values are interpreted as follows:
Data transport in the current audio filter graph is running and functioning as normal.
This is a transitional state that helps to manage the transition between KSSTATE_RUN and KSSTATE_STOP.
This is a transitional state that helps to manage the transition between KSSTATE_RUN and KSSTATE_STOP.
Data transport is stopped in the current audio filter graph.
For most miniport drivers, KSSTATE_ACQUIRE and KSSTATE_PAUSE are indistinguishable.
Transitions always occur in one of the following two sequences:
The IMiniportWaveCyclic::NewStream method sets the initial state of the stream to KSSTATE_STOP.
The SetState method is called at IRQL PASSIVE_LEVEL.