Play buffer to a port associated with a call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nanang, thanks for the message again. It sounds like the last a few bytes are replayed. You are right. I was actually not sure if the way i am doing is the right way to play data in a buffer to a port associated with a call. Is there a better way to do it? 
 
thanks a lot
 
Jessica 
> Date: Wed,25 Jun 2008 18:15:54 +0700> From: nanang@xxxxxxxxx> To: pjsip at lists.pjsip.org> Subject: Re: Play buffer to a port associated with a call> > Hi Jess,> > Could you describe more detail on "I can hear the audio, but it> doesn't sound correct", did it play correct audio but then continued> with previous audio? or audio was played slower/faster? IMHO, it is> rather unusual idea to replace the memplayer's audio buffer in EOF> callback since you should make sure that the clock rate, channel> number, and PCM length must be exactly same.> > Regards,> nanang> > > 2008/6/25 vopjessie <jessievop at hotmail.com>:> > I need to play audio data in a buffer to a sip inbound or outbound. The> > following steps are what I am doing:> >> > - call pjmedia_conf_create() to create a conference bridge> > - call pjmedia_mem_player_create() to create a port for the audio buffer> > - call pjmedia_mem_player_set_eof_cb() to register a call back> > - call pjmedia_conf_add_port() to add the port associated with the sip call> > (inbound or outbound) to the conference bridge> > - call pjmedia_conf_add_port() to add the port associated with the audio> > buffer the same conference bridge> > - call pjmedia_conf_connect_port() to connect the port associated with the> > audio buffer to the port associated with the sip call (inbound or outbound)> > - call pjmedia_null_port_create() to create a null port> > - call pjmedia_master_port_create() to create a master port with the null> > port as the upstream and the master port obtained from the conference bridge> > as the downstream> > - call pjmedia_master_port_start() to start the master port created in the> > last step> >> > I can hear the audio, but it doesn't sound correct. Since i fill the audio> > data to the buffer every time the call back function is called, i write the> > data filled in the audio buffer to a file in the call back function, the> > audio data in the file are correct. Does anyone know if i have done anything> > wrong.> >> > thanks in advance> >> > -Jessica> >> > ________________________________> > "?????????" ?????> > _______________________________________________> > Visit our blog: http://blog.pjsip.org> >> > pjsip mailing list> > pjsip at lists.pjsip.org> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org> >> >> _______________________________________________> Visit our blog: http://blog.pjsip.org> > pjsip mailing list> pjsip at lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_________________________________________________________________
MSN ????????????????????
http://cn.msn.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080625/644fd558/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux