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 XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
{
64 const WAVEFORMATEX
*pFormat
;
66 } XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
;
68 typedef enum XAPO_BUFFER_FLAGS
{
73 typedef struct XAPO_PROCESS_BUFFER_PARAMETERS
{
75 XAPO_BUFFER_FLAGS BufferFlags
;
76 UINT32 ValidFrameCount
;
77 } XAPO_PROCESS_BUFFER_PARAMETERS
;
79 /* XAudio2 2.8 version of IXAPO */
83 uuid(a410b984
-9839-4819-a0be
-2856ae6b3adb
)
85 interface IXAPO
: IUnknown
87 HRESULT GetRegistrationProperties
([out] XAPO_REGISTRATION_PROPERTIES
**props
);
89 HRESULT IsInputFormatSupported
(const WAVEFORMATEX
*output_fmt
,
90 const WAVEFORMATEX
*input_fmt
, WAVEFORMATEX
**supported_fmt
);
92 HRESULT IsOutputFormatSupported
(const WAVEFORMATEX
*input_fmt
,
93 const WAVEFORMATEX
*output_fmt
, WAVEFORMATEX
**supported_fmt
);
95 HRESULT Initialize
(const void *data
, UINT32 data_len
);
99 HRESULT LockForProcess
(UINT32 in_params_count
, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
*in_params
,
100 UINT32 out_params_count
, const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
*out_params
);
102 void UnlockForProcess
(void);
104 void Process
(UINT32 in_params_count
, const XAPO_PROCESS_BUFFER_PARAMETERS
*in_params
,
105 UINT32 out_params_count
, const XAPO_PROCESS_BUFFER_PARAMETERS
*out_params
,
108 UINT32 CalcInputFrames
(UINT32 output_frames
);
110 UINT32 CalcOutputFrames
(UINT32 input_frames
);
113 /* XAudio2 2.7 version of IXAPO is identical to 2.8 */
114 cpp_quote
("DEFINE_GUID(IID_IXAPO27, 0xa90bc001, 0xe897, 0xe897, 0x55, 0xe4, 0x9e, 0x47, 0x00, 0x00, 0x00, 0x00);")
117 /* XAudio2 2.8 version of IXAPOParameters */
121 uuid(26d95c66
-80f2
-499a
-ad54
-5ae7f01c6d98
)
123 interface IXAPOParameters
: IUnknown
125 void SetParameters
(const void *params
, UINT32 params_len
);
127 void GetParameters
(void *params
, UINT32 params_len
);
130 /* XAudio2 2.7 version of IXAPOParameters is identical to 2.8 */
131 cpp_quote
("DEFINE_GUID(IID_IXAPO27Parameters, 0xa90bc001, 0xe897, 0xe897, 0x55, 0xe4, 0x9e, 0x47, 0x00, 0x00, 0x00, 0x01);")