当前位置: 首页>>代码示例>>C#>>正文


C# Call.set_CaptureMicDevice方法代码示例

本文整理汇总了C#中Call.set_CaptureMicDevice方法的典型用法代码示例。如果您正苦于以下问题:C# Call.set_CaptureMicDevice方法的具体用法?C# Call.set_CaptureMicDevice怎么用?C# Call.set_CaptureMicDevice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Call的用法示例。


在下文中一共展示了Call.set_CaptureMicDevice方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChangeCallStatus

        /// <summary>
        /// Change status call (voice)
        /// </summary>
        /// <remarks>
        /// Voice message
        /// </remarks>
        /// <param name="call">talk to person</param>
        /// <param name="status">status of talk</param>
        private void ChangeCallStatus(Call call, TCallStatus status)
        {
            try
            {
                //call is now calling
                if (status == TCallStatus.clsRinging)
                {
                    //this person calling -> call.PartnerDisplayName;
                }

                //press disallow
                else if (status == TCallStatus.clsRefused)
                {

                }

                //press stop
                else if (status == TCallStatus.clsCancelled)
                {

                }

                //talk is now progress
                else if (status == TCallStatus.clsInProgress)
                {
                    //record voice
                    string uniqueLabel = string.Empty;
                    uniqueLabel = DateTime.Now.ToString();
                    uniqueLabel = uniqueLabel.Replace(":", "");
                    uniqueLabel = uniqueLabel.Replace(" ", "");
                    uniqueLabel = uniqueLabel.Replace("-", "");

                    call.set_CaptureMicDevice(TCallIoDeviceType.callIoDeviceTypeFile, tempVoiceDirectory + "\\" + uniqueLabel + "speaker.wav");
                    call.set_CaptureMicDevice(TCallIoDeviceType.callIoDeviceTypeFile, tempVoiceDirectory + "\\" + uniqueLabel + "microfon.wav");
                }

                //call is finish (now can wav convert to mp3)
                else if (status == TCallStatus.clsFinished)
                {

                }
            }
            catch (Exception ex)
            {
                ErrorCode = ex.Message;
            }
        }
开发者ID:samhuang,项目名称:skyperecorder,代码行数:55,代码来源:Manager.cs

示例2: ChangeCallStatus

        private void ChangeCallStatus(Call call, TCallStatus status)
        {
            try
            {
                //call is now calling
                string storefilelocation = "";
                Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
                if (config.AppSettings.Settings["localVoiceRecordsPath"].Value != null && config.AppSettings.Settings["localVoiceRecordsPath"].Value!="")
                {
                    if (!Directory.Exists(config.AppSettings.Settings["localVoiceRecordsPath"].Value.Replace(",", "")))
                    {
                        Directory.CreateDirectory(config.AppSettings.Settings["localVoiceRecordsPath"].Value.Replace(",", ""));
                    }
                    storefilelocation = config.AppSettings.Settings["localVoiceRecordsPath"].Value.Replace(",", "") + "\\";
                }
                else
                {
                    MessageBox.Show("Local sound file location does not exist");
                    return;
                }

                lblCallStatus.Visible = true;
                if (status == TCallStatus.clsRinging)
                {
                    //this person calling -> call.PartnerDisplayName;
                    lblCallStatus.Text = "now calling";
                }

                //press disallow
                else if (status == TCallStatus.clsRefused)
                {
                    lblCallStatus.Text = "Refuse";
                }

                //press stop
                else if (status == TCallStatus.clsCancelled)
                {
                    lblCallStatus.Text = "Cancell";
                }

                //talk is now progress
                else if (status == TCallStatus.clsInProgress)
                {
                    picSound.Visible = true;
                    lblCallStatus.Text = "Call progress";
                    //record voice
                    //call.set_OutputDevice(TCallIoDeviceType.callIoDeviceTypeFile, storefilelocation + "in.wav");
                    //call.set_CaptureMicDevice(TCallIoDeviceType.callIoDeviceTypeFile, storefilelocation + "capture.wav");

                    call.set_OutputDevice(TCallIoDeviceType.callIoDeviceTypeFile, storefilelocation + "in.wav");
                    call.set_CaptureMicDevice(TCallIoDeviceType.callIoDeviceTypeFile, storefilelocation + "capture.wav");

                }

                //call is finish (now can wav convert to mp3)
                else if (status == TCallStatus.clsFinished)
                {
                    lblCallStatus.Visible = picSound.Visible = false;
                    lblCallStatus.Text = "Call end";
                    MergeFiles();
                    if (skype != null)
                    {
                        Marshal.ReleaseComObject(skype);
                    }
                    skype = null;
                    btnCall.Enabled = true;

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            finally
            {
            }
        }
开发者ID:tridipkolkata,项目名称:SampleRepo,代码行数:77,代码来源:frmCallAssistant.cs

示例3: OnSkypeCallStatus

        void OnSkypeCallStatus(Call call, TCallStatus status)
        {
            log.Info("SkypeCallStatus: {0}", status);
            if (status == TCallStatus.clsInProgress)
            {
                this.call = call;
                call.set_CaptureMicDevice(TCallIoDeviceType.callIoDeviceTypePort, MicPort.ToString());
                call.set_InputDevice(TCallIoDeviceType.callIoDeviceTypeSoundcard, "");

                call.set_OutputDevice(TCallIoDeviceType.callIoDeviceTypeFile, SkypeFx.Properties.Settings.Default["LogPath"]+"\\" + Util.MakeValidFileName(call.PartnerDisplayName + "_" + System.DateTime.Now.ToString("yyMMdd-HHmmss.wav")));
                call.set_InputDevice(TCallIoDeviceType.callIoDeviceTypePort, OutPort.ToString());
            }
            else if (status == TCallStatus.clsFinished)
            {
                call = null;
                lock (outStreamLock)
                {
                    outStream.Dispose();
                }
                micStream.Dispose();
            }
        }
开发者ID:Jiyuu,项目名称:SkypeFX,代码行数:22,代码来源:SkypeConnector.cs


注:本文中的Call.set_CaptureMicDevice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。