When I call the lock method for the secondary sound buffer, do I have to copy data over twice or is this what the two buffer pointers are for?

Does directsound divide up the secondary buffer for me when using streaming buffers and then only lock the portion that isn't being played...or do I have to copy to the first half and then to the second half depending which position event is fired?
Posted on 2002-06-11 17:19:16 by grv575
this thread would be better in the GAME section. Although directx is implemented as COM interfaces this is just a minor technical detail.
Posted on 2002-06-12 07:00:13 by japheth
AFAIK directsound buffers can have callbacks setup so you will know when play cursor has reached near some fixed positions in the buffer.

You can use this as a circular buffer and fill it up behind what is currently singing
Posted on 2002-06-12 17:15:21 by BogdanOntanu
let's say u have 100kB buffer

you lock 70kB from this buffer, starting at 70kB

then:

first pointer points to sub-buffer #1 (70kB-100kB)
second pointer points to sub-buffer#2 (0kB-40kB)

so u have 100kB locked in 2 sub-buffers

#1 - from designated point to end of buffer
#2 - from beginning to end of selection
Posted on 2002-06-29 12:45:52 by ti_mo_n