Yes, if the file is a .wav file then the lengh can be calculated based on
information in the header.
What programming language are you using?
Regards,
Daníel
Date: Tue, 3 Jul 2007 13:45:20 -0300From: [EMAIL PROTECTED]: [EMAIL PROTECTED]:
Re: [sipxtapi-dev] Using sipxCallAudioPlayFileStartCC: [EMAIL PROTECTED] is a
bad news to me :{Do you know if there is a way to get the size of a file? (It
can be in bytes or kbytes) I´ll try to calculate the sleep time according to
the size of the file. I´ll have to do this, because the audio files that I use
have different lengths, and then I can´t establish a default sleep time Regards
2007/7/3, Daniel Sigurgeirsson <[EMAIL PROTECTED]>:
Hi, sipxCallAudioPlayFileStart is asyncronous so it will return immediately,
and will not wait until the file has been played fully. Sipxtapi is supposed to
fire events when playback has finised (or is terminated), but this doesn't work
properly in the current version, I believe there is some rewrite going on
regarding events and how notifications are passed from various libraries back
to the main sipxtapi part, perhaps someone can shed a light on the status of
that? Another thing, apparently you must also call the corresponding
sipxCallAudioStop function inbetween, otherwise sipxtapi doesn't correctly
decrement the count of files being played, and hence the call will never be
torn down properly. I also believe this will change, once the modifications
from Jaroslav will be incorporated into the main trunk (what is the status of
that BTW?) Anyway, the solution I'm using is the same as yours, i.e. read the
length of the file in seconds, and then sleep the current thread for that
amount. Regards,Daníel
Date: Tue, 3 Jul 2007 10:44:05 -0300From: [EMAIL PROTECTED]: [EMAIL PROTECTED]:
[sipxtapi-dev] Using sipxCallAudioPlayFileStart
HelloWhen 1 make 2 calls of the function sipxCallAudioPlayFileStart I just can
hear the second played file. The first call doesn´t play the audio. Do you know
how can I avoid this?I tried to use SLEEP, with the same length of the first
audio, and, although it works, this solution doesn´t help so much for my
purpose. Regards-- Mário Henrique Gontijo Freitas [EMAIL PROTECTED]
Live Earth is coming. Learn more about the hottest summer event - only on MSN.
Check it out!-- Mário Henrique Gontijo [EMAIL PROTECTED]
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/