ISpatialAudioObjectRenderStreamBase::GetAvailableDynamicObjectCount method (spatialaudioclient.h)

Gets the number of dynamic spatial audio objects that are currently available.

Syntax

HRESULT GetAvailableDynamicObjectCount(
  [out] UINT32 *value
);

Parameters

[out] value

The number of dynamic spatial audio objects that are currently available.

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.

Remarks

A dynamic ISpatialAudioObject is one that was activated by setting the type parameter to the ActivateSpatialAudioObject method to AudioObjectType_Dynamic. The system has a limit of the maximum number of dynamic spatial audio objects that can be activated at one time. Call Release on an ISpatialAudioObject when it is no longer being used to free up the resource to create new dynamic spatial audio objects.

You should not call this method after streaming has started, as the value is already provided by ISpatialAudioObjectRenderStreamBase::BeginUpdatingAudioObjects. This method should only be called before streaming has started, which occurs after ISpatialAudioObjectRenderStreamBase::Start is called.

Requirements

Return code Description
SPTLAUDCLNT_E_DESTROYED
The ISpatialAudioClient associated with the spatial audio stream has been destroyed.
AUDCLNT_E_DEVICE_INVALIDATED
The audio device associated with the spatial audio stream is no longer valid.
AUDCLNT_E_DEVICE_INVALIDATED
The audio endpoint device has been unplugged, or the audio hardware or associated hardware resources have been reconfigured, disabled, removed, or otherwise made unavailable for use.
SPTLAUDCLNT_E_INTERNAL
An internal error has occurred.
AUDCLNT_E_UNSUPPORTED_FORMAT
The media associated with the spatial audio stream uses an unsupported format.
Requirement Value
Target Platform Windows
Header spatialaudioclient.h

See also

ISpatialAudioObjectRenderStream

ISpatialAudioObjectRenderStreamBase