We are able to capture microphone audio with AEC on Vista, based on the code
of AecSDKDemo.exe. We wrapped the DMO in the Audio Capture DirectShow
filter, and it works fine.
The problem is, it only works when some other program is playing something
on speakers, otherwise our ProcessOutput function fails.
When the speakers "speak", it works.
Now, consider a Skype-type VOIP app, that wants to use this functionality.
It can't. You have to start playing before you start capturing from the
microphone,
but you still have nothing to play!!! (the peer is waiting for you to get a
stream from you, and you are waiting for the stream from a peer...kinda
deadlock in programming terminology)
So, can somebody suggest something?
It would be really stupid to start playing some silent wave file, before we
start capturing. But in our case, we can't even do that, because we are
running as a service under SYSTEM account and we can't get to play anything
on the speakers.
(can we, by any means?)
Any advice, please.....
David
while(1)
{
if (we_are_waiting_for_remote_end)
return S_FALSE;
// ProcessOutput here
}
When the remote end connects or initiates the call set the variable
we_are_waiting_for_remote_end to false.
I am sure that you are aware that in order for your application to be able
to change a variable of the filter at run time you need to add an interface
in the filter and expose methods that the application can use to set/reset
the variable.
Hope that helps.
Regards
Abbas