Archived

This topic is now archived and is closed to further replies.

Larz

DirectSound Looping

Recommended Posts

Here''s the deal: I''m having a little problem with looping in DirectSound. I think there is a little pause when the play cursor is returning to the beginning of the buffer. I lock the entire buffer and fill it in with a sin wave so the pause is quite noticable. The size of the buffer is a multiple of the number of samples needed for one cycle of the sin wave. When the multiple doubles the little pause happens at half speed. When the multiple is cut in half the pauses happen at twice the rate. DSBUFFERDESC dsbd; ... /* samples is how many samples are needed for one cycle */ dsbd.dwBufferBytes = samples*256; ... when I change 256 to 512 the pause happens at half rate. The buffer format (primary and secondary) is 8-bit mono 44100Hz. Sorry for the ramble, but I was trying to be as detailed as I could. Any help would be appreciated.

Share this post


Link to post
Share on other sites