ISpatialAudioMetadataWriter::WriteNextItemCommand method (spatialaudiometadata.h)

Writes metadata commands and value data to the current item.

Syntax

HRESULT WriteNextItemCommand(
  [in] BYTE       commandID,
  [in] const void *valueBuffer,
  [in] UINT32     valueBufferLength
);

Parameters

[in] commandID

A command supported by the metadata format of the object. The call will fail if the command not defined by metadata format. Each command can only be written once per item.

[in] valueBuffer

A pointer to a buffer which stores data specific to the command as specified by the metadata format definition.

[in] valueBufferLength

The size, in bytes, of the command data supplied in the valueBuffer parameter. The size must match command definition specified by the metadata format or the call will fail.

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 writing with a call to Open or the object has been closed for writing with a call to Close.
SPTLAUD_MD_CLNT_E_NO_ITEMOFFSET_WRITTEN

WriteNextItem was not called after Open was called and before the call to WriteNextItemCommand.

Remarks

You must open the ISpatialAudioMetadataWriter for writing by calling Open, and set the current metadata item offset by calling WriteNextItem before calling WriteNextItemCommand.

Requirements

Requirement Value
Target Platform Windows
Header spatialaudiometadata.h

See also

ISpatialAudioMetadataWriter