| baseaudioprocessingobject.h (6.3.9600.17415-Windows 8.1) | | baseaudioprocessingobject.h (10.0.10586.11-Windows 10 1511 10586.494) |
| | |
| skipping to change at line 34 | | skipping to change at line 34 |
| #include <crtdbg.h> | | #include <crtdbg.h> |
| | |
| // Locked memory utility APIs for System Effect APOs | | // Locked memory utility APIs for System Effect APOs |
| extern "C" | | extern "C" |
| { | | { |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // Description: Locked memory allocator | | // Description: Locked memory allocator |
| // | | // |
| // Parameters: | | // Parameters: |
| // size - [in] Number of input connections. | | // size - [in] Number of input connections. |
|
| // pMemory - [in/out] Void** pointer. | | // pMemory - [out] Void** pointer. |
| // | | // |
| // Return codes: | | // Return codes: |
| // S_OK - pMemory points to allocated memory. | | // S_OK - pMemory points to allocated memory. |
| // E_OUTOFMEMORY - No memory is available. | | // E_OUTOFMEMORY - No memory is available. |
| // | | // |
|
| HRESULT AERT_Allocate(size_t size, void **pMemory); | | _Success_(return == S_OK) |
| | HRESULT AERT_Allocate(_In_ size_t size, _Outptr_result_bytebuffer_(size) voi |
| | d **pMemory); |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // Description: Locked memory free | | // Description: Locked memory free |
| // | | // |
| // Parameters: | | // Parameters: |
| // pMemory - [in] Pointer to memory to free. | | // pMemory - [in] Pointer to memory to free. |
| // | | // |
| // Return codes: | | // Return codes: |
| // S_OK | | // S_OK |
| // | | // |
|
| HRESULT AERT_Free(void *pMemory); | | HRESULT AERT_Free(_In_ void *pMemory); |
| } | | } |
| | |
| // TODO: REMOVE THESE WHEN WE HAVE THESE IN OFFICIAL HEADERS" | | // TODO: REMOVE THESE WHEN WE HAVE THESE IN OFFICIAL HEADERS" |
| #ifndef AVRT_CODE_BEGIN | | #ifndef AVRT_CODE_BEGIN |
| // These are copied out of the old AvRt.h file. | | // These are copied out of the old AvRt.h file. |
| #define AVRT_CODE_BEGIN code_seg( push, "RT_CODE" ) | | #define AVRT_CODE_BEGIN code_seg( push, "RT_CODE" ) |
| #define AVRT_DATA_BEGIN data_seg( push, "RT_DATA" ) | | #define AVRT_DATA_BEGIN data_seg( push, "RT_DATA" ) |
| #define AVRT_BSS_BEGIN bss_seg( push, "RT_BSS" ) | | #define AVRT_BSS_BEGIN bss_seg( push, "RT_BSS" ) |
| #define AVRT_CONST_BEGIN const_seg( push, "RT_CONST" ) | | #define AVRT_CONST_BEGIN const_seg( push, "RT_CONST" ) |
| #define AVRT_VTABLES_BEGIN AVRT_CONST_BEGIN | | #define AVRT_VTABLES_BEGIN AVRT_CONST_BEGIN |
| | |
| skipping to change at line 96 | | skipping to change at line 97 |
| | |
| #define ASSERT_REALTIME() // Used to mark real-time code. | | #define ASSERT_REALTIME() // Used to mark real-time code. |
| #define ASSERT_NONREALTIME() // Used to mark non-real time code | | #define ASSERT_NONREALTIME() // Used to mark non-real time code |
| #endif | | #endif |
| | |
| #pragma AVRT_VTABLES_BEGIN | | #pragma AVRT_VTABLES_BEGIN |
| // Base class for APOs | | // Base class for APOs |
| class __declspec(novtable) CBaseAudioProcessingObject : public IAudioProcessingO
bject, public IAudioProcessingObjectRT, public IAudioProcessingObjectConfigurati
on | | class __declspec(novtable) CBaseAudioProcessingObject : public IAudioProcessingO
bject, public IAudioProcessingObjectRT, public IAudioProcessingObjectConfigurati
on |
| { | | { |
| public: | | public: |
|
| CBaseAudioProcessingObject(const APO_REG_PROPERTIES* pRegProperties); | | CBaseAudioProcessingObject(_In_ const APO_REG_PROPERTIES* pRegProperties); |
| virtual ~CBaseAudioProcessingObject(); | | virtual ~CBaseAudioProcessingObject(); |
| | |
| public: | | public: |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // Description: | | // Description: |
| // | | // |
| // This must be implemented by subclasses. | | // This must be implemented by subclasses. |
| // | | // |
| // Parameters: | | // Parameters: |
| | |
| skipping to change at line 118 | | skipping to change at line 119 |
| // u32NumInputConnections - [in] Number of input connections. | | // u32NumInputConnections - [in] Number of input connections. |
| // | | // |
| // ppInputConnections - [in] Array of input connection property | | // ppInputConnections - [in] Array of input connection property |
| // structures, one per input connection. | | // structures, one per input connection. |
| // | | // |
| // u32NumOutputConnections - [in] Number of output connections. | | // u32NumOutputConnections - [in] Number of output connections. |
| // | | // |
| // ppOutputConnections - [in, out] Array of output connection | | // ppOutputConnections - [in, out] Array of output connection |
| // property structures, one per output connection. | | // property structures, one per output connection. |
| // | | // |
|
| STDMETHOD_(void, APOProcess)(UINT32 u32NumInputConnections, | | STDMETHOD_(void, APOProcess)(_In_ UINT32 u32NumInputConnections, |
| APO_CONNECTION_PROPERTY** ppInputConnections, | | _In_reads_(u32NumInputConnections) APO_CONNECTION_PROPERTY** ppInputConn |
| UINT32 u32NumOutputConnections, | | ections, |
| APO_CONNECTION_PROPERTY** ppOutputConnections) = 0; | | _In_ UINT32 u32NumOutputConnections, |
| STDMETHOD_(UINT32, CalcInputFrames)(UINT32 u32OutputFrameCount); | | _Inout_updates_(u32NumOutputConnections) APO_CONNECTION_PROPERTY** ppOut |
| STDMETHOD_(UINT32, CalcOutputFrames)(UINT32 u32InputFrameCount); | | putConnections) = 0; |
| | STDMETHOD_(UINT32, CalcInputFrames)(_In_ UINT32 u32OutputFrameCount); |
| | STDMETHOD_(UINT32, CalcOutputFrames)(_In_ UINT32 u32InputFrameCount); |
| | |
|
| STDMETHOD(LockForProcess)(UINT32 u32NumInputConnections, APO_CONNECTION_DESC
RIPTOR** ppInputConnections, UINT32 u32NumOutputConnections, APO_CONNECTION_DESC
RIPTOR** ppOuputConnections); | | STDMETHOD(LockForProcess)(_In_ UINT32 u32NumInputConnections, _In_reads_(u32
NumInputConnections) APO_CONNECTION_DESCRIPTOR** ppInputConnections, _In_ UINT32
u32NumOutputConnections, _In_reads_(u32NumOutputConnections) APO_CONNECTION_DES
CRIPTOR** ppOutputConnections); |
| STDMETHOD(UnlockForProcess)(void); | | STDMETHOD(UnlockForProcess)(void); |
| STDMETHOD(Reset)(void); | | STDMETHOD(Reset)(void); |
|
| STDMETHOD(GetLatency)(HNSTIME* pTime); | | STDMETHOD(GetLatency)(_Out_ HNSTIME* pTime); |
| STDMETHOD(GetRegistrationProperties)(APO_REG_PROPERTIES** pRegProps); | | STDMETHOD(GetRegistrationProperties)(_Outptr_opt_ APO_REG_PROPERTIES** ppReg |
| STDMETHOD(Initialize)(UINT32 cbDataSize, BYTE* pbyData); | | Props); |
| STDMETHOD(IsInputFormatSupported)(IAudioMediaType* pOutputFormat, IAudioMedi | | STDMETHOD(Initialize)(_In_ UINT32 cbDataSize, _In_reads_bytes_(cbDataSize) B |
| aType* pRequestedInputFormat, IAudioMediaType** ppSupportedInputFormat); | | YTE* pbyData); |
| STDMETHOD(IsOutputFormatSupported)(IAudioMediaType* pInputFormat, IAudioMedi | | STDMETHOD(IsInputFormatSupported)(_In_opt_ IAudioMediaType* pOutputFormat, _ |
| aType* pRequestedOutputFormat, IAudioMediaType** ppSupportedOutputFormat); | | In_opt_ IAudioMediaType* pRequestedInputFormat, _Outptr_opt_ IAudioMediaType** p |
| STDMETHOD(GetInputChannelCount)(UINT32* pu32ChannelCount); | | pSupportedInputFormat); |
| | STDMETHOD(IsOutputFormatSupported)(_In_opt_ IAudioMediaType* pInputFormat, _ |
| | In_opt_ IAudioMediaType* pRequestedOutputFormat, _Outptr_opt_ IAudioMediaType** |
| | ppSupportedOutputFormat); |
| | STDMETHOD(GetInputChannelCount)(_Out_ UINT32* pu32ChannelCount); |
| | |
| protected: | | protected: |
| HRESULT IsFormatTypeSupported( | | HRESULT IsFormatTypeSupported( |
|
| IAudioMediaType* pOppositeFormat, | | _In_ IAudioMediaType* pOppositeFormat, |
| IAudioMediaType* pRequestedFormat, | | _In_ IAudioMediaType* pRequestedFormat, |
| IAudioMediaType** ppSupportedFormat, | | _Outptr_ IAudioMediaType** ppSupportedFormat, |
| bool bIsInput ); | | _In_ bool bIsInput ); |
| HRESULT __fastcall ValidateConnection(const UNCOMPRESSEDAUDIOFORMAT &pUncomp | | HRESULT __fastcall ValidateConnection(_In_ const UNCOMPRESSEDAUDIOFORMAT &pU |
| ressedAudioFormat); | | ncompressedAudioFormat); |
| virtual HRESULT ValidateAndCacheConnectionInfo(UINT32 u32NumInputConnections | | virtual HRESULT ValidateAndCacheConnectionInfo(_In_ UINT32 u32NumInputConnec |
| , | | tions, |
| APO_CONNECTION_DESCRIPTOR** ppInputConnections, | | _In_reads_(u32NumInputConnections) APO_CONNECTION_DESCRIPTOR** ppInputCo |
| UINT32 u32NumOutputConnections, | | nnections, |
| APO_CONNECTION_DESCRIPTOR** ppOutputConnections); | | _In_ UINT32 u32NumOutputConnections, |
| | _In_reads_(u32NumOutputConnections) APO_CONNECTION_DESCRIPTOR** ppOutput |
| | Connections); |
| | |
|
| bool BuffersOverlap(UINT32 u32NumInputConnections, | | bool BuffersOverlap(_In_ UINT32 u32NumInputConnections, |
| APO_CONNECTION_DESCRIPTOR** ppInputConnections, | | _In_reads_(u32NumInputConnections) APO_CONNECTION_DESCRIPTOR** ppInputCo |
| UINT32 u32NumOutputConnections, | | nnections, |
| APO_CONNECTION_DESCRIPTOR** ppOutputConnections); | | _In_ UINT32 u32NumOutputConnections, |
| | _In_reads_(u32NumOutputConnections) APO_CONNECTION_DESCRIPTOR** ppOutput |
| | Connections); |
| | |
| UINT32 __fastcall GetSamplesPerFrame(); | | UINT32 __fastcall GetSamplesPerFrame(); |
| UINT32 __fastcall GetBytesPerSampleContainer(); | | UINT32 __fastcall GetBytesPerSampleContainer(); |
| UINT32 __fastcall GetValidBitsPerSample(); | | UINT32 __fastcall GetValidBitsPerSample(); |
| FLOAT32 __fastcall GetFramesPerSecond(); | | FLOAT32 __fastcall GetFramesPerSecond(); |
| | |
|
| HRESULT __fastcall ValidateInitializeParameters(UINT32 cbDataSize, BYTE* pby | | HRESULT __fastcall ValidateInitializeParameters(_In_ UINT32 cbDataSize, _In_ |
| Data, REFCLSID clsid, UINT32 cbStructSize); | | reads_bytes_(cbDataSize) BYTE* pbyData, _In_ REFCLSID clsid, _In_ UINT32 cbStruc |
| virtual HRESULT __fastcall ValidateDefaultAPOFormat(UNCOMPRESSEDAUDIOFORMAT& | | tSize); |
| audioFormat, bool bIsInput); | | virtual HRESULT __fastcall ValidateDefaultAPOFormat(_In_ UNCOMPRESSEDAUDIOFO |
| | RMAT& audioFormat, _In_ bool bIsInput); |
| | |
| protected: | | protected: |
| // Flag that determines if the APO is locked. | | // Flag that determines if the APO is locked. |
| bool m_bIsLocked; | | bool m_bIsLocked; |
| | |
| // Flag that determines if the APO has been initialized. | | // Flag that determines if the APO has been initialized. |
| bool m_bIsInitialized; | | bool m_bIsInitialized; |
| | |
| // pointer to registration properties for this APO | | // pointer to registration properties for this APO |
| const APO_REG_PROPERTIES* m_pRegProperties; | | const APO_REG_PROPERTIES* m_pRegProperties; |
| | |
| skipping to change at line 241 | | skipping to change at line 242 |
| // and does some default initialization of the struct. | | // and does some default initialization of the struct. |
| // | | // |
| // Parameters: | | // Parameters: |
| // | | // |
| // NumAPOInterfaces - [in] The number of APO interfaces in this properties clas
s. | | // NumAPOInterfaces - [in] The number of APO interfaces in this properties clas
s. |
| // | | // |
| template<int NumAPOInterfaces> | | template<int NumAPOInterfaces> |
| class CRegAPOProperties | | class CRegAPOProperties |
| { | | { |
| public: | | public: |
|
| CRegAPOProperties(REFCLSID clsid, | | CRegAPOProperties(_In_ REFCLSID clsid, |
| LPCWSTR pszFriendlyName, LPCWSTR pszCopyrightInfo, | | _In_z_ LPCWSTR pszFriendlyName, _In_z_ LPCWSTR pszCopyrigh |
| UINT32 u32MajorVersion, UINT32 u32MinorVersion, | | tInfo, |
| REFIID iidAPOInterface1, | | _In_ UINT32 u32MajorVersion, _In_ UINT32 u32MinorVersion, |
| APO_FLAG Flags = DEFAULT_APOREG_FLAGS, | | _In_ REFIID iidAPOInterface1, |
| UINT32 u32MinInputConnections = DEFAULT_APOREG_MININPUTCON | | _In_ APO_FLAG Flags = DEFAULT_APOREG_FLAGS, |
| NECTIONS, | | _In_ UINT32 u32MinInputConnections = DEFAULT_APOREG_MININP |
| UINT32 u32MaxInputConnections = DEFAULT_APOREG_MAXINPUTCON | | UTCONNECTIONS, |
| NECTIONS, | | _In_ UINT32 u32MaxInputConnections = DEFAULT_APOREG_MAXINP |
| UINT32 u32MinOutputConnections = DEFAULT_APOREG_MINOUTPUTC | | UTCONNECTIONS, |
| ONNECTIONS, | | _In_ UINT32 u32MinOutputConnections = DEFAULT_APOREG_MINOU |
| UINT32 u32MaxOutputConnections = DEFAULT_APOREG_MAXOUTPUTC | | TPUTCONNECTIONS, |
| ONNECTIONS, | | _In_ UINT32 u32MaxOutputConnections = DEFAULT_APOREG_MAXOU |
| UINT32 u32MaxInstances = DEFAULT_APOREG_MAXINSTANCES, | | TPUTCONNECTIONS, |
| | _In_ UINT32 u32MaxInstances = DEFAULT_APOREG_MAXINSTANCES, |
| ...) | | ...) |
| { | | { |
| int index; | | int index; |
| va_list va; | | va_list va; |
|
| HRESULT hResult; | | |
| | |
| m_Properties.clsid = clsid; | | m_Properties.clsid = clsid; |
| m_Properties.Flags = Flags; | | m_Properties.Flags = Flags; |
|
| hResult = StringCbCopyW(m_Properties.szFriendlyName, sizeof(m_Properties | | #ifdef _DEBUG |
| .szFriendlyName), pszFriendlyName); | | HRESULT hResult = StringCbCopyW(m_Properties.szFriendlyName, sizeof(m_Pr |
| | operties.szFriendlyName), pszFriendlyName); |
| _ASSERTE(S_OK == hResult); // nothing to do here except assert | | _ASSERTE(S_OK == hResult); // nothing to do here except assert |
| hResult = StringCbCopyW(m_Properties.szCopyrightInfo, sizeof(m_Propertie
s.szCopyrightInfo), pszCopyrightInfo); | | hResult = StringCbCopyW(m_Properties.szCopyrightInfo, sizeof(m_Propertie
s.szCopyrightInfo), pszCopyrightInfo); |
| _ASSERTE(S_OK == hResult); // nothing to do here except assert | | _ASSERTE(S_OK == hResult); // nothing to do here except assert |
|
| | #else |
| | StringCbCopyW(m_Properties.szFriendlyName, sizeof(m_Properties.szFriendl |
| | yName), pszFriendlyName); |
| | StringCbCopyW(m_Properties.szCopyrightInfo, sizeof(m_Properties.szCopyri |
| | ghtInfo), pszCopyrightInfo); |
| | #endif |
| m_Properties.u32MajorVersion = u32MajorVersion; | | m_Properties.u32MajorVersion = u32MajorVersion; |
| m_Properties.u32MinorVersion = u32MinorVersion; | | m_Properties.u32MinorVersion = u32MinorVersion; |
| m_Properties.u32MinInputConnections = u32MinInputConnections; | | m_Properties.u32MinInputConnections = u32MinInputConnections; |
| m_Properties.u32MaxInputConnections = u32MaxInputConnections; | | m_Properties.u32MaxInputConnections = u32MaxInputConnections; |
| m_Properties.u32MinOutputConnections = u32MinOutputConnections; | | m_Properties.u32MinOutputConnections = u32MinOutputConnections; |
| m_Properties.u32MaxOutputConnections = u32MaxOutputConnections; | | m_Properties.u32MaxOutputConnections = u32MaxOutputConnections; |
| m_Properties.u32MaxInstances = u32MaxInstances; | | m_Properties.u32MaxInstances = u32MaxInstances; |
| m_Properties.u32NumAPOInterfaces = NumAPOInterfaces; | | m_Properties.u32NumAPOInterfaces = NumAPOInterfaces; |
| m_Properties.iidAPOInterfaceList[0] = iidAPOInterface1; | | m_Properties.iidAPOInterfaceList[0] = iidAPOInterface1; |
| va_start(va, u32MaxInstances); | | va_start(va, u32MaxInstances); |
| | |
| End of changes. 14 change blocks. |
| 55 lines changed or deleted | | 75 lines changed or added |
|