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

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

 



2008/5/13 Fan-Cheng Wu ?????\ <fcwu.cs95g at nctu.edu.tw>:
>
> 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.
>

What codec did you use? If you use high complexity codec then probably
your device couldn't take it. Try with G.711 first.

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

Clock rate 11025 (and 22050) currently can't work without explicit
adjustment to ptime in the source (we need to set ptime to 40 when
clock rate is 11025 and to 20 with clock rate 22050 to make a whole
frame). As Nanang said ticket #532 will fix that, but in the mean time
please don't use clock rate 11025 in any parts of pjmedia.

I hope these fix your problems, please let me know if they don't.

Cheers
 Benny

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