• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DirectSound Question

imported_nautique

Senior member
I am having trouble getting an audio player I wrote to play back well. Right now the beginning of the song is played back fine and then after about 2 or 3 seconds (I buffer up 3 secs) it starts to skip. Sounds like a scratched cd.

My first question is about IDirectSoundBuffer8::Lock. For the dwFlags parameter, I was using the DSBLOCK_ENTIREBUFFER value, but someone told me to use "0" there instead. Could someone explain to me what the "0" does and why to use that instead of DSBLOCK_ENTIREBUFFER? Does it still ignore either the dwOffset or dwBytes?

Also, it seems that on the first memcpy to the buffer (filling the entire buffer), everything works great. Then when I try to copy a certain section that was just played, the Lock method is giving me the wrong address back and its overwriting data that has yet to be played? Does anyone have any knowledge as to why that might be happening? I am at a stand still and any advice would be great appreciated.

Thanks in advance.

DN
 
Back
Top