ISpatialAudioObjectForHrtf::SetDistanceDecay method (spatialaudiohrtf.h)

Sets the decay model that is applied over distance from the position of an ISpatialAudioObjectForHrtf to the position of the listener.

Syntax

HRESULT SetDistanceDecay(
  [in] SpatialAudioHrtfDistanceDecay *distanceDecay
);

Parameters

[in] distanceDecay

The decay model.

Return value

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
SPTLAUDCLNT_E_OUT_OF_ORDER

ISpatialAudioObjectRenderStreamBase::BeginUpdatingAudioObjects was not called before the call to SetDistanceDecay.

SPTLAUDCLNT_E_RESOURCES_INVALIDATED

SetEndOfStream was called either explicitly or implicitly in a previous audio processing pass. SetEndOfStream is called implicitly by the system if GetBuffer is not called within an audio processing pass (between calls to ISpatialAudioObjectRenderStreamBase::BeginUpdatingAudioObjects and ISpatialAudioObjectRenderStreamBase::EndUpdatingAudioObjects).

Remarks

If SetEnvironment is not called, the default values are used.

Requirements

Requirement Value
Target Platform Windows
Header spatialaudiohrtf.h

See also

ISpatialAudioObjectForHrtf