摘要 |
A Voice-over-Internet-Protocol (VoIP) system has improved audio-buffer control. Voice captured by a microphone (mic) is loaded into mic buffers by the sound card and sent to a VoIP application. When a mic buffer arrives from the sound card, a speaker buffer manager is activated. Voice data extracted from incoming VoIP packets is loaded into a speaker buffer and sent to a speaker queue on the sound card for playback. A speaker-buffer count is kept and increased as each speaker buffer is sent to the sound card, and decreased as each empty speaker buffer is recycled from the sound card back to the VoIP application. As each mic buffer arrives, the speaker buffer manager compares the speaker-buffer count to upper and lower limits and sends zero, one, or two speaker buffers when the speaker-buffer count is above, between, or below the limits. Speaker-buffer latency and playback timing irregularities are reduced.
|