If I put one wave file to play..then everything works ok..
so how I play a seqence of WAV files ?
Anyone know?
Thanks
Darren
so how I play a seqence of WAV files ?
Anyone know?
Thanks
Darren
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
Sub CallConnected( ByVal c as SipCall )
Greeting( c )
End Sub
Sub Greeting( ByVal c as SipCall )
Dim hours As Integer = CInt( Now.ToString("HH") )
If hours < 9 And hours >= 0 Then
c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_morgon.wav" )
ElseIf hours >= 9 And hours < 12 Then
c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_formiddag.wav" )
ElseIf hours >= 12 And hours < 18 Then
c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_eftermiddag.wav" )
ElseIf hours >= 18 And hours <= 22 Then
c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_kvall.wav" )
Else
c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_kvall.wav" )
End If
End Sub
Sub WavFinishedPlaying( ByVal c as SipCall )
Greating(c)
End Sub
Sub CallConnected( ByVal c as SipCall ) c.SetContext( "WAV_NUMBER", 0 ) Greeting( c ) End Sub Sub Greeting( ByVal c as SipCall ) Dim hours As Integer = CInt( Now.ToString("HH") ) If hours < 9 And hours >= 0 Then c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_morgon.wav" ) ElseIf hours >= 9 And hours < 12 Then c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_formiddag.wav" ) ElseIf hours >= 12 And hours < 18 Then c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_eftermiddag.wav" ) ElseIf hours >= 18 And hours <= 22 Then c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_kvall.wav" ) Else c.StartPlayingWav( "c:\ithemmet\PhoneWaves\god_kvall.wav" ) End If End Sub Sub WavFinishedPlaying( ByVal c as SipCall ) Dim wavNumber as Integer = CInt( c.GetContext( "WAV_NUMBER" ) ) wavNumber = wavNumber +1 c.SetContext( "WAV_NUMBER", wavNumber ) if wavNumber = 1 Then c.StartPlayingWav( "c:\my_wave1.wav" ) end if if wavNumber = 2 Then c.StartPlayingWav( "c:\my_wave2.wav" ) end if if wavNumber = 3 Then c.StartPlayingWav( "c:\my_wave3.wav" ) end if if wavNumber = 4 Then c.Hangup() end if End Sub
Comment