I'm trying to capture my webcam and system audio using Expression Encoder, the webcam works fine but the system audio is just silent.
I followed the tutorial here: CodeProject Expression Encoder Tutorial but it isn't working for me properly.
When I list the audio devices, "Speakers...", "Microphone..." and "Headphones..." are listed (as they are in Playback Devices in the system tray) but if I try and record from either Speakers or Headphones I get nothing (I get the mic audio fine if I select that one).
Here is the code I'm using:
job = new LiveJob();
LiveDeviceSource lds = job.AddDeviceSource(ledv[0], leda[1]);
FileArchivePublishFormat fileOut = new FileArchivePublishFormat();
fileOut.OutputFileName = string.Format("C:\\Users\\user1\\Desktop\\testvideo-{0:yyyyMMdd_hhmmss}.wmv", DateTime.Now);
job.PublishFormats.Add(fileOut);
lds.PreviewWindow = new PreviewWindow(new System.Runtime.InteropServices.HandleRef(panel1, panel1.Handle));
job.StartEncoding();
job.ActivateSource(lds);
Does anyone have any idea why it doesn't record system audio? Are there any other settings I need to mess with before it should work?
Thanks for your time.
EDIT:
I decided to print out job.CurrentAudioVolume when it is encoding to see if this ever changed but it always just sits at 0. If I change the audio device to the microphone, this value goes up when there is sound (as expected). So it definitely looks like the SDK is unable to record my system audio (either from Speakers or Headphones).