[Asterisk-Dev] IAXClient : Frequency of sound input from file

Steve Kann stevek at stevek.com
Thu Oct 6 10:25:48 MST 2005


Ashutosh Agarwal wrote:

>Hi
>I am using the  IAXClient Lib and have following problem
>
>First Brief Overview:
>I want to read the voice data from the file so that  the reciever on
>otherside can hear  the sound from the file. The sound initialisation
>is done using audiotype=AUDIO_TYPE_FILE in iaxc_initialise() and
>reading the .wav file by modifing  the file_input() function defined
>in the audio_file.c Data on the network is transmitted in  packets
>which is intermitent but played at the output device at a constant
>rate(and thats why the jitter buffer)
>
>now the QUESTION is
> how fast the data file be read and how(i.e by using udelay sleep stc)
>OR
>rather how asterisk/IAX make the compactibility between the packet
>data and the data  played/recorded at the constant rate (which can be
>different at different phone terminal)
>  
>

Again, this is the wrong list for this.   The iaxclient-devel list is 
the right place for this.

The answer, though, is that the audio_file interface doesn't presently 
support reading from files at all, it only supports writing to them.  
You'd need to implement file_input to read from the file with proper 
timing.  (ahh, OK, I see you already propose that).

So, then you'd just need to return sample_rate samples per second, 
preferably in 20ms (sample_rate/50) chunks.

-SteveK




More information about the asterisk-dev mailing list