ISpatialAudioMetadataClient::ActivateSpatialAudioMetadataItems method (spatialaudiometadata.h)

Creates an ISpatialAudioMetadataItems object for storing spatial audio metadata items.

Syntax

HRESULT ActivateSpatialAudioMetadataItems(
  [in]            UINT16                           maxItemCount,
  [in]            UINT16                           frameCount,
  [out, optional] ISpatialAudioMetadataItemsBuffer **metadataItemsBuffer,
  [out]           ISpatialAudioMetadataItems       **metadataItems
);

Parameters

[in] maxItemCount

The maximum number of metadata items that can be stored in the returned ISpatialAudioMetadataItems.

[in] frameCount

The valid range of frame offset positions for metadata items stored in the returned ISpatialAudioMetadataItems.

[out, optional] metadataItemsBuffer

If a pointer is supplied, returns an ISpatialAudioMetadataItemsBuffer interface which provides methods for attaching caller-provided memory for storage of metadata items. If this parameter is NULL, the object will allocate internal storage for the items. This interface cannot be obtained via QueryInterface.

[out] metadataItems

Receives an instance ISpatialAudioMetadataItems object which can be populated with metadata items using an by ISpatialAudioMetadataWriter or ISpatialAudioMetadataCopier and can be read with an ISpatialAudioMetadataReader.

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
E_INVALIDARG
The pointer provided in the metadataItems parameter is not valid.

The value of maxItemCount or frameCount is 0.

Requirements

Requirement Value
Target Platform Windows
Header spatialaudiometadata.h

See also

ISpatialAudioMetadataClient