📄 dsdriverbuffer.h
字号:
//////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
Copyright (c) 1999 Microsoft Corporation
Module Name:
DsPlaybackDriverBuffer.h
Abstract:
Declaration file for the
DsDriverBuffer
class.
Revision History:
mmaguire 08/19/99
*****************************************************************************/
//////////////////////////////////////////////////////////////////////////////
#ifndef __DS_DRIVER_BUFFER_H__
#define __DS_DRIVER_BUFFER_H__
//////////////////////////////////////////////////////////////////////////////
// BEGIN INCLUDES
//
// standard includes:
//
//
// where we can find declarations needed in this file:
//
#include <DSound.h>
#include <DsDriver.h>
#include "MemoryBuffer.h"
#include "hardwarebuffer.h"
#include "CX5530Audio.h" // Added by ClassView
#include "dsplaybackdriver.h" // Added by ClassView
//
// END INCLUDES
//////////////////////////////////////////////////////////////////////////////
// Forward declaration so the include order works.
class DsPlaybackDriver;
//////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
This class corresponds to your basic hardware sound buffer. You will have
one instance of this class available for each hardware buffer your device
supports. Your device may support only one instance of this object.
Currently, this object implements the IDsDriverBuffer and IDsDriverNotify
interfaces. In the future, you may wish to augment it to also support support
the IDsDriverPropertySet interface to enable 3D and other features.
*****************************************************************************/
//////////////////////////////////////////////////////////////////////////////
class DsPlaybackDriverBuffer : public CHardwareBuffer, public IDsDriverBuffer
{
public:
//////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
IUnknown implementation
*****************************************************************************/
//////////////////////////////////////////////////////////////////////////////
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *);
STDMETHOD_(ULONG,AddRef) (THIS);
STDMETHOD_(ULONG,Release) (THIS);
//////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
IDsDriverBuffer methods
*****************************************************************************/
//////////////////////////////////////////////////////////////////////////////
STDMETHOD(Lock) (THIS_ LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD, DWORD, DWORD );
STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD );
STDMETHOD(SetFormat) (THIS_ LPWAVEFORMATEX );
STDMETHOD(SetFrequency) (THIS_ DWORD );
STDMETHOD(SetVolumePan) (THIS_ PDSVOLUMEPAN );
STDMETHOD(SetPosition) (THIS_ DWORD );
STDMETHOD(GetPosition) (THIS_ LPDWORD, LPDWORD );
STDMETHOD(Play) (THIS_ DWORD, DWORD, DWORD );
STDMETHOD(Stop) (THIS );
STDMETHOD(GetStatus) (THIS_ LPDWORD);
//////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
methods public but not exposed through any interfaces
*****************************************************************************/
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
/*****************************************************************************
Constructor, destructor
*****************************************************************************/
//////////////////////////////////////////////////////////////////////////////
DsPlaybackDriverBuffer( HRESULT &hr, USHORT index, volatile BusMasterRegisters* pRegs);
~DsPlaybackDriverBuffer();
// Put any public data you need for a buffer here where the DsDriver class can
// see it.
virtual void ProcessInterrupt();
void StartDMAChannel(void){CHardwareBuffer::StartDMAChannel(false);};
protected:
//CMemoryBuffer m_buffer;
ULONG m_ulRefCount;
// Put any private data you need for a buffer here.
DWORD m_dsbPlayFlags;
DWORD m_dwCurrentFrequency;
};
#endif // __DS_DRIVER_BUFFER_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -