DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Sound and Music Programming
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 04-10-2006, 12:43 PM   #1
hocki101
New Member
 
Join Date: Apr 2006
Posts: 2
Default Directsound Capture/Output Buffers Not Playing Evenly

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
hocki101 is offline   Reply With Quote
Old 04-11-2006, 06:47 AM   #2
hocki101
New Member
 
Join Date: Apr 2006
Posts: 2
Default Re: Directsound Capture/Output Buffers Not Playing Evenly

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.
hocki101 is offline   Reply With Quote
Old 06-30-2006, 04:40 AM   #3
slismsami
New Member
 
Join Date: Jun 2006
Posts: 1
Default Re: Directsound Capture/Output Buffers Not Playing Evenly

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
slismsami is offline   Reply With Quote
Old 06-30-2006, 05:46 AM   #4
Reedbeta
DevMaster Staff
 
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
Default Re: Directsound Capture/Output Buffers Not Playing Evenly

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.
Reedbeta is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 12:23 PM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.