From: Amine Khaldi Date: Mon, 20 Jan 2014 11:30:39 +0000 (+0000) Subject: [DSOUND] X-Git-Tag: ReactOS-0.3.16~150 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=ee32b9379c648ae7c0a4b807f7895c0bcb3ccefe [DSOUND] * Move some inclusions to the main header. * Set the default debugging channel globally through the main header. * Remove inclusions and definitions that already exist in the main header. * Improve header inclusions. * Improve the GUIDs situation. CORE-7716 svn path=/trunk/; revision=61721 --- diff --git a/reactos/dll/directx/wine/dsound/CMakeLists.txt b/reactos/dll/directx/wine/dsound/CMakeLists.txt index ca2fe9e28bc..d77cb4a499f 100644 --- a/reactos/dll/directx/wine/dsound/CMakeLists.txt +++ b/reactos/dll/directx/wine/dsound/CMakeLists.txt @@ -18,6 +18,7 @@ add_library(dsound SHARED primary.c propset.c sound3d.c + guid.c version.rc ${CMAKE_CURRENT_BINARY_DIR}/dsound.def) diff --git a/reactos/dll/directx/wine/dsound/buffer.c b/reactos/dll/directx/wine/dsound/buffer.c index 522d3bd2a1b..a574449859b 100644 --- a/reactos/dll/directx/wine/dsound/buffer.c +++ b/reactos/dll/directx/wine/dsound/buffer.c @@ -19,26 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -#include -#include -//#include "winuser.h" -#include -#include -#include -#include -#include #include "dsound_private.h" -//#include - -WINE_DEFAULT_DEBUG_CHANNEL(dsound); /******************************************************************************* * IDirectSoundNotify diff --git a/reactos/dll/directx/wine/dsound/capture.c b/reactos/dll/directx/wine/dsound/capture.c index fcee0b8e866..fd7539ac645 100644 --- a/reactos/dll/directx/wine/dsound/capture.c +++ b/reactos/dll/directx/wine/dsound/capture.c @@ -25,27 +25,8 @@ * Make DirectSoundCaptureCreate and DirectSoundCaptureCreate8 behave differently */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#define COBJMACROS -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -#include -//#include "winbase.h" -//#include "winuser.h" -//#include "mmsystem.h" -#include -#include -//#include "winnls.h" -#include -#include #include "dsound_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(dsound); - typedef struct DirectSoundCaptureDevice DirectSoundCaptureDevice; /* IDirectSoundCaptureBuffer implementation structure */ diff --git a/reactos/dll/directx/wine/dsound/dsound.c b/reactos/dll/directx/wine/dsound/dsound.c index 13f6a5d5c64..eff3de84191 100644 --- a/reactos/dll/directx/wine/dsound/dsound.c +++ b/reactos/dll/directx/wine/dsound/dsound.c @@ -20,31 +20,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -//#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#define COBJMACROS -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -//#include "windef.h" -//#include "winbase.h" -//#include "winuser.h" -#include -#include "mmddk.h" -//#include "wingdi.h" -//#include "mmreg.h" -//#include "ks.h" -//#include "ksmedia.h" -#include -#include #include "dsound_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(dsound); - typedef struct IDirectSoundImpl { IUnknown IUnknown_inner; IDirectSound8 IDirectSound8_iface; diff --git a/reactos/dll/directx/wine/dsound/dsound_convert.c b/reactos/dll/directx/wine/dsound/dsound_convert.c index 1e8e25d2181..76c99c1b0a1 100644 --- a/reactos/dll/directx/wine/dsound/dsound_convert.c +++ b/reactos/dll/directx/wine/dsound/dsound_convert.c @@ -34,27 +34,8 @@ * Sound is LITTLE endian */ -#include - -#include -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -#include -#include -#include -#include -#include -#include #include "dsound_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(dsound); - #ifdef WORDS_BIGENDIAN #define le16(x) RtlUshortByteSwap((x)) #define le32(x) RtlUlongByteSwap((x)) diff --git a/reactos/dll/directx/wine/dsound/dsound_main.c b/reactos/dll/directx/wine/dsound/dsound_main.c index aa75c558eeb..fc20c51d6af 100644 --- a/reactos/dll/directx/wine/dsound/dsound_main.c +++ b/reactos/dll/directx/wine/dsound/dsound_main.c @@ -32,42 +32,10 @@ * Remove DS_HEL_FRAGS and use mixer fragment length for it */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -#include -#include -//#include "winuser.h" -#include -#include -//#include "mmsystem.h" -#include -#include -#include -#include -#include -//#include "ks.h" -#include -//#include "rpc.h" -//#include "rpcndr.h" -//#include "unknwn.h" -//#include "oleidl.h" -//#include "shobjidl.h" - -#include -//#include "ksmedia.h" -//#include "propkey.h" -#include - #include "dsound_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(dsound); +#include +#include struct list DSOUND_renderers = LIST_INIT(DSOUND_renderers); CRITICAL_SECTION DSOUND_renderers_lock; diff --git a/reactos/dll/directx/wine/dsound/dsound_private.h b/reactos/dll/directx/wine/dsound/dsound_private.h index a8f5f42a7f1..6bd6a9813f4 100644 --- a/reactos/dll/directx/wine/dsound/dsound_private.h +++ b/reactos/dll/directx/wine/dsound/dsound_private.h @@ -19,17 +19,43 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +#include +#include +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS +#define NONAMELESSSTRUCT +#define NONAMELESSUNION + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(dsound); + /* Linux does not support better timing than 10ms */ #define DS_TIME_RES 2 /* Resolution of multimedia timer */ #define DS_TIME_DEL 10 /* Delay of multimedia timer callback, and duration of HEL fragment */ -#include "wingdi.h" -#include "mmdeviceapi.h" -#include "audioclient.h" -#include "mmsystem.h" - -#include "wine/list.h" - extern int ds_hel_buflen DECLSPEC_HIDDEN; extern int ds_snd_queue_max DECLSPEC_HIDDEN; diff --git a/reactos/dll/directx/wine/dsound/duplex.c b/reactos/dll/directx/wine/dsound/duplex.c index fad20c2e9da..8e1b9fe58e4 100644 --- a/reactos/dll/directx/wine/dsound/duplex.c +++ b/reactos/dll/directx/wine/dsound/duplex.c @@ -20,27 +20,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -#define COBJMACROS -#include -#include -//#include "winuser.h" -#include -//#include "mmddk.h" -#include -#include -#include #include "dsound_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(dsound); - /***************************************************************************** * IDirectSoundFullDuplex implementation structure */ diff --git a/reactos/dll/directx/wine/dsound/guid.c b/reactos/dll/directx/wine/dsound/guid.c new file mode 100644 index 00000000000..ff912c5620e --- /dev/null +++ b/reactos/dll/directx/wine/dsound/guid.c @@ -0,0 +1,18 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include +#include +#include +#include +#include +#include +#include +#include + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/reactos/dll/directx/wine/dsound/mixer.c b/reactos/dll/directx/wine/dsound/mixer.c index 05a1ca35a1c..bf81b1f0b64 100644 --- a/reactos/dll/directx/wine/dsound/mixer.c +++ b/reactos/dll/directx/wine/dsound/mixer.c @@ -22,30 +22,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include /* Insomnia - pow() function */ - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#define COBJMACROS -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -#include -#include -#include -//#include "wingdi.h" -//#include "mmreg.h" -#include -#include -#include -//#include "ks.h" -//#include "ksmedia.h" #include "dsound_private.h" -#include "fir.h" -WINE_DEFAULT_DEBUG_CHANNEL(dsound); +#include "fir.h" void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan) { diff --git a/reactos/dll/directx/wine/dsound/primary.c b/reactos/dll/directx/wine/dsound/primary.c index 93962a0a963..5a907826c2d 100644 --- a/reactos/dll/directx/wine/dsound/primary.c +++ b/reactos/dll/directx/wine/dsound/primary.c @@ -23,26 +23,8 @@ * it leaves dsound in unusable (not really open) state. */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#define COBJMACROS -#define NONAMELESSSTRUCT -#define NONAMELESSUNION -//#include "windef.h" -//#include "winbase.h" -//#include "winuser.h" -//#include "mmsystem.h" -#include -#include -#include -#include #include "dsound_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(dsound); - static DWORD DSOUND_fraglen(DirectSoundDevice *device) { REFERENCE_TIME period; diff --git a/reactos/dll/directx/wine/dsound/propset.c b/reactos/dll/directx/wine/dsound/propset.c index c19ff9f7d0d..cb309d0b86e 100644 --- a/reactos/dll/directx/wine/dsound/propset.c +++ b/reactos/dll/directx/wine/dsound/propset.c @@ -19,35 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define COBJMACROS -#define NONAMELESSSTRUCT -#define NONAMELESSUNION - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include - -#include -#include -//#include "winuser.h" -#include -#include -#include -#include -#include -//#include -#include -#include #include "dsound_private.h" -#include - -//#include "ksmedia.h" -//#include "propkey.h" -#include - -WINE_DEFAULT_DEBUG_CHANNEL(dsound); static WCHAR wInterface[] = { 'I','n','t','e','r','f','a','c','e',0 }; diff --git a/reactos/dll/directx/wine/dsound/sound3d.c b/reactos/dll/directx/wine/dsound/sound3d.c index 04a3e329bab..48a3773b256 100644 --- a/reactos/dll/directx/wine/dsound/sound3d.c +++ b/reactos/dll/directx/wine/dsound/sound3d.c @@ -37,30 +37,11 @@ * Optimize WINMM and negotiate fragment size, decrease DS_HEL_MARGIN */ -#include -#include /* Insomnia - pow() function */ - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include -#include -//#include "winuser.h" -#include -#include -//#include "mmddk.h" -#include -#include #include "dsound_private.h" /* default velocity of sound in the air */ #define DEFAULT_VELOCITY 340 -WINE_DEFAULT_DEBUG_CHANNEL(dsound3d); - /******************************************************************************* * Auxiliary functions */