閱讀英文

共用方式為


ISpatialAudioObjectForHrtf::IsActive method

Gets a value indicating whether the ISpatialAudioObjectForHrtf is valid.

Syntax

c++
HRESULT IsActive(
  [out] BOOL isActive
);

Parameters

  • isActive [out]
    True if the audio object is currently valid; otherwise, false.

Return value

If the method succeeds, it returns S_OK.

Remarks

If this value is false, you should call Release to make the audio object resource available in the future.

IsActive will be set to false after SetEndOfStream is called implicitly or explicitly. SetEndOfStream is called implicitly by the system if GetBuffer is not called within an audio processing pass (between calls to ISpatialAudioObjectRenderStreamForHrtf::BeginUpdatingAudioObjects and ISpatialAudioObjectRenderStreamForHrtf::EndUpdatingAudioObjects).

The rendering engine will also deactivate the audio object, setting IsActive to false, when audio object resources become unavailable. In this case, a notification is sent via ISpatialAudioObjectRenderStreamNotify before the object is deactivated.

Requirements

Header

Spatialaudiohrtf.h

See also

ISpatialAudioObjectForHrtf