ISpatialAudioMetadataWriter interface (spatialaudiometadata.h)

Provides methods for storing spatial audio metadata items positioned within a range of corresponding audio frames. Each metadata item has a zero-based offset position within the specified frame. Each item can contain one or more commands specific to the metadata format ID provided in the SpatialAudioObjectRenderStreamForMetadataActivationParams when the ISpatialAudioMetadataClient was created.
This object does not allocate storage for the metadata it is provided, the caller is expected to manage the allocation of memory used to store the packed data. Multiple metadata items can be placed in the ISpatialAudioMetadataItems object. For each item, call WriteNextItem followed by a call to WriteNextItemCommand.

This interface is a part of Windows Sonic, Microsoft’s audio platform for more immersive audio which includes integrated spatial sound on Xbox and Windows.


The ISpatialAudioMetadataWriter interface inherits from the IUnknown interface. ISpatialAudioMetadataWriter also has these types of members:


The ISpatialAudioMetadataWriter interface has these methods.


Completes any needed operations on the metadata buffer and releases the specified ISpatialAudioMetadataItems object.

Opens an ISpatialAudioMetadataItems object for writing.

Starts a new metadata item at the specified offset.

Writes metadata commands and value data to the current item.


Minimum supported client Windows 10, version 1703 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header spatialaudiometadata.h