locked
using WASAPI IAudioCaptureClient and IMFAsyncCallback

    Question

  • Hi,

    Per recommendations in various threads in this forum, I'm using WASAPI to capture audio.  Because I'm trying to get Metro support, I'm using IMFAsyncCallback and doing work on the captured samples in the context of Invoke every time the MF sets an event to indicate that a sample is ready.  (This is exactly like the Audio hardware offload sample does for rendering -- I've basically ported the approach for the capture side).

    My question is -- is there any restriction on what I do in the context of IMFAsyncCallback::Invoke?  I am hitting bizarre stack corruption errors when I call into certain code from this thread; that same code works well when called from a "regular" thread that I create myself (and use the AVRT functions to boost its priority).  Obviously the AVRT functions are not available to me since I'm targeting Metro -- so I assumed using IMFAsyncCallback per the Audio hardware offload sample was the right thing to do.  Maybe not?

    Any feedback is appreciated.

    Jeremy

    Thursday, July 26, 2012 6:38 PM

All replies