ISpatialAudioMetadataItemsBuffer::AttachToBuffer method (spatialaudiometadata.h)

Attaches caller-provided memory for storage of ISpatialAudioMetadataItems objects.

Syntax

HRESULT AttachToBuffer(
  [in] BYTE   *buffer,
       UINT32 bufferLength
);

Parameters

[in] buffer

A pointer to memory to use for storage.

bufferLength

The length of the supplied buffer. This size must match the length required for the metadata format and maximum metadata item count.

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
SPTLAUD_MD_CLNT_E_NO_ITEMS_OPEN
The ISpatialAudioMetadataItems has not been opened for copying with a call to Open or the object has been closed for writing with a call to Close.
SPTLAUD_MD_CLNT_E_ATTACH_FAILED_INTERNAL_BUFFER
The ISpatialAudioMetadataItems was created to use a media pipeline internal buffer, so an external buffer can't be attached.
SPTLAUD_MD_CLNT_E_BUFFER_ALREADY_ATTACHED
The supplied buffer has already been attached.
E_INVALIDARG
One of the provided pointers is not valid.

The supplied buffer is not large enough to hold the maximum number of metadata items.

Requirements

Requirement Value
Target Platform Windows
Header spatialaudiometadata.h

See also

ISpatialAudioMetadataItemsBuffer