Opened 16 years ago

Last modified 16 years ago

#438 closed enhancement

Workaround for frame bursts from audio devices — at Initial Version

Reported by: bennylp Owned by: bennylp
Priority: critical Milestone: release-0.9.0
Component: pjmedia Version: trunk
Keywords: Cc: nanang
Backport to 1.x milestone: Backported:

Description

Most 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 is needed by few pjmedia components (conference bridge, splitcomb, etc.), and the maximum buffering is controlled by PJMEDIA_SOUND_BUFFER_COUNT macro.

This is not ideal, because:

  1. it adds audio latency of up to PJMEDIA_SOUND_BUFFER_COUNT frames, while theoretically the delay should be limited to the maximum burst level of the device.
  2. it will add even more end to end latency when the sound device is connected directly to the stream (rather than via conference bridge), because of how the jitter buffer is implemented.
  3. pjmedia components need to handle the burst, while this problem should have been localized and fixed in sound device.

This ticket attempts to fix this problem by fixing the burst in sound device port. The idea is sound device port will buffer the burst and will call the get_frame() and put_frame() callback in a perfect interleave, thus removing the need for PJMEDIA_SOUND_BUFFER_COUNT

Change History (0)

Note: See TracTickets for help on using tickets.