Changes between Version 10 and Version 13 of Ticket #438


Ignore:
Timestamp:
Mar 3, 2008 3:48:33 PM (11 years ago)
Author:
bennylp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #438

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #438 – Description

    v10 v13  
    1 '''Audio burst:''' 
     1'''Problem 1: Audio burst:''' 
    22 
    33Most audio devices will call record and playback callbacks in burst, rather than in perfect interleave (for example, burst of record callbacks, followed by burst of playback callbacks, and so on). Because of this, audio buffering needs to be implemented in few pjmedia components (conference bridge, splitcomb, echo canceller, etc.), and the maximum buffering is controlled by {{{PJMEDIA_SOUND_BUFFER_COUNT}}} macro. 
     
    88 1. pjmedia components need to handle the burst, while this problem should have been localized and fixed in sound device. 
    99 
    10 This ticket attempts to fix this problem by fixing the burst in sound device port. The idea is sound device port will apply a fixed delay to buffer the burst, like a fixed jitter buffer (and the delay will be detected at run-time) and will call the get_frame() and put_frame() callback in a perfect interleave. Then the rest of PJMEDIA components can just use 1 frame for buffering. 
     10'''Problem 2: Audio drifts:''' 
     11 
     12Somehow related to this problem, it's common for sound devices on PC to have clock drifts (see some of our test results in [wiki:Audio_Device/Tests Audio Device Test] page). Because of this drifts, the buffering mechanism above will ultimately underflow or overflow, and this will cause a clicks noise to be generated. 
    1113 
    1214 
    13 '''Audio drifts:''' 
     15'''The Solution:''' 
    1416 
    15 Local audio device drifts would cause clicking noise as underflow and overflow occurs. 
     17This ticket solves the problem in several ways: 
     18 * introduce {{{delaybuf.[hc]}}} as a generic buffering mechanism. 
     19 * use {{{delaybuf}}} in {{{soundport}}}, so that now recording and playback callbacks are called in perfect interleave. 
     20 * also install {{{delaybuf}}} in {{{splitcomb}}} and conference bridge since they need the same buffering mechanism. 
     21 * add a capability in {{{delaybuf}}} to expand or shrink audio samples without affecting the audio quality nor producing the clicks noise. This is done by using WSOLA algorithm, implemented in ticket #497 
    1622