lawavecapture.h
来自「Lakey这是一个免费的CW练习/收/发软件」· C头文件 代码 · 共 59 行
H
59 行
#pragma once
#include "EventManagerWin32.h"
#include "FFT.h"
#include "dsound.h"
class ICwEventListener
{
public:
virtual void OnCwEvent(BOOL bCwDown) = 0;
};
class CLaWaveCapture
: public IPaintEventControl
{
public:
CLaWaveCapture(IPaintableParent* pParent, const RECT* pRect, int nSamplePerSec, int nAnalyzeSample, ICwEventListener* pCwEventListener = NULL);
~CLaWaveCapture(void);
virtual BOOL IsRelated(int x, int y);
virtual void GetRect(RECT* r);
virtual void OnPaint(void* owner, CGraphics* g, const RECT* pRect);
virtual BOOL Initialize();
virtual BOOL Refresh();
virtual void SetThresholdLevel(double rThresholdLevel);
virtual void SetFreqRange(int nLowFreq, int nHighFreq);
private:
void DrawRuler();
IPaintableParent* m_pParent;
CFont* m_pFont;
RECT m_oRect; // by parent
RECT m_oPaintRect; // by self
RECT m_oRulerRect; // by self
CGraphics* m_pPaintBoard;
IDirectSoundCapture* m_pDsCap;
IDirectSoundCaptureBuffer* m_pDsCapBuff;
WAVEFORMATEX m_oFormat;
DSCBUFFERDESC m_oCaptureBufferDesc;
short int* m_pWavBuff; //[512];
short int* m_pDctBuff; //[256];
short int* m_pFreqRuler; //[256];
TCosFFT<short int>* m_pFft;
ICwEventListener* m_pCwEventListener;
DWORD m_nAnalyzeSamples;
int m_nRecvThreshold;
int m_nRecvFreqStart;
int m_nRecvFreqEnd;
BOOL m_bState;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?