error C4430: 缺少类型说明符 - 假定为 int。 错误如何解决
#if !defined(AFX_DSOUNDIN_H__1F76A838_1BC0_4BD3_8260_62D9F150089B__INCLUDED_)
#define AFX_DSOUNDIN_H__1F76A838_1BC0_4BD3_8260_62D9F150089B__INCLUDED_
#endif
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "windows.h"
#include "mmsystem.h"
#include "mmreg.h"
#include "dsound.h"
//#ifndef _CAPTURE_SOUND_H_
//#define _CAPTURE_SOUND_H_
#define NUM_REC_NOTIFICATIONS 16
#define BUF_SIZE 480;
/*class CAdoFrameHandler {
public:
virtual void AdoFrameData(BYTE* pBuffer, long lBufferSize) = 0 ;
};*/
class CDSoundIn
{
public:
BOOL m_bRecording ; //recording now ? also used by event recv thread
protected:
LPDIRECTSOUNDCAPTURE8 m_pCapDev ; //capture device ptr
LPDIRECTSOUNDCAPTUREBUFFER m_pCapBuf ; //capture loop buffer ptr
LPDIRECTSOUNDNOTIFY8 m_pNotify ; //capture auto-notify event callback handler ptr
GUID m_guidCapDevId ; //capture device id
WAVEFORMATEX m_wfxInput; //input wave format description struct
DSBPOSITIONNOTIFY m_aPosNotify[NUM_REC_NOTIFICATIONS + 1]; //notify flag array
HANDLE m_hNotifyEvent; //notify event
BOOL m_abInputFmtSupported[20];
DWORD m_dwCapBufSize; //capture loop buffer size
DWORD m_dwNextCapOffset;//offset in loop buffer
DWORD m_dwNotifySize; //notify pos when loop buffer need to emit the event
CAdoFrameHandler* m_frame_handler ; // outer frame data dealer ptr
public: // callback func to add enum devices string name
static BOOL CALLBACK enum_dev_proc(LPGUID lpGUID, LPCTSTR lpszDesc,
LPCTSTR lpszDrvName, LPVOID lpContext ) ;
static UINT notify_capture_thd(LPVOID data) ;
protected:
HRESULT InitDirectSound(GUID dev_id = GUID_NULL) ;
HRESULT FreeDirectSound() ;
HRESULT InitNotifications() ;
HRESULT CreateCaptureBuffer(WAVEFORMATEX * wfx) ;
HRESULT StartOrStopRecord(BOOL bStartRec) ;
HRESULT RecordCapturedData() ;
void SetWavFormat(WAVEFORMATEX * wfx) ;
public:
CDSoundIn(void);
~CDSoundIn(void);
BOOL EnumDevices(HWND hList) ;
BOOL Open(void) ;
BOOL Close() ;
void GrabAudioFrames(BOOL bGrabAudioFrames, CAdoFrameHandler* frame_handler) ;
};
1>c:\documents and settings\administrator\桌面\soundprog_5924\soundprog\dsoundin.h(42): error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>c:\documents and settings\administrator\桌面\soundprog_5924\soundprog\dsoundin.h(42): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\documents and settings\administrator\桌面\soundprog_5924\soundprog\dsoundin.h(42): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\documents and settings\administrator\桌面\soundprog_5924\soundprog\dsoundin.h(61): error C2061: 语法错误: 标识符“CAdoFrameHandler”
这是一个头文件,每次编译的时候都提示这里有问题,我是新手,很多不懂,请大家指教,另外是因为我的vc2010没链接direct的库的原因吗?