| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- /*************************************************************************
- 【文件名】 DspChannel.h
- 【功能模块和目的】 DSP语音通道类头文件
- 【开发者及日期】 郑石诺 2015/03/19
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- #pragma once
- #include "ChannelResource.h"
- class CMixer;
- class CDevDsp;
- /*************************************************************************
- 【类名】 CDspChannel
- 【功能】
- 【接口说明】 DSP语音通道类
- 【开发者及日期】 郑石诺 2015/03/19
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- class CDspChannel : public CChannelResource
- {
- public:
- CDspChannel(DEV_RES_CH_TYPE ChannelNo, DEV_RES_NO_TYPE NodeNo, DEV_RES_NO_TYPE BoardNo);
- virtual ~CDspChannel(void);
- // 操作接口
- void reset(void);
- void attach(CMixer* pMixer) { m_pMixer = pMixer; }
- bool playSound(PlayVoiceContent* pContent);
- bool playTone(int ToneTp);
- bool startRecord(RecordContent* pContent);
- bool stopRecord(void);
- bool setVoiceMode(int Mode);
- void joinMeeting(void) { ASSERT(m_Job == DEV_VOC_JOB_NONE); m_Job = DEV_VOC_JOB_MEETING; }
- void quitMeeting(void) { m_Job = DEV_VOC_JOB_NONE; }
- ////////////////////////////////////////////////////////////////////////////////
- //继承自CChannelResource
- bool open(void);
- void close(void);
- bool isFree(void) const { return m_pMixer == NULL && !isBusy(); }
- bool isBusy(void) const { return m_IsRecording || (m_Job != DEV_VOC_JOB_NONE); }
- int type(void) const { return SC_VOX; }
- LPCTSTR getStateStr(void) const;
- void onDevEvent(METAEVENT* pMetaEvent);
- private:
- bool __constructPlayStruct(PlayVoiceContent* pContent);
- void __construcRecStruct(RecordContent* pContent);
- void __constructDtmfStruct(void);
- bool __replay(void);
- bool __redoGetDigit(void);
- void __onPlayStart(void);
- void __onPlayEnd(void);
- void __onRecordStart(void);
- void __onRecordEnd(void);
- void __onGotDigit(void);
- void __onError(void);
- private:
- CMixer* m_pMixer;
- TCHAR m_AudioFilePlay[MAX_PATH];
- TCHAR m_AudioFileRec[MAX_PATH];
- DX_IOTT m_IottPlay[2];
- DX_IOTT m_IottRec;
- DV_TPT m_TptPlay[4];
- DV_TPT m_TptRec[2];
- DX_XPB m_XpbPlay;
- DX_XPB m_XpbRec;
- DV_DIGIT m_DigitBuf;
- DEV_VOICE_JOB_TYPE m_Job;
- bool m_IsRecording;
- };
|