ISpatialAudioMetadataItemsBuffer::AttachToPopulatedBuffer method (spatialaudiometadata.h)
Attaches a previously populated buffer for storage of ISpatialAudioMetadataItems objects. The metadata items already in the buffer are retained.
Syntax
HRESULT AttachToPopulatedBuffer(
[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 |
---|---|
|
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. |
|
The supplied buffer has already been attached. |
|
The ISpatialAudioMetadataItems was created to use a media pipeline internal buffer, so an external buffer can't be attached. |
|
The supplied populated buffer uses a format that is different from the current format. |
|
One of the provided pointers is not valid.
The supplied buffer is not large enough to hold the maximum number of metadata items. Call GetSpatialAudioMetadataItemsBufferLength to determine the required buffer size. |
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | spatialaudiometadata.h |