I've put notifications (10) at the end of each sector
I fill the buffer completely and then start play() with looping
As each notification is triggered, I write from the last position (initially
0) to the CurrentPlayPosition-1
I save the last position as CurrentPlayPosition and wait for the next
notification
So, I'm writing before and up to the CurrentPlayPosition. I'm also not
locking anything when I write to the SecondaryBuffer.
I was a little confused to find the CurrentWritePosition was a little larger
than the CurrentPlayPosition. I'm essentially ignoring the
CurrentWritePosition.
Thanks for any advice here.
Sounds about right. Basically you can write anywhere in the buffer from
ahead of the CurrentWritePosition to end of buffer, and from start of
buffer to CurrentPlayPosition. You are responsible for tracking your own
write position for what you have written.
--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]