
CSpStreamFormat::ParamValidateAssignFormat
CSpStreamFormat::ParamValidateAssignFormat validates the format ID and wave format. If successful, creates the stream using AssignFormat.
HRESULT ParamValidateAssignFormat(
REFGUID rguidFormatId,
const WAVEFORMATEX *pWaveFormatEx,
BOOL fRequireWaveFormat = FALSE
)
Parameters
- rguidFormatId
- The reference format ID of the requesting stream.
- pWaveFormatEx
- The wave format of the requesting stream.
- fRequireWaveFormat
- Optional Boolean indicating to create the stream only if the wave format is of a standard type. It is FALSE by default and may be omitted. TRUE, allows the creation of custom formats.
Return values
Value | Description |
---|---|
E_INVALIDARG | At least one of pWaveFormatEx is NULL, pWaveFormatEx is bad or invalid, rguidFormatId is not SPDFID_WaveFormatEx, or pWaveFormatEx is a non-standard format and is disallowed by fRequireWaveFormat. |