2012-01-26, 19:52
Quote:Be careful with the event driven system. I don't know if it was a driver or Windows related bug, but I tried going that route when I initially wrote the sink and it wasn't double buffering correctly. Rather, it waited until the buffer was completely empty before triggering the refill event which caused choppy playback. Even Microsoft's own example code exhibited this behavior on my system.
Events here seem to trigger fine, but it did take quite a bit of fiddle to figure out why it was only firing when the buffer was empty. You have to be sure the buffer is full before you start waiting on the event and you get events for the odd 30-50 frames as they are required. From what I can tell this is part of the MS engine and is not the drivers responsibility.
Really though at some point later, after looking at WASAPI I believe a complete AE engine should be written for it instead of a sink.