dsound_private.h
来自「一个类似windows」· C头文件 代码 · 共 527 行 · 第 1/2 页
H
527 行
struct PrimaryBufferImpl{ const IDirectSoundBuffer8Vtbl *lpVtbl; LONG ref; IDirectSoundImpl* dsound;};HRESULT WINAPI PrimaryBufferImpl_Create( IDirectSoundImpl *ds, PrimaryBufferImpl **pdsb, LPCDSBUFFERDESC dsbd);/***************************************************************************** * IDirectSoundCapture implementation structure */struct IDirectSoundCaptureImpl{ /* IUnknown fields */ const IDirectSoundCaptureVtbl *lpVtbl; LONG ref; DirectSoundCaptureDevice *device;};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; DWORD read_position; PWAVEFORMATEX pwfx; IDirectSoundCaptureBufferImpl* capture_buffer; DWORD state; LPWAVEHDR pwave; int nrofpwaves; int index; CRITICAL_SECTION lock;};HRESULT WINAPI IDirectSoundCaptureImpl_Create( LPDIRECTSOUNDCAPTURE8 * ppds);HRESULT WINAPI DSOUND_CaptureCreate( LPDIRECTSOUNDCAPTURE *ppDSC, IUnknown *pUnkOuter);HRESULT WINAPI DSOUND_CaptureCreate8( LPDIRECTSOUNDCAPTURE8 *ppDSC8, IUnknown *pUnkOuter);/***************************************************************************** * IDirectSoundCaptureBuffer implementation structure */struct IDirectSoundCaptureBufferImpl{ /* IUnknown fields */ const IDirectSoundCaptureBuffer8Vtbl *lpVtbl; LONG ref; /* IDirectSoundCaptureBufferImpl fields */ IDirectSoundCaptureImpl* dsound; /* FIXME: don't need this */ LPDSCBUFFERDESC pdscbd; DWORD flags; /* IDirectSoundCaptureNotifyImpl fields */ IDirectSoundCaptureNotifyImpl* notify; LPDSBPOSITIONNOTIFY notifies; int nrofnotifies; PIDSDRIVERNOTIFY hwnotify;};/***************************************************************************** * IDirectSoundFullDuplex implementation structure */struct IDirectSoundFullDuplexImpl{ /* IUnknown fields */ const IDirectSoundFullDuplexVtbl *lpVtbl; LONG ref; /* IDirectSoundFullDuplexImpl fields */ CRITICAL_SECTION lock;};/***************************************************************************** * IDirectSoundNotify implementation structure */struct IDirectSoundNotifyImpl{ /* IUnknown fields */ const IDirectSoundNotifyVtbl *lpVtbl; LONG ref; IDirectSoundBufferImpl* dsb;};HRESULT WINAPI IDirectSoundNotifyImpl_Create( IDirectSoundBufferImpl *dsb, IDirectSoundNotifyImpl **pdsn);HRESULT WINAPI IDirectSoundNotifyImpl_Destroy( IDirectSoundNotifyImpl *pdsn);/***************************************************************************** * IDirectSoundCaptureNotify implementation structure */struct IDirectSoundCaptureNotifyImpl{ /* IUnknown fields */ const IDirectSoundNotifyVtbl *lpVtbl; LONG ref; IDirectSoundCaptureBufferImpl* dscb;};HRESULT WINAPI IDirectSoundCaptureNotifyImpl_Create( IDirectSoundCaptureBufferImpl *dscb, IDirectSoundCaptureNotifyImpl ** pdscn);/***************************************************************************** * IDirectSound3DListener implementation structure */struct IDirectSound3DListenerImpl{ /* IUnknown fields */ const IDirectSound3DListenerVtbl *lpVtbl; LONG ref; /* IDirectSound3DListenerImpl fields */ IDirectSoundImpl* dsound;};HRESULT WINAPI IDirectSound3DListenerImpl_Create( PrimaryBufferImpl *pb, IDirectSound3DListenerImpl **pdsl);/***************************************************************************** * IKsBufferPropertySet implementation structure */struct IKsBufferPropertySetImpl{ /* IUnknown fields */ const IKsPropertySetVtbl *lpVtbl; LONG ref; /* IKsPropertySetImpl fields */ IDirectSoundBufferImpl* dsb;};HRESULT WINAPI IKsBufferPropertySetImpl_Create( IDirectSoundBufferImpl *dsb, IKsBufferPropertySetImpl **piks);HRESULT WINAPI IKsBufferPropertySetImpl_Destroy( IKsBufferPropertySetImpl *piks);/***************************************************************************** * IKsPrivatePropertySet implementation structure */struct IKsPrivatePropertySetImpl{ /* IUnknown fields */ const IKsPropertySetVtbl *lpVtbl; LONG ref;};HRESULT WINAPI IKsPrivatePropertySetImpl_Create( IKsPrivatePropertySetImpl **piks);/***************************************************************************** * IDirectSound3DBuffer implementation structure */struct IDirectSound3DBufferImpl{ /* IUnknown fields */ const IDirectSound3DBufferVtbl *lpVtbl; LONG ref; /* IDirectSound3DBufferImpl fields */ IDirectSoundBufferImpl* dsb;};HRESULT WINAPI IDirectSound3DBufferImpl_Create( IDirectSoundBufferImpl *dsb, IDirectSound3DBufferImpl **pds3db);HRESULT WINAPI IDirectSound3DBufferImpl_Destroy( IDirectSound3DBufferImpl *pds3db);/******************************************************************************* * DirectSound ClassFactory implementation structure */struct IClassFactoryImpl{ /* IUnknown fields */ const IClassFactoryVtbl *lpVtbl; LONG ref;};extern IClassFactoryImpl DSOUND_CAPTURE_CF;extern IClassFactoryImpl DSOUND_FULLDUPLEX_CF;void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan);void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan);void DSOUND_RecalcFormat(IDirectSoundBufferImpl *dsb);/* dsound.c */HRESULT DSOUND_AddBuffer(IDirectSoundImpl * pDS, IDirectSoundBufferImpl * pDSB);HRESULT DSOUND_RemoveBuffer(IDirectSoundImpl * pDS, IDirectSoundBufferImpl * pDSB);/* primary.c */HRESULT DSOUND_PrimaryCreate(DirectSoundDevice *device);HRESULT DSOUND_PrimaryDestroy(DirectSoundDevice *device);HRESULT DSOUND_PrimaryPlay(DirectSoundDevice *device);HRESULT DSOUND_PrimaryStop(DirectSoundDevice *device);HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LPDWORD writepos);/* buffer.c */DWORD DSOUND_CalcPlayPosition(IDirectSoundBufferImpl *This, DWORD pplay, DWORD pwrite);/* mixer.c */void DSOUND_CheckEvent(IDirectSoundBufferImpl *dsb, int len);void DSOUND_ForceRemix(IDirectSoundBufferImpl *dsb);void DSOUND_MixCancelAt(IDirectSoundBufferImpl *dsb, DWORD buf_writepos);void DSOUND_WaveQueue(DirectSoundDevice *device, DWORD mixq);void DSOUND_PerformMix(DirectSoundDevice *device);void CALLBACK DSOUND_timer(UINT timerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);void CALLBACK DSOUND_callback(HWAVEOUT hwo, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);/* sound3d.c */void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb);#define STATE_STOPPED 0#define STATE_STARTING 1#define STATE_PLAYING 2#define STATE_CAPTURING 2#define STATE_STOPPING 3#define DSOUND_FREQSHIFT (14)extern DirectSoundDevice* DSOUND_renderer[MAXWAVEDRIVERS];extern GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];extern DirectSoundCaptureDevice * DSOUND_capture[MAXWAVEDRIVERS];extern GUID DSOUND_capture_guids[MAXWAVEDRIVERS];extern HRESULT mmErr(UINT err);extern void setup_dsound_options(void);extern const char * get_device_id(LPCGUID pGuid);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?