ISpatialAudioMetadataWriter::WriteNextItemCommand method (spatialaudiometadata.h)

Writes metadata commands and value data to the current item.


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


[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
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.

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


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


Target Platform Windows
Header spatialaudiometadata.h

See also