IMiniportWaveRT::NewStream method (portcls.h)

The NewStream method creates a new instance of a WaveRT stream object.

Syntax

NTSTATUS NewStream(
  [out] PMINIPORTWAVERTSTREAM *Stream,
  [in]  PPORTWAVERTSTREAM     PortStream,
  [in]  ULONG                 Pin,
  [in]  BOOLEAN               Capture,
  [in]  PKSDATAFORMAT         DataFormat
);

Parameters

[out] Stream

Output pointer for the new stream. This parameter points to a caller-allocated pointer variable, into which the NewStream method writes a pointer to the IMiniportWaveRTStream interface of the new stream object. The caller specifies a valid, non-NULL pointer for this parameter.

[in] PortStream

Pointer to the IPortWaveRTStream.

[in] Pin

Specifies a pin ID that identifies the pin to be opened. If the filter descriptor of the WaveRT miniport driver specifies a total of n pin factories on the filter, valid values for the Pin parameter are in the range 0 to n-1. For more information about filter descriptors, see the Filter Factories topic.

[in] Capture

Specifies a Boolean value that indicates whether to create a capture stream or a render stream. This parameter is TRUE for a capture (input) stream, and FALSE for a playback (output) stream.

[in] DataFormat

Pointer to a KSDATAFORMAT structure that specifies the data format of the new stream. For more information, see the following Remarks section.

Return value

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

Remarks

The NewStream method sets the initial state of the stream to KSSTATE_STOP and its initial position to 0. For more information, see related methods IMiniportWaveRTStream::SetState and IMiniportWaveRTStream::GetPosition.

The DataFormat parameter, which specifies the data format of the stream, points to one of the following audio-specific, extended versions of the KSDATAFORMAT structure:

The Stream and PortStream parameters follow the reference-counting conventions for COM objects.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later Windows operating systems.
Target Platform Universal
Header portcls.h
IRQL Passive level.

See also

IMiniportWaveRT

IMiniportWaveRTStream

IMiniportWaveRTStream::GetPosition

IMiniportWaveRTStream::SetState

IPortWaveRTStream