dwrite: Always initialize output glyph count in GetGlyphs().
[wine.git] / dlls / xaudio2_7 / x3daudio.c
blob240cd5c101c6059893ef22aa6d45b946b997a73d
1 /*
2 * Copyright (c) 2016 Andrew Eikum for CodeWeavers
3 * Copyright (c) 2018 Ethan Lee for CodeWeavers
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "config.h"
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "x3daudio.h"
28 #include "wine/debug.h"
30 #include <F3DAudio.h>
32 #if XAUDIO2_VER >= 8 || defined X3DAUDIO1_VER
33 WINE_DEFAULT_DEBUG_CHANNEL(xaudio2);
34 #endif
36 #ifdef X3DAUDIO1_VER
37 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved)
39 TRACE("(%p, %d, %p)\n", hinstDLL, reason, pReserved);
41 switch (reason)
43 case DLL_PROCESS_ATTACH:
44 DisableThreadLibraryCalls( hinstDLL );
45 break;
47 return TRUE;
49 #endif /* X3DAUDIO1_VER */
51 #if XAUDIO2_VER >= 8
52 HRESULT CDECL X3DAudioInitialize(UINT32 chanmask, float speedofsound,
53 X3DAUDIO_HANDLE handle)
55 TRACE("0x%x, %f, %p\n", chanmask, speedofsound, handle);
56 #ifdef HAVE_F3DAUDIOINITIALIZE8
57 return F3DAudioInitialize8(chanmask, speedofsound, handle);
58 #else
59 F3DAudioInitialize(chanmask, speedofsound, handle);
60 return S_OK;
61 #endif
63 #endif /* XAUDIO2_VER >= 8 */
65 #ifdef X3DAUDIO1_VER
66 #if X3DAUDIO1_VER <= 2
67 void WINAPI LEGACY_X3DAudioInitialize(UINT32 chanmask, float speedofsound,
68 X3DAUDIO_HANDLE handle)
69 #else
70 void CDECL LEGACY_X3DAudioInitialize(UINT32 chanmask, float speedofsound,
71 X3DAUDIO_HANDLE handle)
72 #endif
74 TRACE("0x%x, %f, %p\n", chanmask, speedofsound, handle);
75 F3DAudioInitialize(chanmask, speedofsound, handle);
77 #endif /* X3DAUDIO1_VER */
79 #if XAUDIO2_VER >= 8 || defined X3DAUDIO1_VER
80 #if defined(X3DAUDIO1_VER) && X3DAUDIO1_VER <= 2
81 void WINAPI LEGACY_X3DAudioCalculate(const X3DAUDIO_HANDLE handle,
82 const X3DAUDIO_LISTENER *listener, const X3DAUDIO_EMITTER *emitter,
83 UINT32 flags, X3DAUDIO_DSP_SETTINGS *out)
84 #else
85 void CDECL X3DAudioCalculate(const X3DAUDIO_HANDLE handle,
86 const X3DAUDIO_LISTENER *listener, const X3DAUDIO_EMITTER *emitter,
87 UINT32 flags, X3DAUDIO_DSP_SETTINGS *out)
88 #endif
90 TRACE("%p, %p, %p, 0x%x, %p\n", handle, listener, emitter, flags, out);
91 F3DAudioCalculate(
92 handle,
93 (const F3DAUDIO_LISTENER*) listener,
94 (const F3DAUDIO_EMITTER*) emitter,
95 flags,
96 (F3DAUDIO_DSP_SETTINGS*) out
99 #endif /* XAUDIO2_VER >= 8 || defined X3DAUDIO1_VER */