hocki101
04-10-2006, 12:43 PM
I am creating a program that uses Directsound to make 2 buffers (1 capture and 1 output). The buffers are 2 channels, 9600 bps, 16 bit/sample. Each buffer is 2 seconds long with 16 notification points.
Timing is very critical in my program. I have created a log tracking the output buffer's play cursor and capture buffer's capture cursor, and from one notification to the next, the difference in each is a multiple of 256. Every once in a while (at random it seems), however, the output buffer's cursor will move 128 bytes less than did the capture buffer's cursor. The cursors then travel at the same speed again, but now the latency for the sound is 128 bytes greater.
This appears to happen every 10 or 20 minutes with the output cursor getting further behind each time. The processing of the samples is quick enough so that the unlocked portion is not stretching into the sections being played/captured.
Does anyone have any ideas that could help me? Thanks in advance.
Brian
Timing is very critical in my program. I have created a log tracking the output buffer's play cursor and capture buffer's capture cursor, and from one notification to the next, the difference in each is a multiple of 256. Every once in a while (at random it seems), however, the output buffer's cursor will move 128 bytes less than did the capture buffer's cursor. The cursors then travel at the same speed again, but now the latency for the sound is 128 bytes greater.
This appears to happen every 10 or 20 minutes with the output cursor getting further behind each time. The processing of the samples is quick enough so that the unlocked portion is not stretching into the sections being played/captured.
Does anyone have any ideas that could help me? Thanks in advance.
Brian