/*
* Copyright (C) the Wine project
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef __DSOUND_INCLUDED__
#define __DSOUND_INCLUDED__
#ifndef DIRECTSOUND_VERSION
#endif
#define COM_NO_WINDOWS_H
#include <objbase.h>
#include <float.h>
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
#ifndef DX_SHARED_DEFINES
#ifndef D3DCOLOR_DEFINED
#define D3DCOLOR_DEFINED
#endif
#ifndef D3DVECTOR_DEFINED
typedef struct _D3DVECTOR {
float x;
float y;
float z;
} D3DVECTOR;
#define D3DVECTOR_DEFINED
#endif
#ifndef LPD3DVECTOR_DEFINED
#define LPD3DVECTOR_DEFINED
#endif
#define DX_SHARED_DEFINES
#endif /* DX_SHARED_DEFINES */
/*****************************************************************************
* Predeclare the interfaces
*/
DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825A449,0x7524,0x4D82,0x92,0x0F,0x50,0xE3,0x6A,0xB3,0xAB,0x1E);
DEFINE_GUID(IID_IDirectSoundNotify, 0xB0210783,0x89cd,0x11d0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
DEFINE_GUID(IID_IDirectSoundCapture, 0xB0210781,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
typedef struct IDirectSoundCapture IDirectSoundCapture8,*LPDIRECTSOUNDCAPTURE8,**LPLPDIRECTSOUNDCAPTURE8;
DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xB0210782,0x89CD,0x11D0,0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16);
typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER,**LPLPDIRECTSOUNDCAPTUREBUFFER;
DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x00990DF4,0x0DBB,0x4872,0x83,0x3E,0x6D,0x30,0x3E,0x80,0xAE,0xB6);
typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8,**LPLPDIRECTSOUNDCAPTUREBUFFER8;
DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xEDCB4C7A,0xDAAB,0x4216,0xA4,0x2E,0x6C,0x50,0x59,0x6D,0xDC,0x1D);
DEFINE_GUID(DSDEVID_DefaultPlayback, 0xDEF00000,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
DEFINE_GUID(DSDEVID_DefaultCapture, 0xDEF00001,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xDEF00002,0x9C6D,0x47Ed,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xDEF00003,0x9C6D,0x47ED,0xAA,0xF1,0x4D,0xDA,0x8F,0x2B,0x5C,0x03);
DEFINE_GUID(DSDEVID_WinePlayback, 0x40316A1D,0x605B,0xD611,0x87,0xC6,0x00,0x80,0xAD,0x00,0x02,0xFE);
#define DS_OK 0
typedef struct _DSCAPS
{
#define DSBPAN_CENTER 0
#define DSBVOLUME_MAX 0
#define DSBFREQUENCY_ORIGINAL 0
typedef struct _DSBCAPS
{
typedef struct _DSEFFECTDESC
{
enum
{
};
typedef struct _DSBUFFERDESC1
{
typedef struct _DSBUFFERDESC
{
typedef struct _DSBPOSITIONNOTIFY
{
#define DSSPEAKER_DIRECTOUT 0
typedef struct _DSCEFFECTDESC
{
typedef struct _DSCBUFFERDESC1
{
typedef struct _DSCBUFFERDESC
{
typedef struct _DSCCAPS
{
typedef struct _DSCBCAPS
{
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
#endif
extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID lpGUID, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice,
LPDIRECTSOUNDFULLDUPLEX *ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* IDirectSound interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSound methods ***/
STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSound methods ***/
#else
/*** IUnknown methods ***/
/*** IDirectSound methods ***/
#endif
/*****************************************************************************
* IDirectSound8 interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSound8 methods ***/
STDMETHOD(CreateSoundBuffer)(THIS_ LPCDSBUFFERDESC lpcDSBufferDesc, LPLPDIRECTSOUNDBUFFER lplpDirectSoundBuffer, IUnknown *pUnkOuter) PURE;
STDMETHOD(DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER lpDsbOriginal, LPLPDIRECTSOUNDBUFFER lplpDsbDuplicate) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSound methods ***/
/*** IDirectSound8 methods ***/
#else
/*** IUnknown methods ***/
/*** IDirectSound methods ***/
/*** IDirectSound8 methods ***/
#endif
/*****************************************************************************
* IDirectSoundBuffer interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSoundBuffer methods ***/
STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSoundBuffer methods ***/
#else
/*** IUnknown methods ***/
/*** IDirectSoundBuffer methods ***/
#endif
/*****************************************************************************
* IDirectSoundBuffer8 interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSoundBuffer8 methods ***/
STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor) PURE;
STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
STDMETHOD(Lock)(THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioPtr2) PURE;
STDMETHOD(SetFX)(THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE;
STDMETHOD(AcquireResources)(THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE;
STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSoundBuffer methods ***/
/*** IDirectSoundBuffer8 methods ***/
#else
/*** IUnknown methods ***/
/*** IDirectSoundBuffer methods ***/
/*** IDirectSoundBuffer8 methods ***/
#endif
/*****************************************************************************
* IDirectSoundCapture interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSoundCapture methods ***/
STDMETHOD(CreateCaptureBuffer)(THIS_ LPCDSCBUFFERDESC lpcDSCBufferDesc,LPDIRECTSOUNDCAPTUREBUFFER *lplpDSCaptureBuffer, LPUNKNOWN pUnk) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSoundCapture methods ***/
#else
/*** IUnknown methods ***/
/*** IDirectSoundCapture methods ***/
#endif
/*****************************************************************************
* IDirectSoundCaptureBuffer interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSoundCaptureBuffer methods ***/
STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSoundCaptureBuffer methods ***/
#else
/*** IUnknown methods ***/
/*** IDirectSoundCaptureBuffer methods ***/
#endif
/*****************************************************************************
* IDirectSoundCaptureBuffer8 interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSoundCaptureBuffer methods ***/
STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX lpwfxFormat, DWORD dwSizeAllocated, LPDWORD lpdwSizeWritten) PURE;
STDMETHOD(Lock)(THIS_ DWORD dwReadCusor, DWORD dwReadBytes, LPVOID *lplpvAudioPtr1, LPDWORD lpdwAudioBytes1, LPVOID *lplpvAudioPtr2, LPDWORD lpdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID lpvAudioPtr1, DWORD dwAudioBytes1, LPVOID lpvAudioPtr2, DWORD dwAudioBytes2) PURE;
/*** IDirectSoundCaptureBuffer8 methods ***/
STDMETHOD(GetObjectInPath)(THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSoundCaptureBuffer methods ***/
/*** IDirectSoundCaptureBuffer8 methods ***/
#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d)
#else
/*** IUnknown methods ***/
/*** IDirectSoundCaptureBuffer methods ***/
/*** IDirectSoundCaptureBuffer8 methods ***/
#endif
/*****************************************************************************
* IDirectSoundNotify interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSoundNotify methods ***/
STDMETHOD(SetNotificationPositions)(THIS_ DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSoundNotify methods ***/
#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
#else
/*** IUnknown methods ***/
/*** IDirectSoundNotify methods ***/
#endif
/*****************************************************************************
* IDirectSound3DListener interface
*/
#define DS3D_MINCONEANGLE 0
typedef struct _DS3DLISTENER {
{
/*** IUnknown methods ***/
/*** IDirectSound3DListener methods ***/
STDMETHOD(SetOrientation)(THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSound3DListener methods ***/
#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
#else
/*** IUnknown methods ***/
/*** IDirectSound3DListener methods ***/
#endif
/*****************************************************************************
* IDirectSound3DBuffer interface
*/
typedef struct _DS3DBUFFER {
{
/*** IUnknown methods ***/
/*** IDirectSound3DBuffer methods ***/
STDMETHOD(SetConeAngles)(THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSound3DBuffer methods ***/
#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
#else
/*** IUnknown methods ***/
/*** IDirectSound3DBuffer methods ***/
#endif
/*****************************************************************************
* IKsPropertySet interface
*/
#ifndef _IKsPropertySet_
#define _IKsPropertySet_
{
/*** IUnknown methods ***/
/*** IKsPropertySet methods ***/
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IKsPropertySet methods ***/
#else
/*** IUnknown methods ***/
/*** IKsPropertySet methods ***/
#endif
#endif /* _IKsPropertySet_ */
/*****************************************************************************
* IDirectSoundFullDuplex interface
*/
{
/*** IUnknown methods ***/
/*** IDirectSoundFullDuplex methods ***/
STDMETHOD(Initialize)(THIS_ LPCGUID pCaptureGuid,LPCGUID pRendererGuid,LPCDSCBUFFERDESC lpDscBufferDesc,LPCDSBUFFERDESC lpDsBufferDesc,HWND hWnd,DWORD dwLevel,LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8,LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IDirectSoundFullDuplex methods ***/
#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h)
#else
/*** IUnknown methods ***/
/*** IDirectSoundFullDuplex methods ***/
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* __DSOUND_INCLUDED__ */