[PATCH 6/6] dsound: Make more capture specifics local
Maarten Lankhorst (none)
mlankhorst at patser.
Sat Nov 14 09:30:47 CST 2009
---
dlls/dsound/capture.c | 69 ++++++++++++++++++++++++++++++++++++++++-
dlls/dsound/dsound_main.c | 1 -
dlls/dsound/dsound_private.h | 66 ----------------------------------------
3 files changed, 67 insertions(+), 69 deletions(-)
diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c
index e9c9508..aed2c79 100644
--- a/dlls/dsound/capture.c
+++ b/dlls/dsound/capture.c
@@ -43,6 +43,65 @@
WINE_DEFAULT_DEBUG_CHANNEL(dsound);
+typedef struct IDirectSoundCaptureImpl IDirectSoundCaptureImpl;
+typedef struct IDirectSoundCaptureBufferImpl IDirectSoundCaptureBufferImpl;
+typedef struct IDirectSoundCaptureNotifyImpl IDirectSoundCaptureNotifyImpl;
+typedef struct DirectSoundCaptureDevice DirectSoundCaptureDevice;
+
+/*****************************************************************************
+ * DirectSoundCaptureDevice implementation structure
+ */
+struct DirectSoundCaptureDevice
+{
+ /* IDirectSoundCaptureImpl fields */
+ GUID guid;
+ LONG ref;
+
+ /* DirectSound driver stuff */
+ PIDSCDRIVER driver;
+ DSDRIVERDESC drvdesc;
+ DSCDRIVERCAPS drvcaps;
+ PIDSCDRIVERBUFFER hwbuf;
+
+ /* wave driver info */
+ HWAVEIN hwi;
+
+ /* more stuff */
+ LPBYTE buffer;
+ DWORD buflen;
+
+ PWAVEFORMATEX pwfx;
+
+ IDirectSoundCaptureBufferImpl* capture_buffer;
+ DWORD state;
+ LPWAVEHDR pwave;
+ int nrofpwaves;
+ int index;
+ CRITICAL_SECTION lock;
+};
+
+/*****************************************************************************
+ * IDirectSoundCaptureBuffer implementation structure
+ */
+struct IDirectSoundCaptureBufferImpl
+{
+ /* IUnknown fields */
+ const IDirectSoundCaptureBuffer8Vtbl *lpVtbl;
+ LONG ref;
+
+ /* IDirectSoundCaptureBufferImpl fields */
+ DirectSoundCaptureDevice* device;
+ /* FIXME: don't need this */
+ LPDSCBUFFERDESC pdscbd;
+ DWORD flags;
+
+ /* IDirectSoundCaptureNotifyImpl fields */
+ IDirectSoundCaptureNotifyImpl* notify;
+ LPDSBPOSITIONNOTIFY notifies;
+ int nrofnotifies;
+ PIDSDRIVERNOTIFY hwnotify;
+};
+
/*****************************************************************************
* IDirectSoundCapture implementation structure
*/
@@ -73,7 +132,7 @@ static HRESULT IDirectSoundCaptureNotifyImpl_Create(IDirectSoundCaptureBufferImp
IDirectSoundCaptureNotifyImpl ** pdscn);
-DirectSoundCaptureDevice * DSOUND_capture[MAXWAVEDRIVERS];
+static DirectSoundCaptureDevice *DSOUND_capture[MAXWAVEDRIVERS];
static HRESULT DirectSoundCaptureDevice_Create(DirectSoundCaptureDevice ** ppDevice);
@@ -364,6 +423,8 @@ IDirectSoundCaptureImpl_AddRef( LPDIRECTSOUNDCAPTURE iface )
return ref;
}
+static ULONG DirectSoundCaptureDevice_Release(DirectSoundCaptureDevice * device);
+
static ULONG WINAPI
IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface )
{
@@ -459,6 +520,10 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_GetCaps(
return DS_OK;
}
+static HRESULT DirectSoundCaptureDevice_Initialize(
+ DirectSoundCaptureDevice ** ppDevice,
+ LPCGUID lpcGUID);
+
static HRESULT WINAPI IDirectSoundCaptureImpl_Initialize(
LPDIRECTSOUNDCAPTURE iface,
LPCGUID lpcGUID )
@@ -1355,7 +1420,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create(
/*******************************************************************************
* DirectSoundCaptureDevice
*/
-HRESULT DirectSoundCaptureDevice_Initialize(
+static HRESULT DirectSoundCaptureDevice_Initialize(
DirectSoundCaptureDevice ** ppDevice,
LPCGUID lpcGUID)
{
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index 9fa38f2..f989801 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -663,7 +663,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
TRACE("DLL_PROCESS_ATTACH\n");
for (i = 0; i < MAXWAVEDRIVERS; i++) {
DSOUND_renderer[i] = NULL;
- DSOUND_capture[i] = NULL;
INIT_GUID(DSOUND_renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
INIT_GUID(DSOUND_capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
}
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 4a1b7de..1d19042 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -50,10 +50,7 @@ typedef struct IDirectSound8_IUnknown IDirectSound8_IUnknown;
typedef struct IDirectSound8_IDirectSound IDirectSound8_IDirectSound;
typedef struct IDirectSound8_IDirectSound8 IDirectSound8_IDirectSound8;
typedef struct IDirectSoundBufferImpl IDirectSoundBufferImpl;
-typedef struct IDirectSoundCaptureImpl IDirectSoundCaptureImpl;
-typedef struct IDirectSoundCaptureBufferImpl IDirectSoundCaptureBufferImpl;
typedef struct IDirectSoundNotifyImpl IDirectSoundNotifyImpl;
-typedef struct IDirectSoundCaptureNotifyImpl IDirectSoundCaptureNotifyImpl;
typedef struct IDirectSound3DListenerImpl IDirectSound3DListenerImpl;
typedef struct IDirectSound3DBufferImpl IDirectSound3DBufferImpl;
typedef struct IKsBufferPropertySetImpl IKsBufferPropertySetImpl;
@@ -61,7 +58,6 @@ typedef struct IKsPrivatePropertySetImpl IKsPrivatePropertySetImpl;
typedef struct PrimaryBufferImpl PrimaryBufferImpl;
typedef struct SecondaryBufferImpl SecondaryBufferImpl;
typedef struct DirectSoundDevice DirectSoundDevice;
-typedef struct DirectSoundCaptureDevice DirectSoundCaptureDevice;
/* dsound_convert.h */
typedef void (*bitsconvertfunc)(const void *, void *, UINT, UINT, INT, UINT, UINT);
@@ -240,66 +236,6 @@ HRESULT PrimaryBufferImpl_Create(
LPCDSBUFFERDESC dsbd);
/*****************************************************************************
- * DirectSoundCaptureDevice implementation structure
- */
-struct DirectSoundCaptureDevice
-{
- /* IDirectSoundCaptureImpl fields */
- GUID guid;
- LONG ref;
-
- /* DirectSound driver stuff */
- PIDSCDRIVER driver;
- DSDRIVERDESC drvdesc;
- DSCDRIVERCAPS drvcaps;
- PIDSCDRIVERBUFFER hwbuf;
-
- /* wave driver info */
- HWAVEIN hwi;
-
- /* more stuff */
- LPBYTE buffer;
- DWORD buflen;
-
- PWAVEFORMATEX pwfx;
-
- IDirectSoundCaptureBufferImpl* capture_buffer;
- DWORD state;
- LPWAVEHDR pwave;
- int nrofpwaves;
- int index;
- CRITICAL_SECTION lock;
-};
-
-HRESULT DirectSoundCaptureDevice_Initialize(
- DirectSoundCaptureDevice ** ppDevice,
- LPCGUID lpcGUID);
-ULONG DirectSoundCaptureDevice_Release(
- DirectSoundCaptureDevice * device);
-
-/*****************************************************************************
- * IDirectSoundCaptureBuffer implementation structure
- */
-struct IDirectSoundCaptureBufferImpl
-{
- /* IUnknown fields */
- const IDirectSoundCaptureBuffer8Vtbl *lpVtbl;
- LONG ref;
-
- /* IDirectSoundCaptureBufferImpl fields */
- DirectSoundCaptureDevice* device;
- /* FIXME: don't need this */
- LPDSCBUFFERDESC pdscbd;
- DWORD flags;
-
- /* IDirectSoundCaptureNotifyImpl fields */
- IDirectSoundCaptureNotifyImpl* notify;
- LPDSBPOSITIONNOTIFY notifies;
- int nrofnotifies;
- PIDSDRIVERNOTIFY hwnotify;
-};
-
-/*****************************************************************************
* IDirectSound3DListener implementation structure
*/
struct IDirectSound3DListenerImpl
@@ -420,8 +356,6 @@ HRESULT DSOUND_CaptureCreate8(REFIID riid, LPDIRECTSOUNDCAPTURE8 *ppDSC8);
extern DirectSoundDevice* DSOUND_renderer[MAXWAVEDRIVERS];
extern GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
-
-extern DirectSoundCaptureDevice * DSOUND_capture[MAXWAVEDRIVERS];
extern GUID DSOUND_capture_guids[MAXWAVEDRIVERS];
HRESULT mmErr(UINT err);
--
1.6.5.2
--------------070309060401090703060908--
More information about the wine-patches
mailing list