- Added DirectSoundCapture and DirectSoundCaptureBuffer interfaces

- Added some SoundCapture stubs
- Changed REFIID to LPCGUID in a few places as per MS header file
oldstable
Peter Hunnisett 2000-06-01 22:47:35 +00:00 committed by Alexandre Julliard
parent cfeb6afda3
commit f5a1027595
3 changed files with 486 additions and 14 deletions

View File

@ -86,6 +86,8 @@ typedef struct IDirectSoundBufferImpl IDirectSoundBufferImpl;
typedef struct IDirectSoundNotifyImpl IDirectSoundNotifyImpl;
typedef struct IDirectSound3DListenerImpl IDirectSound3DListenerImpl;
typedef struct IDirectSound3DBufferImpl IDirectSound3DBufferImpl;
typedef struct IDirectSoundCaptureImpl IDirectSoundCaptureImpl;
typedef struct IDirectSoundCaptureBufferImpl IDirectSoundCaptureBufferImpl;
/*****************************************************************************
* IDirectSound implementation structure
@ -175,6 +177,33 @@ struct IDirectSound3DBufferImpl
};
/*****************************************************************************
* IDirectSoundCapture implementation structure
*/
struct IDirectSoundCaptureImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectSoundCapture);
DWORD ref;
/* IDirectSoundCaptureImpl fields */
CRITICAL_SECTION lock;
};
/*****************************************************************************
* IDirectSoundCapture implementation structure
*/
struct IDirectSoundCaptureBufferImpl
{
/* IUnknown fields */
ICOM_VFIELD(IDirectSoundCaptureBuffer);
DWORD ref;
/* IDirectSoundCaptureBufferImpl fields */
CRITICAL_SECTION lock;
};
#ifdef HAVE_OSS
# include <sys/ioctl.h>
# ifdef HAVE_MACHINE_SOUNDCARD_H
@ -203,6 +232,12 @@ static int DSOUND_setformat(LPWAVEFORMATEX wfex);
static void DSOUND_CheckEvent(IDirectSoundBufferImpl *dsb, int len);
static void DSOUND_CloseAudio(void);
static HRESULT DSOUND_CreateDirectSoundCapture( LPVOID* ppobj );
static HRESULT DSOUND_CreateDirectSoundCaptureBuffer( LPCDSCBUFFERDESC lpcDSCBufferDesc, LPVOID* ppobj );
static ICOM_VTABLE(IDirectSoundCapture) dscvt;
static ICOM_VTABLE(IDirectSoundCaptureBuffer) dscbvt;
#endif
/***************************************************************************
@ -475,7 +510,7 @@ static HRESULT WINAPI IDirectSound3DBufferImpl_SetVelocity(
return DS_OK;
}
ICOM_VTABLE(IDirectSound3DBuffer) ds3dbvt =
static ICOM_VTABLE(IDirectSound3DBuffer) ds3dbvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
/* IUnknown methods */
@ -749,7 +784,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_CommitDeferredSettings(
return DS_OK;
}
ICOM_VTABLE(IDirectSound3DListener) ds3dlvt =
static ICOM_VTABLE(IDirectSound3DListener) ds3dlvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
/* IUnknown methods */
@ -827,7 +862,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(
return S_OK;
}
ICOM_VTABLE(IDirectSoundNotify) dsnvt =
static ICOM_VTABLE(IDirectSoundNotify) dsnvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IDirectSoundNotifyImpl_QueryInterface,
@ -1765,10 +1800,10 @@ static HRESULT WINAPI IDirectSoundImpl_GetSpeakerConfig(
static HRESULT WINAPI IDirectSoundImpl_Initialize(
LPDIRECTSOUND iface,
LPGUID lpGuid)
LPCGUID lpcGuid)
{
ICOM_THIS(IDirectSoundImpl,iface);
TRACE("(%p, %p)\n", This, lpGuid);
TRACE("(%p, %p)\n", This, lpcGuid);
return DS_OK;
}
@ -2537,7 +2572,7 @@ HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pU
/***************************************************************************
* DirectSoundCaptureCreate [DSOUND.6]
*
* Enumerate all DirectSound drivers installed in the system
* Create and initialize a DirectSoundCapture interface
*
* RETURNS
* Success: DS_OK
@ -2545,16 +2580,22 @@ HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pU
* DSERR_OUTOFMEMORY
*/
HRESULT WINAPI DirectSoundCaptureCreate(
REFGUID riid,
LPCGUID lpcGUID,
LPDIRECTSOUNDCAPTURE* lplpDSC,
LPUNKNOWN pUnkOuter )
{
FIXME("(%s,%p,%p): stub\n", debugstr_guid(riid), lplpDSC, pUnkOuter);
TRACE("(%s,%p,%p)\n", debugstr_guid(lpcGUID), lplpDSC, pUnkOuter);
if( pUnkOuter ) {
return DSERR_NOAGGREGATION;
}
/* Default device? */
if ( !lpcGUID ) {
return DSOUND_CreateDirectSoundCapture( (LPVOID*)lplpDSC );
}
FIXME( "Unknown GUID %s\n", debugstr_guid(lpcGUID) );
*lplpDSC = NULL;
return DSERR_OUTOFMEMORY;
@ -2573,7 +2614,13 @@ HRESULT WINAPI DirectSoundCaptureEnumerateA(
LPDSENUMCALLBACKA lpDSEnumCallback,
LPVOID lpContext)
{
FIXME("(%p,%p):stub\n", lpDSEnumCallback, lpContext );
TRACE("(%p,%p)\n", lpDSEnumCallback, lpContext );
if ( lpDSEnumCallback )
lpDSEnumCallback(NULL,"WINE Primary Sound Capture Driver",
"SoundCap",lpContext);
return DS_OK;
}
@ -2594,9 +2641,351 @@ HRESULT WINAPI DirectSoundCaptureEnumerateW(
return DS_OK;
}
static HRESULT
DSOUND_CreateDirectSoundCapture( LPVOID* ppobj )
{
*ppobj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( IDirectSoundCaptureImpl ) );
if ( *ppobj == NULL ) {
return DSERR_OUTOFMEMORY;
}
{
ICOM_THIS(IDirectSoundCaptureImpl,*ppobj);
This->ref = 1;
ICOM_VTBL(This) = &dscvt;
InitializeCriticalSection( &This->lock );
}
return S_OK;
}
static HRESULT
IDirectSoundCaptureImpl_QueryInterface(
LPDIRECTSOUNDCAPTURE iface,
REFIID riid,
LPVOID* ppobj )
{
ICOM_THIS(IDirectSoundCaptureImpl,iface);
FIXME( "(%p)->(%s,%p): stub\n", This, debugstr_guid(riid), ppobj );
return E_FAIL;
}
static ULONG
IDirectSoundCaptureImpl_AddRef( LPDIRECTSOUNDCAPTURE iface )
{
ULONG uRef;
ICOM_THIS(IDirectSoundCaptureImpl,iface);
EnterCriticalSection( &This->lock );
TRACE( "(%p) was 0x%08lx\n", This, This->ref );
uRef = ++(This->ref);
LeaveCriticalSection( &This->lock );
return uRef;
}
static ULONG
IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface )
{
ULONG uRef;
ICOM_THIS(IDirectSoundCaptureImpl,iface);
EnterCriticalSection( &This->lock );
TRACE( "(%p) was 0x%08lx\n", This, This->ref );
uRef = --(This->ref);
LeaveCriticalSection( &This->lock );
if ( uRef == 0 ) {
DeleteCriticalSection( &This->lock );
HeapFree( GetProcessHeap(), 0, This );
}
return uRef;
}
static HRESULT
IDirectSoundCaptureImpl_CreateCaptureBuffer(
LPDIRECTSOUNDCAPTURE iface,
LPCDSCBUFFERDESC lpcDSCBufferDesc,
LPDIRECTSOUNDCAPTUREBUFFER* lplpDSCaptureBuffer,
LPUNKNOWN pUnk )
{
HRESULT hr;
ICOM_THIS(IDirectSoundCaptureImpl,iface);
TRACE( "(%p)->(%p,%p,%p)\n", This, lpcDSCBufferDesc, lplpDSCaptureBuffer, pUnk );
if ( pUnk ) {
return DSERR_INVALIDPARAM;
}
hr = DSOUND_CreateDirectSoundCaptureBuffer( lpcDSCBufferDesc, (LPVOID*)lplpDSCaptureBuffer );
return hr;
}
static HRESULT
IDirectSoundCaptureImpl_GetCaps(
LPDIRECTSOUNDCAPTURE iface,
LPDSCCAPS lpDSCCaps )
{
ICOM_THIS(IDirectSoundCaptureImpl,iface);
FIXME( "(%p)->(%p): stub\n", This, lpDSCCaps );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureImpl_Initialize(
LPDIRECTSOUNDCAPTURE iface,
LPCGUID lpcGUID )
{
ICOM_THIS(IDirectSoundCaptureImpl,iface);
FIXME( "(%p)->(%p): stub\n", This, lpcGUID );
return DS_OK;
}
static ICOM_VTABLE(IDirectSoundCapture) dscvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
/* IUnknown methods */
IDirectSoundCaptureImpl_QueryInterface,
IDirectSoundCaptureImpl_AddRef,
IDirectSoundCaptureImpl_Release,
/* IDirectSoundCapture methods */
IDirectSoundCaptureImpl_CreateCaptureBuffer,
IDirectSoundCaptureImpl_GetCaps,
IDirectSoundCaptureImpl_Initialize
};
static HRESULT
DSOUND_CreateDirectSoundCaptureBuffer( LPCDSCBUFFERDESC lpcDSCBufferDesc, LPVOID* ppobj )
{
FIXME( "(%p,%p): ignoring lpcDSCBufferDesc\n", lpcDSCBufferDesc, ppobj );
*ppobj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( IDirectSoundCaptureBufferImpl ) );
if ( *ppobj == NULL ) {
return DSERR_OUTOFMEMORY;
}
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,*ppobj);
This->ref = 1;
ICOM_VTBL(This) = &dscbvt;
InitializeCriticalSection( &This->lock );
}
return S_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_QueryInterface(
LPDIRECTSOUNDCAPTUREBUFFER iface,
REFIID riid,
LPVOID* ppobj )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%s,%p): stub\n", This, debugstr_guid(riid), ppobj );
return E_FAIL;
}
static ULONG
IDirectSoundCaptureBufferImpl_AddRef( LPDIRECTSOUNDCAPTUREBUFFER iface )
{
ULONG uRef;
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
EnterCriticalSection( &This->lock );
TRACE( "(%p) was 0x%08lx\n", This, This->ref );
uRef = ++(This->ref);
LeaveCriticalSection( &This->lock );
return uRef;
}
static ULONG
IDirectSoundCaptureBufferImpl_Release( LPDIRECTSOUNDCAPTUREBUFFER iface )
{
ULONG uRef;
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
EnterCriticalSection( &This->lock );
TRACE( "(%p) was 0x%08lx\n", This, This->ref );
uRef = --(This->ref);
LeaveCriticalSection( &This->lock );
if ( uRef == 0 ) {
DeleteCriticalSection( &This->lock );
HeapFree( GetProcessHeap(), 0, This );
}
return uRef;
}
static HRESULT
IDirectSoundCaptureBufferImpl_GetCaps(
LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDSCBCAPS lpDSCBCaps )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%p): stub\n", This, lpDSCBCaps );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_GetCurrentPosition(
LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDWORD lpdwCapturePosition,
LPDWORD lpdwReadPosition )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%p,%p): stub\n", This, lpdwCapturePosition, lpdwReadPosition );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_GetFormat(
LPDIRECTSOUNDCAPTUREBUFFER iface,
LPWAVEFORMATEX lpwfxFormat,
DWORD dwSizeAllocated,
LPDWORD lpdwSizeWritten )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%p,0x%08lx,%p): stub\n", This, lpwfxFormat, dwSizeAllocated, lpdwSizeWritten );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_GetStatus(
LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDWORD lpdwStatus )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%p): stub\n", This, lpdwStatus );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_Initialize(
LPDIRECTSOUNDCAPTUREBUFFER iface,
LPDIRECTSOUNDCAPTURE lpDSC,
LPCDSCBUFFERDESC lpcDSCBDesc )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%p,%p): stub\n", This, lpDSC, lpcDSCBDesc );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_Lock(
LPDIRECTSOUNDCAPTUREBUFFER iface,
DWORD dwReadCusor,
DWORD dwReadBytes,
LPVOID* lplpvAudioPtr1,
LPDWORD lpdwAudioBytes1,
LPVOID* lplpvAudioPtr2,
LPDWORD lpdwAudioBytes2,
DWORD dwFlags )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%08lu,%08lu,%p,%p,%p,%p,0x%08lx): stub\n", This, dwReadCusor, dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2, lpdwAudioBytes2, dwFlags );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_Start(
LPDIRECTSOUNDCAPTUREBUFFER iface,
DWORD dwFlags )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(0x%08lx): stub\n", This, dwFlags );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_Stop( LPDIRECTSOUNDCAPTUREBUFFER iface )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p): stub\n", This );
return DS_OK;
}
static HRESULT
IDirectSoundCaptureBufferImpl_Unlock(
LPDIRECTSOUNDCAPTUREBUFFER iface,
LPVOID lpvAudioPtr1,
DWORD dwAudioBytes1,
LPVOID lpvAudioPtr2,
DWORD dwAudioBytes2 )
{
ICOM_THIS(IDirectSoundCaptureBufferImpl,iface);
FIXME( "(%p)->(%p,%08lu,%p,%08lu): stub\n", This, lpvAudioPtr1, dwAudioBytes1, lpvAudioPtr2, dwAudioBytes2 );
return DS_OK;
}
static ICOM_VTABLE(IDirectSoundCaptureBuffer) dscbvt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
/* IUnknown methods */
IDirectSoundCaptureBufferImpl_QueryInterface,
IDirectSoundCaptureBufferImpl_AddRef,
IDirectSoundCaptureBufferImpl_Release,
/* IDirectSoundCaptureBuffer methods */
IDirectSoundCaptureBufferImpl_GetCaps,
IDirectSoundCaptureBufferImpl_GetCurrentPosition,
IDirectSoundCaptureBufferImpl_GetFormat,
IDirectSoundCaptureBufferImpl_GetStatus,
IDirectSoundCaptureBufferImpl_Initialize,
IDirectSoundCaptureBufferImpl_Lock,
IDirectSoundCaptureBufferImpl_Start,
IDirectSoundCaptureBufferImpl_Stop,
IDirectSoundCaptureBufferImpl_Unlock
};
/*******************************************************************************
* DirectSound ClassFactory

View File

@ -342,7 +342,15 @@ typedef BOOL (CALLBACK* LPDPENUMDPCALLBACKA)(
DWORD dwMinorVersion, /* Minor # of driver spec in lpguidSP */
LPVOID lpContext); /* User given */
/* NOTE: This isn't in the dplay.h header file, but this shouldn't be
* a problem. We require this because we include all these header files
* which declare GUIDs in guid.c
*/
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif
typedef const DPNAME *LPCDPNAME;
typedef BOOL (CALLBACK* LPDPENUMCONNECTIONSCALLBACK)(

View File

@ -179,17 +179,49 @@ typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 /* 20 degrees */
#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 /* 180 degrees */
typedef struct _DSCBUFFERDESC
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat;
} DSCBUFFERDESC, *LPDSCBUFFERDESC;
typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
typedef struct _DSCCAPS
{
DWORD DwSize;
DWORD dwFlags;
DWORD dwFormats;
DWORD dwChannels;
} DSCCAPS, *LPDSCCAPS;
typedef const DSCCAPS *LPCDSCCAPS;
typedef struct _DSCBCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
} DSCBCAPS, *LPDSCBCAPS;
typedef const DSCBCAPS *LPCDSCBCAPS;
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif
typedef LPVOID* LPLPVOID;
typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID,LPWSTR,LPWSTR,LPVOID);
typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID,LPSTR,LPSTR,LPVOID);
extern HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND * ppDS,IUnknown *pUnkOuter );
extern HRESULT WINAPI DirectSoundCreate(LPCGUID lpGUID,LPDIRECTSOUND * ppDS,IUnknown *pUnkOuter );
extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
extern HRESULT WINAPI DirectSoundCaptureCreate(REFGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
@ -206,7 +238,7 @@ extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
ICOM_METHOD (HRESULT,Compact) \
ICOM_METHOD1(HRESULT,GetSpeakerConfig, LPDWORD,lpdwSpeakerConfig) \
ICOM_METHOD1(HRESULT,SetSpeakerConfig, DWORD,dwSpeakerConfig) \
ICOM_METHOD1(HRESULT,Initialize, LPGUID,lpGuid)
ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGuid)
#define IDirectSound_IMETHODS \
IUnknown_IMETHODS \
IDirectSound_METHODS
@ -285,14 +317,57 @@ ICOM_DEFINE(IDirectSoundBuffer,IUnknown)
/*****************************************************************************
* IDirectSoundCapture interface
*/
/* FIXME: not implemented yet */
#define ICOM_INTERFACE IDirectSoundCapture
#define IDirectSoundCapture_METHODS \
ICOM_METHOD3(HRESULT,CreateCaptureBuffer, LPCDSCBUFFERDESC,lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER*,lplpDSCaptureBuffer, LPUNKNOWN,pUnk) \
ICOM_METHOD1(HRESULT,GetCaps, LPDSCCAPS,lpDSCCaps) \
ICOM_METHOD1(HRESULT,Initialize, LPCGUID,lpcGUID)
#define IDirectSoundCapture_IMETHODS \
IUnknown_IMETHODS \
IDirectSoundCapture_METHODS
ICOM_DEFINE(IDirectSoundCapture,IUnknown)
#undef ICOM_INTERFACE
#define IDirectSoundCapture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectSoundCapture_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectSoundCapture_Release(p) ICOM_CALL (Release,p)
#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) ICOM_CALL3(CreateCaptureBuffer,p,a,b,c)
#define IDirectSoundCapture_GetCaps(p,a) ICOM_CALL (GetCaps,p,a)
#define IDirectSoundCapture_Initialize(p,a) ICOM_CALL (Initialize,p,a)
/*****************************************************************************
* IDirectSoundCaptureBuffer interface
*/
/* FIXME: not implemented yet */
#define ICOM_INTERFACE IDirectSoundCaptureBuffer
#define IDirectSoundCaptureBuffer_METHODS \
ICOM_METHOD1(HRESULT,GetCaps, LPDSCBCAPS,lpDSCBCaps) \
ICOM_METHOD2(HRESULT,GetCurrentPosition, LPDWORD,lpdwCapturePosition,LPDWORD,lpdwReadPosition) \
ICOM_METHOD3(HRESULT,GetFormat, LPWAVEFORMATEX,lpwfxFormat, DWORD,dwSizeAllocated, LPDWORD,lpdwSizeWritten) \
ICOM_METHOD1(HRESULT,GetStatus, LPDWORD,lpdwStatus) \
ICOM_METHOD2(HRESULT,Initialize, LPDIRECTSOUNDCAPTURE,lpDSC, LPCDSCBUFFERDESC,lpcDSCBDesc) \
ICOM_METHOD7(HRESULT,Lock, DWORD,dwReadCusor, DWORD,dwReadBytes, LPVOID*,lplpvAudioPtr1, LPDWORD,lpdwAudioBytes1, LPVOID*,lplpvAudioPtr2, LPDWORD,lpdwAudioBytes2, DWORD,dwFlags) \
ICOM_METHOD1(HRESULT,Start, DWORD,dwFlags) \
ICOM_METHOD (HRESULT,Stop) \
ICOM_METHOD4(HRESULT,Unlock, LPVOID,lpvAudioPtr1, DWORD,dwAudioBytes1, LPVOID,lpvAudioPtr2, DWORD,dwAudioBytes2)
#define IDirectSoundCaptureBuffer_IMETHODS \
IUnknown_IMETHODS \
IDirectSoundCaptureBuffer_METHODS
ICOM_DEFINE(IDirectSoundCaptureBuffer,IUnknown)
#undef ICOM_INTERFACE
#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectSoundCaptureBuffer_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectSoundCaptureBuffer_Release(p) ICOM_CALL (Release,p)
#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) ICOM_CALL2(GetCurrentPosition,p,a,b)
#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) ICOM_CALL3(GetFormat,p,a,b,c)
#define IDirectSoundCaptureBuffer_GetStatus(p,a) ICOM_CALL1(GetStatus,p,a)
#define IDirectSoundCaptureBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) ICOM_CALL7(Lock,p,a,b,c,d,e,f,g)
#define IDirectSoundCaptureBuffer_Start(p,a) ICOM_CALL1(Start,p,a)
#define IDirectSoundCaptureBuffer_Stop(p) ICOM_CALL (Stop,p)
#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) ICOM_CALL4(Unlock,p,a,b,c,d)
/*****************************************************************************
* IDirectSoundNotify interface