Play audio with samples/playfile correctly, but not on pjsua

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

 



My problem now can be fixed by adding param --ec-tail 0. But, when I was
talking to pjsua from another user agent which is not pjsua, the "human"
voice sounded like "robot" voice. It only happened on pjsua with ARM
platform while Ubuntu is correct. I thinks it's probably the problem on my
ARM. Anyways, thanks for your help, Nannang.

FYI, when I tried "--clock-rate 11025", pjsua would be terminated with
assertion on ../src/pjmedia/conference.c:1399
`cport->rx_buf_count<=cport->rx_buf_cap'

Regrads,
Fan Cheng


2008/5/13 Nanang Izzuddin <nanang at pjsip.org>:

> Hi Fan Cheng,
>
> At the first glance, the difference was in clock rate for sound device
> and then we realized that there is truncation in samples calculation
> because of 11025-16000 clock rate adjustment, but, as I just tested,
> this should not produce such kind of 'screak' (however, somehow this
> should be handled better, just created new ticket
> http://trac.pjsip.org/repos/ticket/532).
>
> Not sure where the screak is produced, so one of this may help to pin
> point the problem:
> 1. try with the same clock-rate as in play file, by specifying
> --clock-rate 11025 in pjsua param.
> 2. disable the EC by specifying --ec-tail 0 in pjsua param.
> 3. update to the new latest SVN, since there was update related to OSS
> (see http://trac.pjsip.org/repos/ticket/523).
>
> Regards,
> nanang
>
>
> 2008/5/11 Fan-Cheng Wu ?????\ <fcwu.tw at gmail.com>:
> > (This is the same content with previous message I posted. I didn't see
> the
> > message on http://news.gmane.org/gmane.comp.voip.pjsip, so I post it
> again)
> > Hi all,
> >
> > I tried to play a wav file with
> > pjsip-apps/bin/samples/playfile-arm-unknown-none, and I can hear the
> audio
> > correctly. But when I run bin/pjsua-arm-unknown-none and play a wav file
> in
> > program(http://trac.pjsip.org/repos/wiki/audio-check-play), the audio
> would
> > be heard like someone's screak.
> >
> > How can I fix the problem? My platform is MontaVista 4.0 with ARM 9.
> (ps.
> > the same condition happened when I compilied it for Ubuntu 8.04 with
> x86)
> >
> > Thanks a lot.
> >
> > Here are some log when I run two program:
> > root at 192.168.127.100:~/pjproject-0.8.0_arm/pjsip-apps#
> > bin/samples/playfile-arm-unknown-none ~/ring.wav
> >  17:54:20.894 os_core_unix.c pjlib 0.8.0 for POSIX initialized
> >  17:54:21.508      pasound.c PortAudio sound library initialized,
> status=0
> >  17:54:21.509      pasound.c PortAudio host api count=2
> >  17:54:21.510      pasound.c Sound device count=1
> >  17:54:21.521          pjlib select() I/O Queue created (0x82f34)
> >  17:54:21.529   wav_player.c File player '/root/ring.wav' created:
> > samp.rate=11025, ch=1, bufsize=4KB, filesize=31KB
> >  17:54:21.670      pasound.c Opened device 0: /dev/dsp(OSS) for playing,
> > sample rate=11025, ch=1, bits=16, 220 samples per frame, latency=23 ms
> >  17:54:21.671      pasound.c Starting /dev/dsp stream..
> >  17:54:21.687      pasound.c Player thread started
> >  17:54:21.688      pasound.c Done, status=0
> >
> > root at 192.168.127.100:~/pjproject-0.8.0_arm/pjsip-apps#
> > bin/pjsua-arm-unknown-none --play-file ~/ring.wav --log-level=6
> > --playback-dev=0 --capture-dev=0 --app-log-level 5
> > ......
> >  17:54:54.642   wav_player.c File player '/root/ring.wav' created:
> > samp.rate=11025, ch=1, bufsize=4KB, filesize=31KB
> >  17:54:54.643     resample.c resample created: high qualiy, large
> filter,
> > in/out rate=11025/16000
> >  17:54:54.644     resample.c resample created: high qualiy, large
> filter,
> > in/out rate=16000/11025
> > .......
> >  17:54:54.812      pasound.c Opened device /dev/dsp(OSS)//dev/dsp(OSS)
> for
> > recording and playback, sample rate=16000, ch=1, bits=16, 160 samples
> per
> > frame, input latency=16 ms, output latency=16 ms
> >  17:54:54.814      pasound.c Starting /dev/dsp stream..
> >  17:54:54.825      pasound.c Recorder thread started
> >  17:54:54.826 os_core_unix.c Info: possibly re-registering existing
> thread
> >  17:54:54.826      pasound.c Player thread started
> >  17:54:54.828      pasound.c Done, status=0
> >  17:54:54.926   echo_speex.c Speex Echo canceller/AEC created,
> > clock_rate=16000, samples per frame=160, tail length=200 ms, latency=32
> ms
> > ........
> >  17:54:56.104   pjsua_core.c Shutting down...
> >  17:54:58.003  pjsua_media.c Closing /dev/dsp sound playback device and
> > /dev/dsp sound capture device
> >  17:55:00.023      pasound.c Stopping stream..
> >  17:55:00.023      pasound.c Done, status=0
> >  17:55:02.023      pasound.c Closing /dev/dsp: 0 underflow, 0 overflow
> >  17:55:02.143      pasound.c PortAudio sound library shutting down..
> >
> >
> >
> >
> > _______________________________________________
> > 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080513/1810ceea/attachment-0001.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