about audio question!

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

 



    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
  


       
---------------------------------
 ????????????
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080417/45b41350/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