|
|
|
IDirectSoundCapture8 Interface |
|
' ***************************************************************************************
' IDirectSoundCapture8 Interface
' The IDirectSoundCapture8 interface is used to create sound capture buffers.
' The interface is obtained by using the DirectSoundCaptureCreate8 or
' DirectSoundFullDuplexCreate8 functions, or by using CoCreateInstance or
' CoCreateInstanceEx to create an object of class CLSID_DirectSoundCapture8.
' IDirectSoundCapture8 is a define for IDirectSoundCapture. The two interface names are
' interchangeable. However, objects supporting this interface can have different
' functionality, depending on their class.
' ***************************************************************************************
' ***************************************************************************************
'DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
'{
' // IUnknown methods
' 0. STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
' 1. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
' 2. STDMETHOD_(ULONG,Release) (THIS) PURE;
' // IDirectSoundCapture methods
' 3. STDMETHOD(CreateCaptureBuffer) (THIS_ LPCDSCBUFFERDESC pcDSCBufferDesc, LPDIRECTSOUNDCAPTUREBUFFER *ppDSCBuffer, LPUNKNOWN pUnkOuter) PURE;
' 4. STDMETHOD(GetCaps) (THIS_ LPDSCCAPS pDSCCaps) PURE;
' 5. STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE;
'};
' ***************************************************************************************
' ***************************************************************************************
' CreateCaptureBuffer
' The CreateCaptureBuffer method creates a buffer for capturing waveform audio.
' HRESULT CreateCaptureBuffer(
' LPCDSCBUFFERDESC pcDSCBufferDesc,
' LPDIRECTSOUNDCAPTUREBUFFER * ppDSCBuffer,
' LPUNKNOWN pUnkOuter
' );
' ***************************************************************************************
FUNCTION IDirectSoundCapture_CreateCaptureBuffer ALIAS "IDirectSoundCapture_CreateCaptureBuffer" (_
BYVAL pthis AS DWORD PTR, BYREF pcDSCBufferDesc AS DSCBUFFERDESC, _
BYREF ppDSCBuffer AS DWORD, BYVAL pUnkOuter AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[3] USING IDirectSoundCapture_CreateCaptureBuffer(pthis, pcDSCBufferDesc, ppDSCBuffer, pUnkOuter) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ***************************************************************************************
' ***************************************************************************************
' GetCaps
' The GetCaps method retrieves the capabilities of the capture device.
' HRESULT GetCaps(
' LPDSCCAPS pDSCCaps
' );
' ***************************************************************************************
FUNCTION IDirectSoundCapture_GetCaps ALIAS "IDirectSoundCapture_GetCaps" ( _
BYVAL pthis AS DWORD PTR, BYREF pDSCaps AS DSCAPS) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[4] USING IDirectSoundCapture_GetCaps(pthis, pDSCaps) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ***************************************************************************************
' ***************************************************************************************
' Initialize
' The Initialize method initializes a capture device object created by using
' CoCreateInstance.
' Calling this method is not required when the DirectSoundCaptureCreate8 or
' DirectSoundFullDuplexCreate8 function is used to create the object.
' HRESULT Initialize(
' LPCGUID pcGuidDevice
' );
' ***************************************************************************************
FUNCTION IDirectSoundCapture_Initialize ALIAS "IDirectSoundCapture_Initialize" ( _
BYVAL pthis AS DWORD PTR, BYREF pcGuidDevice AS GUID) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[5] USING IDirectSoundCapture_Initialize(pthis, pcGuidDevice) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ***************************************************************************************
|
Page last updated on Wednesday, 15 March 2006 01:11:30 +0100