* 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
This commit is contained in:
Amine Khaldi 2014-01-20 11:30:39 +00:00
parent a45032bc5d
commit ee32b9379c
13 changed files with 55 additions and 227 deletions

View 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)

View file

@ -19,26 +19,7 @@
* 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

View file

@ -25,27 +25,8 @@
* 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 */

View file

@ -20,31 +20,8 @@
* 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;

View file

@ -34,27 +34,8 @@
* 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))

View file

@ -32,42 +32,10 @@
* 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;

View file

@ -19,17 +19,43 @@
* 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;

View file

@ -20,27 +20,8 @@
* 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
*/

View file

@ -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 */

View file

@ -22,30 +22,9 @@
* 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)
{

View file

@ -23,26 +23,8 @@
* 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;

View file

@ -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 <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 };

View file

@ -37,30 +37,11 @@
* 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
*/