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
23 cpp_quote
("#define XAPO_FLAG_CHANNELS_MUST_MATCH 0x1")
24 cpp_quote
("#define XAPO_FLAG_FRAMERATE_MUST_MATCH 0x2")
25 cpp_quote
("#define XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH 0x4")
26 cpp_quote
("#define XAPO_FLAG_BUFFERCOUNT_MUST_MATCH 0x8")
27 cpp_quote
("#define XAPO_FLAG_INPLACE_SUPPORTED 0x10")
28 cpp_quote
("#define XAPO_FLAG_INPLACE_REQUIRED 0x20")
31 typedef struct WAVEFORMATEX
36 DWORD nAvgBytesPerSec
;
45 WORD wValidBitsPerSample
;
46 WORD wSamplesPerBlock
;
51 } WAVEFORMATEXTENSIBLE
, *PWAVEFORMATEXTENSIBLE
;
53 cpp_quote
("#include <mmreg.h>")
56 typedef struct XAPO_REGISTRATION_PROPERTIES
59 WCHAR FriendlyName
[XAPO_REGISTRATION_STRING_LENGTH
];
60 WCHAR CopyrightInfo
[XAPO_REGISTRATION_STRING_LENGTH
];
64 UINT32 MinInputBufferCount
;
65 UINT32 MaxInputBufferCount
;
66 UINT32 MinOutputBufferCount
;
67 UINT32 MaxOutputBufferCount
;
68 } XAPO_REGISTRATION_PROPERTIES
;
70 typedef struct XAPO20_REGISTRATION_PROPERTIES
73 WCHAR FriendlyName
[XAPO_REGISTRATION_STRING_LENGTH
];
74 WCHAR CopyrightInfo
[XAPO_REGISTRATION_STRING_LENGTH
];
78 UINT32 MinInputBufferCount
;
79 UINT32 MaxInputBufferCount
;
80 UINT32 MinOutputBufferCount
;
81 UINT32 MaxOutputBufferCount
;
82 UINT32 InterfaceCount
;
83 IID InterfaceArray
[1];
84 } XAPO20_REGISTRATION_PROPERTIES
;
86 typedef struct XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
{
87 const WAVEFORMATEX
*pFormat
;
89 } XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
;
91 typedef enum XAPO_BUFFER_FLAGS
{
96 typedef struct XAPO_PROCESS_BUFFER_PARAMETERS
{
98 XAPO_BUFFER_FLAGS BufferFlags
;
99 UINT32 ValidFrameCount
;
100 } XAPO_PROCESS_BUFFER_PARAMETERS
;
102 /* XAudio2 2.8 version of IXAPO */
106 uuid(a410b984
-9839-4819-a0be
-2856ae6b3adb
)
108 interface IXAPO
: IUnknown
110 HRESULT GetRegistrationProperties
([out] XAPO_REGISTRATION_PROPERTIES
**props
);
112 HRESULT IsInputFormatSupported
(const WAVEFORMATEX
*output_fmt
,
113 const WAVEFORMATEX
*input_fmt
, WAVEFORMATEX
**supported_fmt
);
115 HRESULT IsOutputFormatSupported
(const WAVEFORMATEX
*input_fmt
,
116 const WAVEFORMATEX
*output_fmt
, WAVEFORMATEX
**supported_fmt
);
118 HRESULT Initialize
(const void *data
, UINT32 data_len
);
122 HRESULT LockForProcess
(UINT32 in_params_count
, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
*in_params
,
123 UINT32 out_params_count
, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
*out_params
);
125 void UnlockForProcess
(void);
127 void Process
(UINT32 in_params_count
, const XAPO_PROCESS_BUFFER_PARAMETERS
*in_params
,
128 UINT32 out_params_count
, XAPO_PROCESS_BUFFER_PARAMETERS
*out_params
,
131 UINT32 CalcInputFrames
(UINT32 output_frames
);
133 UINT32 CalcOutputFrames
(UINT32 input_frames
);
136 /* XAudio2 2.7 version of IXAPO is identical to 2.8 */
137 cpp_quote
("DEFINE_GUID(IID_IXAPO27, 0xa90bc001, 0xe897, 0xe897, 0x55, 0xe4, 0x9e, 0x47, 0x00, 0x00, 0x00, 0x00);")
140 /* XAudio2 2.8 version of IXAPOParameters */
144 uuid(26d95c66
-80f2
-499a
-ad54
-5ae7f01c6d98
)
146 interface IXAPOParameters
: IUnknown
148 void SetParameters
(const void *params
, UINT32 params_len
);
150 void GetParameters
(void *params
, UINT32 params_len
);
153 /* XAudio2 2.7 version of IXAPOParameters is identical to 2.8 */
154 cpp_quote
("DEFINE_GUID(IID_IXAPO27Parameters, 0xa90bc001, 0xe897, 0xe897, 0x55, 0xe4, 0x9e, 0x47, 0x00, 0x00, 0x00, 0x01);")