[DSOUND]
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 20 Jan 2014 11:30:39 +0000 (11:30 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 20 Jan 2014 11:30:39 +0000 (11:30 +0000)
* 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

13 files changed:
reactos/dll/directx/wine/dsound/CMakeLists.txt
reactos/dll/directx/wine/dsound/buffer.c
reactos/dll/directx/wine/dsound/capture.c
reactos/dll/directx/wine/dsound/dsound.c
reactos/dll/directx/wine/dsound/dsound_convert.c
reactos/dll/directx/wine/dsound/dsound_main.c
reactos/dll/directx/wine/dsound/dsound_private.h
reactos/dll/directx/wine/dsound/duplex.c
reactos/dll/directx/wine/dsound/guid.c [new file with mode: 0644]
reactos/dll/directx/wine/dsound/mixer.c
reactos/dll/directx/wine/dsound/primary.c
reactos/dll/directx/wine/dsound/propset.c
reactos/dll/directx/wine/dsound/sound3d.c

index ca2fe9e..d77cb4a 100644 (file)
@@ -18,6 +18,7 @@ add_library(dsound SHARED
     primary.c
     propset.c
     sound3d.c
+    guid.c
     version.rc
     ${CMAKE_CURRENT_BINARY_DIR}/dsound.def)
 
index 522d3bd..a574449 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define NONAMELESSSTRUCT
-#define NONAMELESSUNION
-#include <windef.h>
-#include <winbase.h>
-//#include "winuser.h"
-#include <mmsystem.h>
-#include <winternl.h>
-#include <vfwmsgs.h>
-#include <wine/debug.h>
-#include <dsound.h>
 #include "dsound_private.h"
-//#include <dsconf.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(dsound);
 
 /*******************************************************************************
  *             IDirectSoundNotify
index fcee0b8..fd7539a 100644 (file)
  *     Make DirectSoundCaptureCreate and DirectSoundCaptureCreate8 behave differently
  */
 
-#include <stdarg.h>
-
-#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 <mmddk.h>
-#include <winternl.h>
-//#include "winnls.h"
-#include <wine/debug.h>
-#include <dsound.h>
 #include "dsound_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(dsound);
-
 typedef struct DirectSoundCaptureDevice      DirectSoundCaptureDevice;
 
 /* IDirectSoundCaptureBuffer implementation structure */
index 13f6a5d..eff3de8 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-#include <stdarg.h>
-//#include <stdio.h>
-
-#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 <winternl.h>
-#include "mmddk.h"
-//#include "wingdi.h"
-//#include "mmreg.h"
-//#include "ks.h"
-//#include "ksmedia.h"
-#include <wine/debug.h>
-#include <dsound.h>
 #include "dsound_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(dsound);
-
 typedef struct IDirectSoundImpl {
     IUnknown            IUnknown_inner;
     IDirectSound8       IDirectSound8_iface;
index 1e8e25d..76c99c1 100644 (file)
  * Sound is LITTLE endian
  */
 
-#include <config.h>
-
-#include <stdarg.h>
-#include <math.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define NONAMELESSSTRUCT
-#define NONAMELESSUNION
-#include <windef.h>
-#include <winbase.h>
-#include <mmsystem.h>
-#include <winternl.h>
-#include <wine/debug.h>
-#include <dsound.h>
 #include "dsound_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(dsound);
-
 #ifdef WORDS_BIGENDIAN
 #define le16(x) RtlUshortByteSwap((x))
 #define le32(x) RtlUlongByteSwap((x))
index aa75c55..fc20c51 100644 (file)
  *      Remove DS_HEL_FRAGS and use mixer fragment length for it
  */
 
-#include <stdarg.h>
-
-#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 <winnls.h>
-#include <winreg.h>
-//#include "mmsystem.h"
-#include <winternl.h>
-#include <mmddk.h>
-#include <wine/debug.h>
-#include <dsound.h>
-#include <dsconf.h>
-//#include "ks.h"
-#include <rpcproxy.h>
-//#include "rpc.h"
-//#include "rpcndr.h"
-//#include "unknwn.h"
-//#include "oleidl.h"
-//#include "shobjidl.h"
-
-#include <initguid.h>
-//#include "ksmedia.h"
-//#include "propkey.h"
-#include <devpkey.h>
-
 #include "dsound_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(dsound);
+#include <winreg.h>
+#include <rpcproxy.h>
 
 struct list DSOUND_renderers = LIST_INIT(DSOUND_renderers);
 CRITICAL_SECTION DSOUND_renderers_lock;
index a8f5f42..6bd6a98 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include <wine/config.h>
+
+#include <assert.h>
+#include <math.h>
+#include <stdarg.h>
+
+#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 <winnls.h>
+#include <wingdi.h>
+#include <winternl.h>
+#include <objbase.h>
+#include <mmdeviceapi.h>
+#include <audioclient.h>
+#include <mmsystem.h>
+#include <dsound.h>
+#include <dsconf.h>
+#include <vfwmsgs.h>
+#include <devpkey.h>
+
+#include <wine/debug.h>
+#include <wine/list.h>
+
+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;
 
index fad20c2..8e1b9fe 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define NONAMELESSSTRUCT
-#define NONAMELESSUNION
-#define COBJMACROS
-#include <windef.h>
-#include <winbase.h>
-//#include "winuser.h"
-#include <mmsystem.h>
-//#include "mmddk.h"
-#include <winternl.h>
-#include <wine/debug.h>
-#include <dsound.h>
 #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 (file)
index 0000000..ff912c5
--- /dev/null
@@ -0,0 +1,18 @@
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include <windef.h>
+#include <winbase.h>
+#include <wingdi.h>
+#include <objbase.h>
+#include <initguid.h>
+#include <mmdeviceapi.h>
+#include <audioclient.h>
+#include <devpkey.h>
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
index 05a1ca3..bf81b1f 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-#include <stdarg.h>
-#include <math.h>      /* Insomnia - pow() function */
-
-#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 <mmsystem.h>
-//#include "wingdi.h"
-//#include "mmreg.h"
-#include <winternl.h>
-#include <wine/debug.h>
-#include <dsound.h>
-//#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)
 {
index 93962a0..5a90782 100644 (file)
  *       it leaves dsound in unusable (not really open) state.
  */
 
-#include <stdarg.h>
-
-#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 <winternl.h>
-#include <mmddk.h>
-#include <wine/debug.h>
-#include <dsound.h>
 #include "dsound_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(dsound);
-
 static DWORD DSOUND_fraglen(DirectSoundDevice *device)
 {
     REFERENCE_TIME period;
index c19ff9f..cb309d0 100644 (file)
  * 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 <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-//#include "winuser.h"
-#include <mmsystem.h>
-#include <winternl.h>
-#include <winnls.h>
-#include <vfwmsgs.h>
-#include <initguid.h>
-//#include <mmddk.h>
-#include <wine/debug.h>
-#include <dsound.h>
 #include "dsound_private.h"
-#include <dsconf.h>
-
-//#include "ksmedia.h"
-//#include "propkey.h"
-#include <devpkey.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(dsound);
 
 static WCHAR wInterface[] = { 'I','n','t','e','r','f','a','c','e',0 };
 
index 04a3e32..48a3773 100644 (file)
  *      Optimize WINMM and negotiate fragment size, decrease DS_HEL_MARGIN
  */
 
-#include <stdarg.h>
-#include <math.h>      /* Insomnia - pow() function */
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-#include <windef.h>
-#include <winbase.h>
-//#include "winuser.h"
-#include <mmsystem.h>
-#include <winternl.h>
-//#include "mmddk.h"
-#include <wine/debug.h>
-#include <dsound.h>
 #include "dsound_private.h"
 
 /* default velocity of sound in the air */
 #define DEFAULT_VELOCITY 340
 
-WINE_DEFAULT_DEBUG_CHANNEL(dsound3d);
-
 /*******************************************************************************
  *              Auxiliary functions
  */