本文整理汇总了C#中Call.set_OutputDevice方法的典型用法代码示例。如果您正苦于以下问题:C# Call.set_OutputDevice方法的具体用法?C# Call.set_OutputDevice怎么用?C# Call.set_OutputDevice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Call
的用法示例。
在下文中一共展示了Call.set_OutputDevice方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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
{
}
}
示例2: CallStatus
private void CallStatus(Call call, TCallStatus status)
{
System.Console.WriteLine("Call Status:" + converter.CallStatusToText(status));
System.Console.WriteLine("Call: " + converter.CallTypeToText(call.Type));
if (status == TCallStatus.clsRinging && (call.Type == TCallType.cltIncomingPSTN || call.Type == TCallType.cltIncomingP2P))
{
System.Console.WriteLine("Incomming Call");
}
if ((status == TCallStatus.clsBusy || status == TCallStatus.clsCancelled || status == TCallStatus.clsFailed || status == TCallStatus.clsFinished))
{
System.Console.WriteLine("Ending Call");
try
{
Command hook = new Command();
hook.Command = "hook on";
oSkype.SendCommand(hook);
hook.Command = "hook off";
oSkype.SendCommand(hook);
radioButton2.Checked = false;
}
catch
{ }
Console.WriteLine("Active Calls: " + oSkype.ActiveCalls.Count.ToString());
if (oSkype.ActiveCalls.Count == 0)
{
Console.WriteLine("Sending Email...");
sendmail();
Progress = false;
Console.WriteLine("Email Sent");
CheckMail.Enabled = true;
}
}
if ((status == TCallStatus.clsInProgress))
{
if (Progress == false)
{
Progress = true;
inProgress();
}
System.Console.WriteLine("In Progress - muting");
((ISkype)oSkype).Mute = true;
Console.WriteLine("Recording");
radioButton2.Checked = true;
call.set_OutputDevice(TCallIoDeviceType.callIoDeviceTypeFile, "C:/Users/Robert/skype/" + call.Id.ToString() + ".wav");
recordings.Add("C:/Users/Robert/skype/" + call.Id.ToString() + ".wav");
}
}
示例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();
}
}