ISpatialAudioMetadataItemsBuffer::DetachBuffer method (spatialaudiometadata.h)

Detaches the buffer. Memory can only be attached to a single metadata item at a time.

Syntax

HRESULT DetachBuffer();

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 which can't be detached.
SPTLAUD_MD_CLNT_E_BUFFER_NOT_ATTACHED
The supplied buffer is not 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