about audio question!

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

 



Hi Tanger,

Sorry, I forgot to mention sndtest in 0.8.0 is actually buggy, it
always reports no drift detected. It has been fixed months ago in the
SVN trunk. So please check the drift with the latest SVN.

About audio problem, please make sure whether it is caused by AEC (by
comparing ec-tail > 0 to ec-tail = 0) and please try with some sound
device clock rates especially the clock rate with less drift.

FYI, in the latest SVN, pjsua has new option --snd-clock-rate, to
enable different clock rate setting between sound device and
conference bridge.

Regards,
nanang


On 17/04/2008, cat tanger <tanger_wendy at yahoo.com.cn> wrote:
>
>
>
> Hi ,Nanang Izzuddin.
> thank you very much.
>
> 1.  I test my sound cards do not clock drift.
>        14:45:49.109 os_core_win32. pjlib 0.8.0 for win32 initialized
>          14:45:49.187      pasound.c PA message: Pa_GetDeviceInfo: Num input
> channels reported as 65535! Changed to 2.
>          14:45:49.187      pasound.c PA message: Pa_GetDeviceInfo: Num
> output channels reported as 65535! Changed to 2.
>          14:45:49.343      pasound.c PortAudio sound library initialized,
> status=0
>          14:45:49.343      pasound.c PortAudio host api count=3
>          14:45:49.343      pasound.c Sound device count=8
>          14:45:49.359          pjlib select() I/O Queue created (00A95CEC)
>          14:45:49.359      sndtest.c Found 8 devices:
>          14:45:49.359      sndtest.c  0: Microsoft ????? - Input (capture=2,
> playback=0)
>          14:45:49.359      sndtest.c  1: Realtek HD Audio Input (capture=2,
> playback=0)
>          14:45:49.359      sndtest.c  2: Microsoft ????? - Output
> (capture=0, playback=2)
>          14:45:49.359      sndtest.c  3: Realtek HD Audio output (capture=0,
> playback=2)
>          14:45:49.359      sndtest.c  4: ????????? (capture=2, playback=0)
>          14:45:49.359      sndtest.c  5: Realtek HD Audio Input (capture=2,
> playback=0)
>          14:45:49.359      sndtest.c  6: ??????? (capture=0, playback=2)
>          14:45:49.359      sndtest.c  7: Realtek HD Audio output (capture=0,
> playback=2)
>          14:45:49.375      sndtest.c Testing playback device Microsoft ?????
> - Output
>          14:45:49.375      sndtest.c Testing capture device Microsoft ?????
> - Input
>          14:45:49.593      sndtest.c  Please wait while test is in progress
> (~11 secs)..
>          14:46:00.718      sndtest.c  Dumping results:
>          14:46:00.718      sndtest.c   Parameters: clock rate=16000Hz, 160
> samples/frame
>          14:46:00.718      sndtest.c   Playback stream report:
>          14:46:00.718      sndtest.c    Duration: 10s.000
>          14:46:00.718      sndtest.c    Frame interval: min=7.852ms,
> max=12.159ms
>          14:46:00.718      sndtest.c    Jitter: min=1.780ms, avg=3.541ms,
> max=4.307ms
>          14:46:00.734      sndtest.c   Capture stream report:
>          14:46:00.734      sndtest.c    Duration: 10s.010
>          14:46:00.734      sndtest.c    Frame interval: min=0.022ms,
> max=24.051ms
>          14:46:00.734      sndtest.c    Jitter: min=9.965ms, avg=21.575ms,
> max=24.013ms
>          14:46:00.734      sndtest.c   Checking for clock drifts:
>          14:46:00.734      sndtest.c    No clock drifts is detected
>          14:46:00.750      sndtest.c  Test completed with some warnings
>
> 2. i say aec work well mean aec work in ptime=10 mode can cancel partial
> echo , tail_len =200.
>    but audio not good , with clutter.
>    the attichment are aec_out.sw,aec_rec.sw and aec_play.sw files.
>    clock_rate =16000 ,bits_per_sample = 16,channel_cnt =1.
>
> 3. it runing on vista easy result aec reset , and often happen on the end of
> far user burst speak.
>     reset times too faster, 20ms reset 15 times , and can't hear what the
> far user say.
>      16:32:33.808    aec02FC94E0 AEC reset, delay=-9284, prefetch=10
>      16:32:33.809    aec02FC94E0 AEC reset, delay=-9285, prefetch=10
>      16:32:33.841    aec02FC94E0 AEC reset, delay=-9286, prefetch=10
>      16:32:33.844    aec02FC94E0 AEC reset, delay=-9287, prefetch=10
>      16:32:33.873    aec02FC94E0 AEC reset, delay=-9288, prefetch=10
>      16:32:33.874    aec02FC94E0 AEC reset, delay=-9289, prefetch=10
>      16:32:33.876    aec02FC94E0 AEC reset, delay=-9290, prefetch=10
>      16:32:33.908    aec02FC94E0 AEC reset, delay=-9291, prefetch=10
>      16:32:33.909    aec02FC94E0 AEC reset, delay=-9292, prefetch=10
>      16:32:33.940    aec02FC94E0 AEC reset, delay=-9293, prefetch=10
>      16:32:33.941    aec02FC94E0 AEC reset, delay=-9294, prefetch=10
>      16:32:33.972    aec02FC94E0 AEC reset, delay=-9295, prefetch=10
>      16:32:33.973    aec02FC94E0 AEC reset, delay=-9296, prefetch=10
>      16:32:34.001    aec02FC94E0 AEC reset, delay=-9297, prefetch=10
>      16:32:34.003    aec02FC94E0 AEC reset, delay=-9298, prefetch=10
>      16:32:34.004    aec02FC94E0 AEC reset, delay=-9299, prefetch=10
>      16:32:34.034    aec02FC94E0 AEC reset, delay=-9300, prefetch=10
>      16:32:34.036    aec02FC94E0 AEC reset, delay=-9301, prefetch=10
>      16:32:34.069    aec02FC94E0 AEC reset, delay=-9302, prefetch=10
>      16:32:34.070    aec02FC94E0 AEC reset, delay=-9303, prefetch=10
>      16:32:34.100    aec02FC94E0 AEC reset, delay=-9304, prefetch=10
>      16:32:34.101    aec02FC94E0 AEC reset, delay=-9305, prefetch=10
>      16:32:34.129    aec02FC94E0 AEC reset, delay=-9306, prefetch=10
>      16:32:34.130    aec02FC94E0 AEC reset, delay=-9307, prefetch=10
>      16:32:34.161    aec02FC94E0 AEC reset, delay=-9308, prefetch=10
>      16:32:34.164    aec02FC94E0 AEC reset, delay=-9309, prefetch=10
>      16:32:34.165    aec02FC94E0 AEC reset, delay=-9310, prefetch=10
>      16:32:34.196    aec02FC94E0 AEC reset, delay=-9311, prefetch=10
>      16:32:34.197    aec02FC94E0 AEC reset, delay=-9312, prefetch=10
>
>  regards.
>
> tanger.
>
>
>
>
> Date: Thu, 17 Apr 2008 11:44:25 +0700
> From: "Nanang Izzuddin" <nanang@xxxxxxxxx>
> Subject: Re: about audio question!
> To: "pjsip list" <pjsip at lists.pjsip.org>
> Message-ID:
>
> <c7f43120804162144u1fd725c6w3e4a4fea4fdcbb7 at mail.gmail.com>
> Content-Type: text/plain; charset=GB2312
>
>
> Hi Tanger,
>
> Some sound cards do have clock drift, recording and playing do not
> have exact same clock rate, (and this usually will hurt the AEC, but
> not in your case?). sndtest sample app can be used to check drift
> level of your sound card.
>
> However it is a bit strange on your case, since usually AEC will work
> well when there is no clock drift, and AEC becomes inefficient/not
> working when there is drift. But, your experience is on the contrary
> of those usual behavior.
>
> So, if you are sure that the AEC works well (echo is canceled) in
> ptime==10, where the drift occurred, then just use this setting :)
>
> You may want to try opening the sound card in clock rate 48kHz which
> usually produce less drift.
>
>
> Regards,
> nanang
>
>
> On 17/04/2008, cat tanger <tanger_wendy at yahoo.com.cn> wrote:
> >
> >
> >
> > hi,all,
> > please help me!
> > I use pjproject-0.8.0,
> >
> > when i set  audio_frame_ptime = 20,aec = 1,  then  PaRecorderCallback and
> > PaPlayerCallback function run exactly, but aec can't work well, do not
> > cancell echo .
> >
> > when i set  audio_frame_ptime = 10,aec = 1,  then  aec can work well . but
> > the PaRecorderCallback and PaPlayerCallback function do not work well,
> > portaudio callback the PaRecorderCallback times far more callback
> > PaPlayerCallback times, it result the aec continue reset. i find underflow
> > in the PaPlayerCallback.
> >
> > pls help me!
> > thanks!
> >
> >
> > test code:
> >
> > static int capcounts = 0,playcounts = 0;
> >
> > static int PaRecorderCallback(const void *input,
> >          void *output,
> >          unsigned long frameCount,
> >          const PaStreamCallbackTimeInfo* timeInfo,
> >          PaStreamCallbackFlags statusFlags,
> >          void *userData )
> > {
> >    .....
> >  capcounts ++;
> >  if (capcounts%500 == 0)
> >  {
> >  PJ_LOG(5,(THIS_FILE, "Recorder thread capcounts = %d,playcounts =
> > %d",capcounts,playcounts));
> >  }
> >    ....
> >    return paAbort;
> > }
> >
> > static int PaPlayerCallback( const void *input,
> >        void *output,
> >        unsigned long frameCount,
> >        const PaStreamCallbackTimeInfo* timeInfo,
> >        PaStreamCallbackFlags statusFlags,
> >        void *userData )
> > {
> >    ....
> >  playcounts ++;
> >  if (playcounts%500 == 0)
> >  {
> >    PJ_LOG(5,(THIS_FILE, "Player thread capcounts = %d,playcounts = %
> > d",capcounts,playcounts));
> >  }
> >    ....
> >  return paAbort;
> > }
> >
> >
> > print :
> >  11:11:06.703    aec00EA2B70 AEC reset, delay=-65, prefetch=10
> >  11:11:06.921      pasound.c Recorder thread capcounts = 500,playcounts =
> > 434
> >  11:11:07.062    aec00EA2B70 AEC reset, delay=-66, prefetch=10
> >  11:11:07.609      pasound.c Player thread capcounts = 568,playcounts =
> 500
> >  11:11:07.734    aec00EA2B70 AEC reset, delay=-69, prefetch=10
> >  11:11:11.921      pasound.c Recorder thread capcounts = 1000,playcounts =
> > 903
> >  11:11:11.921    aec00EA2B70 AEC reset, delay=-89, prefetch=10
> >  11:11:12.828      pasound.c Player thread capcounts = 1089,playcounts =
> > 1000
> >  11:11:13.140    aec00EA2B70 AEC reset, delay=-90, prefetch=10
> >  11:11:16.906      pasound.c Recorder thread capcounts = 1500,playcounts =
> > 1376
> >  11:11:17.203    aec00EA2B70 AEC reset, delay=-123, prefetch=10 1
> >  11:11:18.390      pasound.c Player thread capcounts = 1646,playcounts =
> > 1500
> >  11:11:18.390    aec00EA2B70 AEC reset, delay=-140, prefetch=10
> >  11:11:21.921      pasound.c Recorder thread capcounts = 2000,playcounts =
> > 1817
> >  11:11:23.171    aec00EA2B70 AEC reset, delay=-183, prefetch=10
> >  11:11:23.828      pasound.c Player thread capcounts = 2191,playcounts =
> > 2000
> >  11:11:24.234    aec00EA2B70 AEC reset, delay=-192, prefetch=10
> >  11:11:26.921      pasound.c Recorder thread capcounts = 2500,playcounts =
> > 2253
> >  11:11:26.937    aec00EA2B70 AEC reset, delay=-239, prefetch=10 1
> >  11:11:29.703      pasound.c Player thread capcounts = 2779,playcounts =
> > 2500
> >  11:11:29.937    aec00EA2B70 AEC reset, delay=-278, prefetch=10
> >  11:11:31.906      pasound.c Recorder thread capcounts = 3000,playcounts =
> > 2681
> >  11:11:32.140    aec00EA2B70 AEC reset, delay=-311, prefetch=10
> >
> >
>
>  ________________________________
>  ????????????
> _______________________________________________
>  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