Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            // Instantiate the client control
            voipclient = new ConaitoLib.EvoVoIPClass();
            if ( voipclient.InitVoIP( true ) )
            {
                textBoxLog.Text += "Initialized VoIP Evo voice client\n";
            }
            else
            {
                textBoxLog.Text += "Failed to initialize VoIP Evo voice client\n";
            }

            //connected successfully to server. Result of voipclient.Connect(..)
            voipclient.OnConnectSuccess += new ConaitoLib.IEvoVoIPEvents_OnConnectSuccessEventHandler( this.voipclient_OnConnectSuccess );
            //failed to connect to server. Result of voipclient.Connect(..)
            voipclient.OnConnectFailed += new ConaitoLib.IEvoVoIPEvents_OnConnectFailedEventHandler( this.voipclient_OnConnectFailed );
            //server dropped connection
            voipclient.OnConnectionLost += new ConaitoLib.IEvoVoIPEvents_OnConnectionLostEventHandler( this.voipclient_OnConnectionLost );
            //server accepted login. Result of voipclient.DoLogin(..)
            voipclient.OnAccepted += new ConaitoLib.IEvoVoIPEvents_OnAcceptedEventHandler( this.voipclient_OnAccepted );
            //logged out of server. Result of voipclient.DoLogout()
            //            voipclient.OnLoggedOut += new ConaitoLib.IEvoVoIPEvents_OnLoggedOutEventHandler( this.voipclient_OnLoggedOut );
            //a new user entered your channel
            voipclient.OnAddUser += new ConaitoLib.IEvoVoIPEvents_OnAddUserEventHandler( this.voipclient_OnAddUser );
            //a user in your channel updated his information, e.g. nickname, status, etc.
            voipclient.OnUpdateUser += new ConaitoLib.IEvoVoIPEvents_OnUpdateUserEventHandler( this.voipclient_OnUpdateUser );
            //a user left your channel
            voipclient.OnRemoveUser += new ConaitoLib.IEvoVoIPEvents_OnRemoveUserEventHandler( this.voipclient_OnRemoveUser );
            //a user in your channel is talking
            voipclient.OnUserTalking += new ConaitoLib.IEvoVoIPEvents_OnUserTalkingEventHandler( this.voipclient_OnUserTalking );
            //a user in your channel stopped talking
            voipclient.OnUserStoppedTalking += new ConaitoLib.IEvoVoIPEvents_OnUserStoppedTalkingEventHandler( this.voipclient_OnUserStoppedTalking );
            //a new channel was created on the server
            voipclient.OnAddChannel += new ConaitoLib.IEvoVoIPEvents_OnAddChannelEventHandler( this.voipclient_OnAddChannel );
            //a channel updated its information, e.g. its number of users
            voipclient.OnUpdateChannel += new ConaitoLib.IEvoVoIPEvents_OnUpdateChannelEventHandler( this.voipclient_OnUpdateChannel );
            //a channel was deleted from the server
            voipclient.OnRemoveChannel += new ConaitoLib.IEvoVoIPEvents_OnRemoveChannelEventHandler( this.voipclient_OnRemoveChannel );
            //you have joined a new channel. Result of voipclient.DoJoinChannel
            voipclient.OnJoinedChannel += new ConaitoLib.IEvoVoIPEvents_OnJoinedChannelEventHandler( this.voipclient_OnJoinedChannel );
            //you have left the channel. Result of voipclient.DoLeaveChannel
            voipclient.OnLeftChannel += new ConaitoLib.IEvoVoIPEvents_OnLeftChannelEventHandler( this.voipclient_OnLeftChannel );
            //a hotkey has become active
            voipclient.OnHotKeyToggle += new ConaitoLib.IEvoVoIPEvents_OnHotKeyToggleEventHandler( this.voipclient_OnHotKeyToggle );
            //notification containing the raw audio (PCM data) which was played when a user was talking.
            voipclient.OnUserAudioData += new ConaitoLib.IEvoVoIPEvents_OnUserAudioDataEventHandler( this.voipclient_OnUserAudioData );

            this.timer1 = new System.Windows.Forms.Timer( this.components );

            //Current mike input level
            vumeterProgressBar.Maximum = 20;
            vumeterProgressBar.Minimum = 0;

            this.timer1.Tick += new System.EventHandler( this.timer1_Tick );
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            // Instantiate the client control
            voipclient = new ConaitoLib.EvoVoIPClass();
            if (voipclient.InitVoIP(true))
            {
                textBoxLog.Text += "Initialized VoIP Evo voice client\n";
            }
            else
            {
                textBoxLog.Text += "Failed to initialize VoIP Evo voice client\n";
            }

            //connected successfully to server. Result of voipclient.Connect(..)
            voipclient.OnConnectSuccess += new ConaitoLib.IEvoVoIPEvents_OnConnectSuccessEventHandler(this.voipclient_OnConnectSuccess);
            //failed to connect to server. Result of voipclient.Connect(..)
            voipclient.OnConnectFailed += new ConaitoLib.IEvoVoIPEvents_OnConnectFailedEventHandler(this.voipclient_OnConnectFailed);
            //server dropped connection
            voipclient.OnConnectionLost += new ConaitoLib.IEvoVoIPEvents_OnConnectionLostEventHandler(this.voipclient_OnConnectionLost);
            //server accepted login. Result of voipclient.DoLogin(..)
            voipclient.OnAccepted += new ConaitoLib.IEvoVoIPEvents_OnAcceptedEventHandler(this.voipclient_OnAccepted);
            //logged out of server. Result of voipclient.DoLogout()
            //            voipclient.OnLoggedOut += new ConaitoLib.IEvoVoIPEvents_OnLoggedOutEventHandler( this.voipclient_OnLoggedOut );
            //a new user entered your channel
            voipclient.OnAddUser += new ConaitoLib.IEvoVoIPEvents_OnAddUserEventHandler(this.voipclient_OnAddUser);
            //a user in your channel updated his information, e.g. nickname, status, etc.
            voipclient.OnUpdateUser += new ConaitoLib.IEvoVoIPEvents_OnUpdateUserEventHandler(this.voipclient_OnUpdateUser);
            //a user left your channel
            voipclient.OnRemoveUser += new ConaitoLib.IEvoVoIPEvents_OnRemoveUserEventHandler(this.voipclient_OnRemoveUser);
            //a user in your channel is talking
            voipclient.OnUserTalking += new ConaitoLib.IEvoVoIPEvents_OnUserTalkingEventHandler(this.voipclient_OnUserTalking);
            //a user in your channel stopped talking
            voipclient.OnUserStoppedTalking += new ConaitoLib.IEvoVoIPEvents_OnUserStoppedTalkingEventHandler(this.voipclient_OnUserStoppedTalking);
            //a new channel was created on the server
            voipclient.OnAddChannel += new ConaitoLib.IEvoVoIPEvents_OnAddChannelEventHandler(this.voipclient_OnAddChannel);
            //a channel updated its information, e.g. its number of users
            voipclient.OnUpdateChannel += new ConaitoLib.IEvoVoIPEvents_OnUpdateChannelEventHandler(this.voipclient_OnUpdateChannel);
            //a channel was deleted from the server
            voipclient.OnRemoveChannel += new ConaitoLib.IEvoVoIPEvents_OnRemoveChannelEventHandler(this.voipclient_OnRemoveChannel);
            //you have joined a new channel. Result of voipclient.DoJoinChannel
            voipclient.OnJoinedChannel += new ConaitoLib.IEvoVoIPEvents_OnJoinedChannelEventHandler(this.voipclient_OnJoinedChannel);
            //you have left the channel. Result of voipclient.DoLeaveChannel
            voipclient.OnLeftChannel += new ConaitoLib.IEvoVoIPEvents_OnLeftChannelEventHandler(this.voipclient_OnLeftChannel);
            //a hotkey has become active
            voipclient.OnHotKeyToggle += new ConaitoLib.IEvoVoIPEvents_OnHotKeyToggleEventHandler(this.voipclient_OnHotKeyToggle);
            //notification containing the raw audio (PCM data) which was played when a user was talking.
            voipclient.OnUserAudioData += new ConaitoLib.IEvoVoIPEvents_OnUserAudioDataEventHandler(this.voipclient_OnUserAudioData);

            this.timer1 = new System.Windows.Forms.Timer(this.components);

            //Current mike input level
            vumeterProgressBar.Maximum = 20;
            vumeterProgressBar.Minimum = 0;

            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
        }
Exemplo n.º 3
0
        public VoIPClientControl()
        {
            InitializeComponent();

            _aChannels = new Dictionary<string, int>();
            _aChannelAuthorizations = new Dictionary<string, bool>();

            // Instantiate the client control
            m_voipclient = new ConaitoLib.EvoVoIPClass();

            //connected successfully to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectSuccess += new ConaitoLib.IEvoVoIPEvents_OnConnectSuccessEventHandler( this.voipclient_OnConnectSuccess );
            //failed to connect to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectFailed += new ConaitoLib.IEvoVoIPEvents_OnConnectFailedEventHandler( this.voipclient_OnConnectFailed );
            //server dropped connection
            m_voipclient.OnConnectionLost += new ConaitoLib.IEvoVoIPEvents_OnConnectionLostEventHandler( this.voipclient_OnConnectionLost );
            //server accepted login. Result of m_voipclient.DoLogin(..)
            m_voipclient.OnAccepted += new ConaitoLib.IEvoVoIPEvents_OnAcceptedEventHandler( this.voipclient_OnAccepted );
            //logged out of server. Result of m_voipclient.DoLogout()
            //            m_voipclient.OnLoggedOut += new ConaitoLib.IEvoVoIPEvents_OnLoggedOutEventHandler( this.voipclient_OnLoggedOut );
            //a new user entered your channel
            m_voipclient.OnAddUser += new ConaitoLib.IEvoVoIPEvents_OnAddUserEventHandler( this.voipclient_OnAddUser );
            //a user in your channel updated his information, e.g. nickname, status, etc.
            m_voipclient.OnUpdateUser += new ConaitoLib.IEvoVoIPEvents_OnUpdateUserEventHandler( this.voipclient_OnUpdateUser );
            //a user left your channel
            m_voipclient.OnRemoveUser += new ConaitoLib.IEvoVoIPEvents_OnRemoveUserEventHandler( this.voipclient_OnRemoveUser );
            //a user in your channel is talking
            m_voipclient.OnUserTalking += new ConaitoLib.IEvoVoIPEvents_OnUserTalkingEventHandler( this.voipclient_OnUserTalking );
            //a user in your channel stopped talking
            m_voipclient.OnUserStoppedTalking += new ConaitoLib.IEvoVoIPEvents_OnUserStoppedTalkingEventHandler( this.voipclient_OnUserStoppedTalking );
            //a new channel was created on the server
            m_voipclient.OnAddChannel += new ConaitoLib.IEvoVoIPEvents_OnAddChannelEventHandler( this.voipclient_OnAddChannel );
            //a channel updated its information, e.g. its number of users
            m_voipclient.OnUpdateChannel += new ConaitoLib.IEvoVoIPEvents_OnUpdateChannelEventHandler( this.voipclient_OnUpdateChannel );
            //a channel was deleted from the server
            m_voipclient.OnRemoveChannel += new ConaitoLib.IEvoVoIPEvents_OnRemoveChannelEventHandler( this.voipclient_OnRemoveChannel );
            //you have joined a new channel. Result of m_voipclient.DoJoinChannel
            m_voipclient.OnJoinedChannel += new ConaitoLib.IEvoVoIPEvents_OnJoinedChannelEventHandler( this.voipclient_OnJoinedChannel );
            //you have left the channel. Result of m_voipclient.DoLeaveChannel
            m_voipclient.OnLeftChannel += new ConaitoLib.IEvoVoIPEvents_OnLeftChannelEventHandler( this.voipclient_OnLeftChannel );
            //a hotkey has become active
            m_voipclient.OnHotKeyToggle += new ConaitoLib.IEvoVoIPEvents_OnHotKeyToggleEventHandler( this.voipclient_OnHotKeyToggle );
            //notification containing the raw audio (PCM data) which was played when a user was talking.
            m_voipclient.OnUserAudioData += new ConaitoLib.IEvoVoIPEvents_OnUserAudioDataEventHandler( this.voipclient_OnUserAudioData );

            this.m_timer1 = new System.Windows.Forms.Timer( this.components );

            // Current mike input level
            vumeterProgressBar.Maximum = 20;
            vumeterProgressBar.Minimum = 0;

            _aChannelAuthorizations.Add( "", true );
            _aChannelAuthorizations.Add( "DDD", true );

            _voiceChannels = new Dictionary<string, VoiceChannel>();

        }
Exemplo n.º 4
0
        public VoIPClientControl()
        {
            InitializeComponent();

            _aChannels = new Dictionary <string, int>();
            _aChannelAuthorizations = new Dictionary <string, bool>();

            // Instantiate the client control
            m_voipclient = new ConaitoLib.EvoVoIPClass();

            //connected successfully to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectSuccess += new ConaitoLib.IEvoVoIPEvents_OnConnectSuccessEventHandler(this.voipclient_OnConnectSuccess);
            //failed to connect to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectFailed += new ConaitoLib.IEvoVoIPEvents_OnConnectFailedEventHandler(this.voipclient_OnConnectFailed);
            //server dropped connection
            m_voipclient.OnConnectionLost += new ConaitoLib.IEvoVoIPEvents_OnConnectionLostEventHandler(this.voipclient_OnConnectionLost);
            //server accepted login. Result of m_voipclient.DoLogin(..)
            m_voipclient.OnAccepted += new ConaitoLib.IEvoVoIPEvents_OnAcceptedEventHandler(this.voipclient_OnAccepted);
            //logged out of server. Result of m_voipclient.DoLogout()
            //            m_voipclient.OnLoggedOut += new ConaitoLib.IEvoVoIPEvents_OnLoggedOutEventHandler( this.voipclient_OnLoggedOut );
            //a new user entered your channel
            m_voipclient.OnAddUser += new ConaitoLib.IEvoVoIPEvents_OnAddUserEventHandler(this.voipclient_OnAddUser);
            //a user in your channel updated his information, e.g. nickname, status, etc.
            m_voipclient.OnUpdateUser += new ConaitoLib.IEvoVoIPEvents_OnUpdateUserEventHandler(this.voipclient_OnUpdateUser);
            //a user left your channel
            m_voipclient.OnRemoveUser += new ConaitoLib.IEvoVoIPEvents_OnRemoveUserEventHandler(this.voipclient_OnRemoveUser);
            //a user in your channel is talking
            m_voipclient.OnUserTalking += new ConaitoLib.IEvoVoIPEvents_OnUserTalkingEventHandler(this.voipclient_OnUserTalking);
            //a user in your channel stopped talking
            m_voipclient.OnUserStoppedTalking += new ConaitoLib.IEvoVoIPEvents_OnUserStoppedTalkingEventHandler(this.voipclient_OnUserStoppedTalking);
            //a new channel was created on the server
            m_voipclient.OnAddChannel += new ConaitoLib.IEvoVoIPEvents_OnAddChannelEventHandler(this.voipclient_OnAddChannel);
            //a channel updated its information, e.g. its number of users
            m_voipclient.OnUpdateChannel += new ConaitoLib.IEvoVoIPEvents_OnUpdateChannelEventHandler(this.voipclient_OnUpdateChannel);
            //a channel was deleted from the server
            m_voipclient.OnRemoveChannel += new ConaitoLib.IEvoVoIPEvents_OnRemoveChannelEventHandler(this.voipclient_OnRemoveChannel);
            //you have joined a new channel. Result of m_voipclient.DoJoinChannel
            m_voipclient.OnJoinedChannel += new ConaitoLib.IEvoVoIPEvents_OnJoinedChannelEventHandler(this.voipclient_OnJoinedChannel);
            //you have left the channel. Result of m_voipclient.DoLeaveChannel
            m_voipclient.OnLeftChannel += new ConaitoLib.IEvoVoIPEvents_OnLeftChannelEventHandler(this.voipclient_OnLeftChannel);
            //a hotkey has become active
            m_voipclient.OnHotKeyToggle += new ConaitoLib.IEvoVoIPEvents_OnHotKeyToggleEventHandler(this.voipclient_OnHotKeyToggle);
            //notification containing the raw audio (PCM data) which was played when a user was talking.
            m_voipclient.OnUserAudioData += new ConaitoLib.IEvoVoIPEvents_OnUserAudioDataEventHandler(this.voipclient_OnUserAudioData);

            this.m_timer1 = new System.Windows.Forms.Timer(this.components);

            // Current mike input level
            vumeterProgressBar.Maximum = 20;
            vumeterProgressBar.Minimum = 0;

            _aChannelAuthorizations.Add("", true);
            _aChannelAuthorizations.Add("DDD", true);

            _voiceChannels = new Dictionary <string, VoiceChannel>();
        }
Exemplo n.º 5
0
        public VoiceChannel()
        {
            // Instantiate the client control
            m_voipclient = new ConaitoLib.EvoVoIPClass();

            //connected successfully to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectSuccess += new ConaitoLib.IEvoVoIPEvents_OnConnectSuccessEventHandler(this.voipclient_OnConnectSuccess);
            //failed to connect to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectFailed += new ConaitoLib.IEvoVoIPEvents_OnConnectFailedEventHandler(this.voipclient_OnConnectFailed);
            //server dropped connection
            m_voipclient.OnConnectionLost += new ConaitoLib.IEvoVoIPEvents_OnConnectionLostEventHandler(this.voipclient_OnConnectionLost);
            //server accepted login. Result of m_voipclient.DoLogin(..)
            m_voipclient.OnAccepted += new ConaitoLib.IEvoVoIPEvents_OnAcceptedEventHandler(this.voipclient_OnAccepted);
            //logged out of server. Result of m_voipclient.DoLogout()
            //            m_voipclient.OnLoggedOut += new ConaitoLib.IEvoVoIPEvents_OnLoggedOutEventHandler( this.voipclient_OnLoggedOut );
            //a new user entered your channel
            m_voipclient.OnAddUser += new ConaitoLib.IEvoVoIPEvents_OnAddUserEventHandler(this.voipclient_OnAddUser);
            //a user in your channel updated his information, e.g. nickname, status, etc.
            m_voipclient.OnUpdateUser += new ConaitoLib.IEvoVoIPEvents_OnUpdateUserEventHandler(this.voipclient_OnUpdateUser);
            //a user left your channel
            m_voipclient.OnRemoveUser += new ConaitoLib.IEvoVoIPEvents_OnRemoveUserEventHandler(this.voipclient_OnRemoveUser);
            //a user in your channel is talking
            m_voipclient.OnUserTalking += new ConaitoLib.IEvoVoIPEvents_OnUserTalkingEventHandler(this.voipclient_OnUserTalking);
            //a user in your channel stopped talking
            m_voipclient.OnUserStoppedTalking += new ConaitoLib.IEvoVoIPEvents_OnUserStoppedTalkingEventHandler(this.voipclient_OnUserStoppedTalking);
            //a new channel was created on the server
            m_voipclient.OnAddChannel += new ConaitoLib.IEvoVoIPEvents_OnAddChannelEventHandler(this.voipclient_OnAddChannel);
            //a channel updated its information, e.g. its number of users
            m_voipclient.OnUpdateChannel += new ConaitoLib.IEvoVoIPEvents_OnUpdateChannelEventHandler(this.voipclient_OnUpdateChannel);
            //a channel was deleted from the server
            m_voipclient.OnRemoveChannel += new ConaitoLib.IEvoVoIPEvents_OnRemoveChannelEventHandler(this.voipclient_OnRemoveChannel);
            //you have joined a new channel. Result of m_voipclient.DoJoinChannel
            m_voipclient.OnJoinedChannel += new ConaitoLib.IEvoVoIPEvents_OnJoinedChannelEventHandler(this.voipclient_OnJoinedChannel);
            //you have left the channel. Result of m_voipclient.DoLeaveChannel
            m_voipclient.OnLeftChannel += new ConaitoLib.IEvoVoIPEvents_OnLeftChannelEventHandler(this.voipclient_OnLeftChannel);
            //a hotkey has become active
            m_voipclient.OnHotKeyToggle += new ConaitoLib.IEvoVoIPEvents_OnHotKeyToggleEventHandler(this.voipclient_OnHotKeyToggle);
            //notification containing the raw audio (PCM data) which was played when a user was talking.
            m_voipclient.OnUserAudioData += new ConaitoLib.IEvoVoIPEvents_OnUserAudioDataEventHandler(this.voipclient_OnUserAudioData);

            m_joined = false;
        }
Exemplo n.º 6
0
        public VoiceChannel()
        {
            // Instantiate the client control
            m_voipclient = new ConaitoLib.EvoVoIPClass();

            //connected successfully to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectSuccess += new ConaitoLib.IEvoVoIPEvents_OnConnectSuccessEventHandler(this.voipclient_OnConnectSuccess);
            //failed to connect to server. Result of m_voipclient.Connect(..)
            m_voipclient.OnConnectFailed += new ConaitoLib.IEvoVoIPEvents_OnConnectFailedEventHandler(this.voipclient_OnConnectFailed);
            //server dropped connection
            m_voipclient.OnConnectionLost += new ConaitoLib.IEvoVoIPEvents_OnConnectionLostEventHandler(this.voipclient_OnConnectionLost);
            //server accepted login. Result of m_voipclient.DoLogin(..)
            m_voipclient.OnAccepted += new ConaitoLib.IEvoVoIPEvents_OnAcceptedEventHandler(this.voipclient_OnAccepted);
            //logged out of server. Result of m_voipclient.DoLogout()
            //            m_voipclient.OnLoggedOut += new ConaitoLib.IEvoVoIPEvents_OnLoggedOutEventHandler( this.voipclient_OnLoggedOut );
            //a new user entered your channel
            m_voipclient.OnAddUser += new ConaitoLib.IEvoVoIPEvents_OnAddUserEventHandler(this.voipclient_OnAddUser);
            //a user in your channel updated his information, e.g. nickname, status, etc.
            m_voipclient.OnUpdateUser += new ConaitoLib.IEvoVoIPEvents_OnUpdateUserEventHandler(this.voipclient_OnUpdateUser);
            //a user left your channel
            m_voipclient.OnRemoveUser += new ConaitoLib.IEvoVoIPEvents_OnRemoveUserEventHandler(this.voipclient_OnRemoveUser);
            //a user in your channel is talking
            m_voipclient.OnUserTalking += new ConaitoLib.IEvoVoIPEvents_OnUserTalkingEventHandler(this.voipclient_OnUserTalking);
            //a user in your channel stopped talking
            m_voipclient.OnUserStoppedTalking += new ConaitoLib.IEvoVoIPEvents_OnUserStoppedTalkingEventHandler(this.voipclient_OnUserStoppedTalking);
            //a new channel was created on the server
            m_voipclient.OnAddChannel += new ConaitoLib.IEvoVoIPEvents_OnAddChannelEventHandler(this.voipclient_OnAddChannel);
            //a channel updated its information, e.g. its number of users
            m_voipclient.OnUpdateChannel += new ConaitoLib.IEvoVoIPEvents_OnUpdateChannelEventHandler(this.voipclient_OnUpdateChannel);
            //a channel was deleted from the server
            m_voipclient.OnRemoveChannel += new ConaitoLib.IEvoVoIPEvents_OnRemoveChannelEventHandler(this.voipclient_OnRemoveChannel);
            //you have joined a new channel. Result of m_voipclient.DoJoinChannel
            m_voipclient.OnJoinedChannel += new ConaitoLib.IEvoVoIPEvents_OnJoinedChannelEventHandler(this.voipclient_OnJoinedChannel);
            //you have left the channel. Result of m_voipclient.DoLeaveChannel
            m_voipclient.OnLeftChannel += new ConaitoLib.IEvoVoIPEvents_OnLeftChannelEventHandler(this.voipclient_OnLeftChannel);
            //a hotkey has become active
            m_voipclient.OnHotKeyToggle += new ConaitoLib.IEvoVoIPEvents_OnHotKeyToggleEventHandler(this.voipclient_OnHotKeyToggle);
            //notification containing the raw audio (PCM data) which was played when a user was talking.
            m_voipclient.OnUserAudioData += new ConaitoLib.IEvoVoIPEvents_OnUserAudioDataEventHandler(this.voipclient_OnUserAudioData);

            m_joined = false;
        }
Exemplo n.º 7
0
        public VoiceRecorder(int channelNo)
        {
            //simModelName = simModelPath;
            //simModelInfo = smr.readModel(simModelName);
            //isRunning = false;
            //isLoggedIn = false;
            //roomMembership = new Dictionary<string, List<string>>();
            //channelIDMap = new Dictionary<string, int>();
            //userChannelMap = new Dictionary<int, List<int>>();
            //server = new SimulationEventDistributorClient();
            //distributor.RegisterClient(ref server);

            channelID = channelNo;

            fileName.Append("DDDVoiceRecord_" + channelID.ToString());

            voipclient = new ConaitoLib.EvoVoIPClass();

            if (!voipclient.InitVoIP(true))
            {
                ErrorLog.Write("Failed to initialize VoIP Evo voice client");
            }

            //Register the user is talking event.  Use this to log user talking events to the DDD.
            voipclient.OnUserTalking += new ConaitoLib.IEvoVoIPEvents_OnUserTalkingEventHandler(this.voipclient_OnUserTalking);

            //notification containing the raw audio (PCM data) which was played when a user was talking.
            voipclient.OnUserAudioData += new ConaitoLib.IEvoVoIPEvents_OnUserAudioDataEventHandler(this.voipclient_OnUserAudioData);

            if (!System.IO.File.Exists("lame_enc.dll"))
            {
                ErrorLog.Write("Unable to find lame_enc.dll. Please download it at http://lame.sourceforge.net");
                return;
            }

                //set up the file directory and file name to record to.
                //StringBuilder tempdir = new StringBuilder(tempdirTextBox.Text);
                //StringBuilder mp3file = new StringBuilder(mp3fileTextBox.Text);
                if (VL_CreateVoiceLog(fileDirectory, fileName, 5) == 0)
                    ErrorLog.Write("Failed to start voice-log");
        }