IAudioFrameNativeFactory::CreateFromMFSample method (windows.media.core.interop.h)

Creates an IAudioFrameNative from the provided IMFSample.

Syntax

HRESULT CreateFromMFSample(
  [in]  IMFSample *data,
  [in]  BOOL      forceReadOnly,
  [in]  REFIID    riid,
  [out] LPVOID    *ppv
);

Parameters

[in] data

Type: IMFSample*

The source buffer containing an audio frame.

[in] forceReadOnly

Type: BOOL

A value indicating whether the created software audio frame is read-only.

[in] riid

Type: REFIID

The IID of the IAudioFrameNative interface.

[out] ppv

Type: LPVOID*

When this method returns successfully, contains the requested interface.

Return value

Type: HRESULT

Returns S_OK on successful completion.

Requirements

Requirement Value
Target Platform Windows
Header windows.media.core.interop.h

See also

IAudioFrameNativeFactory