⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dscapturedriverbuffer.h

📁 WinCE 3.0 BSP, 包含Inter SA1110, Intel_815E, Advantech_PCM9574 等
💻 H
字号:
//////////////////////////////////////////////////////////////////////////////
/*****************************************************************************

	THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
	ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
	THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
	PARTICULAR PURPOSE.
	Copyright (c) 1995-2000 Microsoft Corporation

Module Name:

	DsCaptureDriverBuffer.h

Abstract:

	Declaration file for the DsCaptureDriverBuffer class.
	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 IDsCaptureDriverBuffer 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.


Revision History:

	coscor 7/5/2000 Created

*****************************************************************************/
//////////////////////////////////////////////////////////////////////////////


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "hardwarebuffer.h"



#ifndef DSDRIVERCAPTUREDRIVERBUFFER_H__
#define DSDRIVERCAPTUREDRIVERBUFFER_H__


// Forward declaration so the include order works.
class DsDriverCapture;

class DsCaptureDriverBuffer : public CHardwareBuffer, public IDsCaptureDriverBuffer
{
public:

	//////////////////////////////////////////////////////////////////////////////
	/*****************************************************************************
	IUnknown implementation
	*****************************************************************************/
	//////////////////////////////////////////////////////////////////////////////
    STDMETHOD(QueryInterface)       (THIS_ REFIID, LPVOID FAR *);
    STDMETHOD_(ULONG,AddRef)        (THIS);
    STDMETHOD_(ULONG,Release)       (THIS);
    
	//////////////////////////////////////////////////////////////////////////////
	/*****************************************************************************
	IDsCaptureDriverBuffer methods
	*****************************************************************************/
	//////////////////////////////////////////////////////////////////////////////
    STDMETHOD(Lock)                 (THIS_ LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD, DWORD, DWORD );
    STDMETHOD(Unlock)               (THIS_ LPVOID, DWORD, LPVOID, DWORD );
    STDMETHOD(SetFormat)            (THIS_ LPWAVEFORMATEX );
    STDMETHOD(GetPosition)          (THIS_ LPDWORD, LPDWORD );
	STDMETHOD(Start)                (THIS_ DWORD );
    STDMETHOD(Stop)                 (THIS );
    STDMETHOD(GetStatus)            (THIS_ LPDWORD);

	//////////////////////////////////////////////////////////////////////////////
	/*****************************************************************************
	methods public but not exposed through any interfaces
	*****************************************************************************/
	//////////////////////////////////////////////////////////////////////////////
	virtual void ProcessInterrupt();
	void StartDMAChannel(void){CHardwareBuffer::StartDMAChannel(true);};

//	VOID ProcessCopyEvent();

	//////////////////////////////////////////////////////////////////////////////
	/*****************************************************************************
	Constructor, destructor
	*****************************************************************************/
	//////////////////////////////////////////////////////////////////////////////
	DsCaptureDriverBuffer(HRESULT &hr, int iIndex, volatile struct BusMasterRegisters* pRegs);
	~DsCaptureDriverBuffer();



	// Put any public data you need for a buffer here where the DsDriverCapture class can 
	// see it.

	// Current Next valid Write position, determined after UnLock()
	DWORD	m_dwWritePosition;

	DWORD	m_dwOldWritePosition;

	// The Volume scale, linear to log
	DSVOLUMEPAN	m_VolumePan;

    // Indicates if looping is on.
    bool    m_bIsLooping;

	// Current Notification Positions data
	DWORD	m_dwNextNotification;

	// This variable is used to maintain a reference count for m_pDMABuffer in case 
	// DuplicateSoundBuffer is called. Note that since CX5530 has only two
	// hardware buffers, only one pair of duplicated buffers can exist and so a 
	// single refcount suffices.
	static DWORD dwCloneRefCount;

protected:

	ULONG	m_ulRefCount;

};


static DWORD WINAPI RecorderThread(LPVOID lpParameter);


#endif // DSDRIVERCAPTUREDRIVERBUFFER_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -