I am trying to write code to capture a microphone and stereo mix with DirectShow filters. First I try to configure filters using GraphEdit from the Windows SDK. I installed the capture devices on the microphone and stereo mix, then connect the Capture pins from both of them to the 01 inputs and the 02 AVI Mux input, and then connect the AVI Out pin to the contact of the Writer file. When I run the chart, I get
This graph cannot be played. Unspecified error (Return code: 0x80004005)
I looked for this error quite a bit, and I can not find the answer.
If I try to associate them separately with the WAV Dest filter for each of them, I get the same error. For some reason I cannot understand, this will not allow me to capture both. Is StereoMix emulating a microphone when I remove it?
If I try to capture them one at a time, it works, but I need to capture both at the same time. If I installed a microphone to output to the speakers, then I can record both of them, but this does not really help me, because the user can hear themselves in the speakers, which can really distract.
I also tried and recorded a loop with WASAPI, but I need some backward compatibility, since loop recording with WASAPI only works for Vista or Windows 7.
I looked at PortAudio and FFmpeg , but I can not afford to complicate the program more than it is. What should I do?
source share