Play buffer to a port associated with a call

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

 



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
>
>


[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