Version 1 (modified by bennylp, 14 years ago) (diff)


Checking the Quality of the Sound Device

In the worst case, some of the audio problems may come from the sound device itself, causing problems such as:

  • audio stutters,
  • audio break-ups.

It may not be the sound device itself that causing the problem, but could be the operating system driver for the device. For example, on Linux, the ALSA driver tends to have a very good quality while using OSS driver for the same device would give a less satisfactory result.

It is also observed from the mailing list discussions that many embedded Linux device with on-board sound adapter give a bad audio quality with OSS driver, although normally it would play a WAV file fine. We conclude that these sound adapter (or the driver) is not really designed for streaming, bidirectional communication like audio call, but rather for trivial tasks like playing a file to the speaker.

Sound Device Problems

Some problems with sound device:

  1. Jitter: Common problem with most sound device is the jitter. Where for example PJMEDIA expects audio frames to be delivered at exactly 20ms interval, the sound device (or driver) may deliver it at 10ms, 10ms, 30ms, 30ms, etc. Normally the total number of frames delivered will match the clock rate (i.e. there's no lost frames), but it's just that these frames are not delivered in timely manner.
  2. Burst: A worsening problem with the jitter is bursting, where the sound device (or driver) delivers the audio frame in burst and then followed by silent period, and burst again. If the sound device is open in full-duplex mode, this would normally cause the recorder callback to be called in burst of several calls, then followed by burst call to the playback callback, and back to burst call to the recorder callback, and so on.
  3. Underflows and Overflows: Another problem with audio application is underflows and overflows, where application is not processing the audio frames quickly enough.
  4. Clock drifting: A not so common problem with some sound device is clock drifting, where the sound device is not delivering audio samples at the exact clock rate. For example, when the sound device is opened at 8KHz, the sound device may deliver a little less or more than 8000 samples per second.

Testing the Sound Device