Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2007, 04:43 AM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Andisheh
Default Urgent,Plz help...Problem with playing wav msg

Hi,

This is my code:


Code:
private TAPI3Lib.TAPIClass m_tapi=null; 

private TAPI3Lib.ITAddress m_address=null; 

private TAPI3Lib.ITBasicCallControl m_call=null; 

ITMediaPlayback pMediaPlayback; 
//....

private bool SelectTerminal() 
{


try 
{


ITTerminal pFileTerm=null; 

ITTerminalSupport pTermSup=null; 
pTermSup=(ITTerminalSupport)m_address; 
pFileTerm=pTermSup.CreateTerminal(

TapiConstants.CLSID_String_FilePlaybackTerminal, TapiConstants.TAPIMEDIATYPE_AUDIO,TERMINAL_DIRECTION.TD_CAPTURE); 

if(pFileTerm==null) 

MessageBox.Show("terminal is null"); 
pMediaPlayback=null; 
pMediaPlayback=(ITMediaPlayback)pFileTerm; 

object[] s=null; 

if(m_strFileName.Length<1) 
s=new string[]{"c:\\2.wav"}; 

else 
s=new string[]{m_strFileName}; 
pMediaPlayback.PlayList=s; 


ITCallInfo ci=(ITCallInfo)m_call; 

ITBasicCallControl2 cc2=(ITBasicCallControl2)ci; 
cc2.SelectTerminalOnCall(pFileTerm);

m_control=(ITMediaControl)pFileTerm; 
}


catch(Exception ex) 
{
MessageBox.Show(ex.Message); 
}


return true; 
}

//....

private void OnConnect() 
{ 

m_control.Start(); 

}


Why I don't hear anything when I pick up the phone?

I'm a beginner, can anyone help me on this please? Thx in advance ;)







Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent plz, SachinMalge ASP.NET 2.0 Basics 2 January 16th, 2007 08:37 AM
Urgent PLZ,Crystal Report With VB6 problem bkhashfeh VB Components 5 December 31st, 2006 03:28 AM
one from tag problem, plz help, urgent! many thxxx raybristol ASP.NET 1.0 and 1.1 Basics 0 December 29th, 2005 08:24 PM
urgent ....plz............[:)] noor ASP.NET 1.0 and 1.1 Basics 4 January 20th, 2005 01:24 PM
Playing a WAV without interupting sub shadowpug VB.NET 2002/2003 Basics 5 July 5th, 2003 10:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.