//*@@@+++@@@@****************************************************************** // // Microsoft Windows Media Foundation // Copyright (C) Microsoft Corporation. All rights reserved. // //*@@@---@@@@****************************************************************** // import "mfobjects.idl"; import "SpatialAudioClient.idl"; import "SpatialAudioMetadata.idl"; #pragma region Application Family cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)") #if (NTDDI_VERSION >= NTDDI_WIN10_RS2) [ object, uuid(d396ec8c-605e-4249-978d-72ad1c312872), local, ] /// /// The IMFSpatialAudioObjectBuffer interface represents a section of audio data with /// associated positional and rendering information metadata. Spatial audio /// objects are stored in IMFSpatialAudioSample instances, and allow passing of /// spatial audio information between Media Foundation components. /// /// To get the audio data contained in the spatial audio object, use the IMFMediaBuffer /// Lock() and Unlock() methods. /// interface IMFSpatialAudioObjectBuffer : IMFMediaBuffer { /// /// The SetID() method sets the ID of the spatial audio object. /// /// /// A 32-bit unsigned unique ID of the audio object. /// /// /// The object ID must be unique for each spatial audio sample. Subsequent samples can /// contain spatial audio objects with the same IDs to represent moving objects or constant /// static objects (speaker channels). /// HRESULT SetID( [in, annotation( "_In_" )] UINT32 u32ID ); /// /// The GetID() method returns 32-bit unique, unsigned ID of the spatial audio object. /// If SetID() method was not called, this method returns the invalid object ID -1 /// (0xffffffff). The invalid ID indicates that the object buffer is unused and /// contains invalid data. /// /// /// Pointer to a 32-bit variable where the object ID will be stored. /// HRESULT GetID( [out, annotation( "_Out_" )] UINT32* pu32ID ); /// /// The SetType() method sets the type of audio object. /// /// /// A value from the AudioObjectType enumeration, specifying the type of the audio object. /// /// /// A spatial audio object can represent a dynamic moving object with changing coordinates /// (AudioObjectType_Dynamic), or it can be a pre-defined speaker channel such as /// AudioObjectType_FrontLeft. /// HRESULT SetType( [in, annotation( "_In_" )] AudioObjectType type ); /// /// The GetType() method returns the audio object type of the spatial audio object. If /// SetType() method was not called, this method returns a default value of /// AudioObjectType_None. /// /// /// Pointer to an AudioObjectType variable where the audio object type will be stored. /// HRESULT GetType( [out, annotation( "_Out_" )] AudioObjectType* pType ); /// /// The GetMetadataItems() method retrieves a pointer to a buffer that may /// contain metadata. The metadata is written to the ISpatialAudioMetadtaItems /// collection in a format identified by the MF_MT_SPATIAL_AUDIO_OBJECT_METADATA_ID /// media type attribute specified during media type negotiation phase of MF /// topology construction. /// /// /// Pointer to a ISpatialAudioMetadataItems object which will contain a collection /// of metadata metadata items. /// HRESULT GetMetadataItems( [out, annotation( "_Outptr_result_nullonfailure_" )] ISpatialAudioMetadataItems **ppMetadataItems); }; [ object, uuid(abf28a9B-3393-4290-ba79-5ffc46d986b2), local, ] /// /// The IMFSpatialAudioSample interface represents a multimedia sample /// with spatial audio information. Each spatial audio sample contains one /// or more IMFSpatialAudioObjectBuffer objects. /// interface IMFSpatialAudioSample : IMFSample { /// /// The GetObjectCount method returns the number of spatial audio objects in the /// sample. /// /// /// Pointer to a 32 bit variable where the total number of audio objects in the /// sample will be stored. /// HRESULT GetObjectCount( [out, annotation( "_Out_" )] DWORD* pdwObjectCount ); /// /// The AddSpatialAudioObject method adds a new spatial audio object to the spatial /// sample. /// /// /// Pointer to the new IMFSpatialAudioObject. /// HRESULT AddSpatialAudioObject( [in, annotation( "_In_" )] IMFSpatialAudioObjectBuffer* pAudioObjBuffer ); /// /// The GetSpatialAudioObjectByIndex() method returns an audio object specified /// with the passed-in index. /// /// /// A 32 bit variable with the 0-based index of the audio object requested. /// /// /// The out param where a pointer to the IMFSpatialAudioObjectBuffer with the /// specified index will be stored. /// HRESULT GetSpatialAudioObjectByIndex( [in, annotation( "_In_" )] DWORD dwIndex, [out, annotation( "_COM_Outptr_" )] IMFSpatialAudioObjectBuffer** ppAudioObjBuffer ); }; #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS2) cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */")