2 * Copyright (c) 2015 Andrew Eikum for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #define XAPO_REGISTRATION_STRING_LENGTH
256
24 typedef struct WAVEFORMATEX
29 DWORD nAvgBytesPerSec
;
38 WORD wValidBitsPerSample
;
39 WORD wSamplesPerBlock
;
44 } WAVEFORMATEXTENSIBLE
, *PWAVEFORMATEXTENSIBLE
;
46 cpp_quote
("#include <mmreg.h>")
49 typedef struct XAPO_REGISTRATION_PROPERTIES
52 WCHAR FriendlyName
[XAPO_REGISTRATION_STRING_LENGTH
];
53 WCHAR CopyrightInfo
[XAPO_REGISTRATION_STRING_LENGTH
];
57 UINT32 MinInputBufferCount
;
58 UINT32 MaxInputBufferCount
;
59 UINT32 MinOutputBufferCount
;
60 UINT32 MaxOutputBufferCount
;
61 } XAPO_REGISTRATION_PROPERTIES
;
63 typedef struct XAPO20_REGISTRATION_PROPERTIES
66 WCHAR FriendlyName
[XAPO_REGISTRATION_STRING_LENGTH
];
67 WCHAR CopyrightInfo
[XAPO_REGISTRATION_STRING_LENGTH
];
71 UINT32 MinInputBufferCount
;
72 UINT32 MaxInputBufferCount
;
73 UINT32 MinOutputBufferCount
;
74 UINT32 MaxOutputBufferCount
;
75 UINT32 InterfaceCount
;
76 IID InterfaceArray
[1];
77 } XAPO20_REGISTRATION_PROPERTIES
;
79 typedef struct XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
{
80 const WAVEFORMATEX
*pFormat
;
82 } XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
;
84 typedef enum XAPO_BUFFER_FLAGS
{
89 typedef struct XAPO_PROCESS_BUFFER_PARAMETERS
{
91 XAPO_BUFFER_FLAGS BufferFlags
;
92 UINT32 ValidFrameCount
;
93 } XAPO_PROCESS_BUFFER_PARAMETERS
;
95 /* XAudio2 2.8 version of IXAPO */
99 uuid(a410b984
-9839-4819-a0be
-2856ae6b3adb
)
101 interface IXAPO
: IUnknown
103 HRESULT GetRegistrationProperties
([out] XAPO_REGISTRATION_PROPERTIES
**props
);
105 HRESULT IsInputFormatSupported
(const WAVEFORMATEX
*output_fmt
,
106 const WAVEFORMATEX
*input_fmt
, WAVEFORMATEX
**supported_fmt
);
108 HRESULT IsOutputFormatSupported
(const WAVEFORMATEX
*input_fmt
,
109 const WAVEFORMATEX
*output_fmt
, WAVEFORMATEX
**supported_fmt
);
111 HRESULT Initialize
(const void *data
, UINT32 data_len
);
115 HRESULT LockForProcess
(UINT32 in_params_count
, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
*in_params
,
116 UINT32 out_params_count
, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
*out_params
);
118 void UnlockForProcess
(void);
120 void Process
(UINT32 in_params_count
, const XAPO_PROCESS_BUFFER_PARAMETERS
*in_params
,
121 UINT32 out_params_count
, const XAPO_PROCESS_BUFFER_PARAMETERS
*out_params
,
124 UINT32 CalcInputFrames
(UINT32 output_frames
);
126 UINT32 CalcOutputFrames
(UINT32 input_frames
);
129 /* XAudio2 2.7 version of IXAPO is identical to 2.8 */
130 cpp_quote
("DEFINE_GUID(IID_IXAPO27, 0xa90bc001, 0xe897, 0xe897, 0x55, 0xe4, 0x9e, 0x47, 0x00, 0x00, 0x00, 0x00);")
133 /* XAudio2 2.8 version of IXAPOParameters */
137 uuid(26d95c66
-80f2
-499a
-ad54
-5ae7f01c6d98
)
139 interface IXAPOParameters
: IUnknown
141 void SetParameters
(const void *params
, UINT32 params_len
);
143 void GetParameters
(void *params
, UINT32 params_len
);
146 /* XAudio2 2.7 version of IXAPOParameters is identical to 2.8 */
147 cpp_quote
("DEFINE_GUID(IID_IXAPO27Parameters, 0xa90bc001, 0xe897, 0xe897, 0x55, 0xe4, 0x9e, 0x47, 0x00, 0x00, 0x00, 0x01);")