📄 telmatedemodlg.h
字号:
// TelMateDemoDlg.h : header file
//
#if !defined(AFX_TELMATEDEMODLG_H__B6E25E21_CF8D_42FA_A8BC_696D25987DF5__INCLUDED_)
#define AFX_TELMATEDEMODLG_H__B6E25E21_CF8D_42FA_A8BC_696D25987DF5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CTelMateDemoDlg dialog
#include "SoundOut.h"
#include "RingBuffer.h"
class CTelMateDemoDlg : public CDialog
{
// Construction
public:
CTelMateDemoDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CTelMateDemoDlg)
enum { IDD = IDD_TELMATEDEMO_DIALOG };
CButton m_StopPlayNumber;
CButton m_PlayNumber;
CButton m_StopPlayMulti;
CButton m_PlayMulti;
CButton m_DisableRemote;
CButton m_EnableRemote;
CButton m_Echo;
CButton m_StopEcho;
CButton m_MicSpk;
CButton m_StartRing;
CButton m_EnableMic;
CButton m_RadioDOID;
CButton m_StopPlayBuf;
CButton m_StartPlayBuf;
CButton m_StopPlayFile;
CButton m_StartPlayFile;
CButton m_Reversed;
CButton m_OpenDoPlay;
CButton m_DisableTel;
CButton m_OffHookCheck;
CEdit m_status;
CButton m_StopRecBuf;
CButton m_RecBuf;
CButton m_StopRecFile;
CButton m_RecFile;
CButton m_RecType;
CString m_DialCode;
CString m_DialSpeed;
CString m_Volume;
CString m_Freq;
CString m_FlashTimes;
CString m_CallID;
CString m_Volume2;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTelMateDemoDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTelMateDemoDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnOpendev();
afx_msg void OnClosedev();
afx_msg void OnButton15();
virtual void OnOK();
afx_msg void OnDial();
afx_msg void OnStopdial();
afx_msg void OnSetvolume();
afx_msg void OnPlayfile();
afx_msg void OnPlaybuf();
afx_msg void OnStopplaybuf();
afx_msg void OnStopplayfile();
afx_msg void OnRecfile();
afx_msg void OnStoprecfile();
afx_msg void OnRecbuf();
afx_msg void OnStoprecbuf();
afx_msg void OnDestroy();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnMenuInit();
afx_msg void OnMenuUninit();
afx_msg void OnMenuExit();
afx_msg void OnMenuGetserial();
afx_msg void OnEcho();
afx_msg void OnStopecho();
afx_msg void OnOffhookcheck();
afx_msg void OnDisabletelcheck();
afx_msg void OnOpendoplay();
afx_msg void OnReversed();
afx_msg void OnRadiodoid();
afx_msg void OnRadiomicrec();
afx_msg void OnRadiomicspk();
afx_msg void OnEnablemic();
afx_msg void OnStartring();
afx_msg void OnFlash();
afx_msg void OnMenuStartwatch();
afx_msg void OnMenuStopwatch();
afx_msg void OnStartflash();
afx_msg void OnSendcallid();
afx_msg void OnPauseplay();
afx_msg void OnResume();
afx_msg void OnStopring();
afx_msg void OnMicspk();
afx_msg void OnMenuGetdevicefunc();
afx_msg void OnClose();
afx_msg void OnPlayfilevol();
afx_msg void OnStopplayfilevol();
afx_msg void OnSetvolume2();
afx_msg void OnMenuRewriteheader();
afx_msg void OnEnableremote();
afx_msg void OnDisableremote();
afx_msg void OnMenuConvert();
afx_msg void OnStartspeech();
afx_msg void OnPlaynumber();
afx_msg void OnPlaymulti();
afx_msg void OnStopplaymulti();
afx_msg void OnStopplaynumber();
afx_msg void OnShowurl();
afx_msg void OnMenuAudiovolume();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
afx_msg void OnMicStatus(WPARAM wParam, LPARAM lParam);
afx_msg void OnDialTone(WPARAM wParam, LPARAM lParam);
afx_msg void OnFlashEnd(WPARAM wParam, LPARAM lParam);
afx_msg void OnTelDial(WPARAM wParam,LPARAM lParam);
afx_msg void OnBusy(WPARAM wParam,LPARAM lParam);
afx_msg void OnTelCallOut(WPARAM wParam,LPARAM lParam);
afx_msg void OnRingBack(WPARAM wParam, LPARAM lParam);
afx_msg void OnNoPSTNLine(WPARAM wParam, LPARAM lParam);
afx_msg void OnTelHangUp(WPARAM wParam,LPARAM lParam);
afx_msg void OnTelOffHook(WPARAM wParam,LPARAM lParam);
afx_msg void OnDialEnd(WPARAM wParam,LPARAM lParam);
afx_msg void OnStopCallIn(WPARAM wParam,LPARAM lParam);
afx_msg void OnFskCallIn(WPARAM wParam,LPARAM lParam);
afx_msg void OnPlayFileEnd(WPARAM wParam,LPARAM lParam);
afx_msg void OnDTMFCallIn(WPARAM wParam,LPARAM lParam);
CString SelectSaveFilePath();
void StopFile();
void FreeBuf();
static long CALLBACK PlayMixEnd(pTmPlayState pPlayState);
void AddStatus(CString strStatus);
void SetCtrlState();
BOOL m_bInit;
// static void RecordAudioCardData(RECORDHDR *pRHDR);
afx_msg void OnUsbPlug(WPARAM wParam,LPARAM lParam);
afx_msg void OnRecordBuf(WPARAM wParam,LPARAM lParam);
afx_msg void OnCallIn(WPARAM wParam,LPARAM lParam);
afx_msg void OnGetDTMF(WPARAM wParam,LPARAM lParam);
afx_msg void OnOffHooks(WPARAM wParam,LPARAM lParam);
afx_msg void OnHangups(WPARAM wParam,LPARAM lParam);
unsigned long m_PlaySize;
FILE * m_PlayFile;
FILE * m_RecBufFile;
char m_PlayFileBuf[TOTALBUFSIZE];//最多一次播放的内存数据
UINT m_EventTimer;
// DEVICE_CONTEXT *m_Device;
long m_lPlayFileID;//播放文件句柄
long m_lPlayFileVolID;//按音量播放文件句柄
long m_lMixID;//播放缓冲ID
long m_lRecID;//录音ID
RingBuffer m_RingBuffer;
CSoundOut m_SoundOut;
static void GetDataToSoundOut(CBuffer* buffer, void* Owner);
void ReadSoundDataFromFile(CBuffer* buffer);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TELMATEDEMODLG_H__B6E25E21_CF8D_42FA_A8BC_696D25987DF5__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -