So I've looked through the samples for the Media Foundation audio and they basically have all the functionality I need except for they don't really implement a callback for when the audio buffer is empty. Basically I made some simple oscillators for a synthesizer I am developing and I need an callback method to refill the buffer. Thankfully someone sort of did most of the work for an example they were building for BUILD2014 and posted the code on github.
https://github.com/jolson88/BeatBuilder/blob/master/BeatBuilder.Shared/AudioRenderer.cpp
Problem is I just don't know enough about the asynchronous callbacks and the documentation for them just isn't clear to me. Also the above linked example doesn't quite work since it requires /clr or /ZW in the command line for his implementation AsyncCallback.h and I am using openFrameworks which conflicts with both.
Really all I need is to implement his function OnRenderCallback(IMFAsyncResult*result)but that's where I sort of hit a wall. Could I just make a pointer to that function from the invoke method in IMFAsyncCallback? and how does it know to go to that callback function? I don't see how the pointer and event handle direct there each time the buffer is empty.