VolumeOutMaster.h
资源名称:网络视频电话系统.rar [点击查看]
上传用户:oldpeter23
上传日期:2013-01-09
资源大小:1111k
文件大小:2k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- //NetTalk
- /*------------------------------------------------------------------------------*
- =============================
- 模块名称: Volumeoutmaster.h
- =============================
- [版权]
- Alex Chmut
- *------------------------------------------------------------------------------*/
- #ifndef _VOLUMEOUTMASTER_H_
- #define _VOLUMEOUTMASTER_H_
- #include "IVolume.h"
- ///////////////////////////////////////////////////////////////////////////////////////////////
- class CVolumeOutMaster
- : public IVolume
- {
- ////////////////////////
- // IVolume interface
- public:
- virtual bool IsAvailable();
- virtual void Enable();
- virtual void Disable();
- virtual DWORD GetVolumeMetric();
- virtual DWORD GetMinimalVolume();
- virtual DWORD GetMaximalVolume();
- virtual DWORD GetCurrentVolume();
- virtual void SetCurrentVolume( DWORD dwValue );
- virtual void RegisterNotificationSink( PONMICVOULUMECHANGE, DWORD );
- public:
- CVolumeOutMaster();
- ~CVolumeOutMaster();
- private:
- bool Init();
- void Done();
- bool Initialize();
- void EnableLine( bool bEnable = true );
- private:
- // Status Info
- bool m_bOK;
- bool m_bInitialized;
- bool m_bAvailable;
- // Mixer Info
- UINT m_uMixerID;
- DWORD m_dwMixerHandle;
- DWORD m_dwLineID;
- DWORD m_dwVolumeControlID;
- int m_nChannelCount;
- HWND m_hWnd;
- static LRESULT CALLBACK MixerWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
- void OnControlChanged( DWORD dwControlID );
- DWORD m_dwMinimalVolume;
- DWORD m_dwMaximalVolume;
- DWORD m_dwVolumeStep;
- // User Info
- PONMICVOULUMECHANGE m_pfUserSink;
- DWORD m_dwUserValue;
- };
- typedef CVolumeOutMaster* PCVolumeOutMaster;
- ///////////////////////////////////////////////////////////////////////////////////////////////
- #endif