![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
New Member
Join Date: Apr 2006
Posts: 2
|
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 |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2006
Posts: 2
|
I changed the buffers to 1 channel, and the same thing is happening.
Now, the cursors typically move in multiples of 128 bytes, except when there is a glitch and the output buffer's cursor moves 64 bytes less than that of the capture buffer. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Jun 2006
Posts: 1
|
i don't know how to solve you're problem, but can you give me the source code, i can't properly create a buffer and record the sound captured without having an error in the execution
|
|
|
|
|
|
#4 |
|
DevMaster Staff
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
|
slismsami, this thread is a couple of months old. Please create a new thread in which to ask your question.
___________________________________________
Currently working at Sucker Punch reedbeta.com - OpenGL demos and other projects Luabridge - a lightweight, dependency-free C++/Lua binding library. CD Lite - an unobtrusive, minimal CD player application for Windows. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|