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
29 #include "xaudio2fx.h"
32 BOOL WINAPI
DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
36 case DLL_WINE_PREATTACH
:
37 return FALSE
; /* prefer native version */
38 case DLL_PROCESS_ATTACH
:
39 DisableThreadLibraryCalls( hinstDLL
);
45 HRESULT WINAPI
XAudio2Create(IXAudio2
**ppxa2
, UINT32 flags
, XAUDIO2_PROCESSOR proc
)
51 /* create XAudio2 2.8 instance */
52 hr
= CoCreateInstance(&CLSID_XAudio2
, NULL
, CLSCTX_INPROC_SERVER
,
53 &IID_IXAudio2
, (void**)&xa2
);
57 hr
= IXAudio2_QueryInterface(xa2
, &IID_IXAudio27
, (void**)&xa27
);
59 IXAudio2_Release(xa2
);
63 hr
= IXAudio27_Initialize(xa27
, flags
, proc
);
65 IXAudio27_Release(xa27
);
66 IXAudio2_Release(xa2
);
70 IXAudio27_Release(xa27
);
77 HRESULT WINAPI
CreateAudioVolumeMeter(IUnknown
**out
)
79 return CoCreateInstance(&CLSID_AudioVolumeMeter
, NULL
, CLSCTX_INPROC_SERVER
,
80 &IID_IUnknown
, (void**)out
);
83 HRESULT WINAPI
CreateAudioReverb(IUnknown
**out
)
85 return CoCreateInstance(&CLSID_AudioReverb
, NULL
, CLSCTX_INPROC_SERVER
,
86 &IID_IUnknown
, (void**)out
);