Hi,<br><br>I&#39;m doing a VoIP related project where at some point i need to decode speex data gathered from a flash client, and then encode it to ulaw or alaw pcm so i can send it in rtp packets.<br>On the other way, i get rtp packets with ulaw and alaw pcm data, then i need to decode them to linear pcm and feed the speex encoder, so i can send the data to the flash player.<br>
<br>I&#39;m using JSpeex, i know this is not JSpeex mailing list but i would really apreciate some help.<br><br>There are some (a lot of) things i don&#39;t understand:<br><br>-In flash, i can set the sample rate and the quality of the speex data. If the sample rate is 16KHz, the number of bits per sample, and consequently the bitrate, will depend on the quality. <br>
After i get the speex frame, i call init on the Decoder. There, i don&#39;t understand what is the meaning of the sample rate if you already have to pass the mode. How is it related?<br><br>Does the speex frame contain any info about the bitrate?<br>
<br>-I know that every flash packet has a header containing info about the audio format, stereo or mono, bitrate, etc. But it seems to change over time...For example, the number of channels.<br><br>-After decoding a speex frame, i&#39;m supposed to get linear pcm at what sample rate? The same as defined on the init? What about the number of bits per sample?<br>
<br>-On the speex encoding part, the parameters needed on init are related to the linear pcm frame i should pass to processData and it also indicates what type of speex frame i will get?<br>What kind of pcm data can i use to feed the encoder?<br>
<br>Maybe some of the questions don&#39;t make much sense, but i can&#39;t get much info on the subject.<br><br>Thanks in advance,<br><br>John<br>