I am working on a project where I am playing a wave file using naudio to someone over the phone through a softphone. The person making the call, wearing a usb headset (which is an external soundcard) would need to be able to speak along with the wave files. Right now I'm running a dual 3.5mm audio cable from the output into the input on the back of the computer to make this happen. This is making me have to use the onboard sound card for the wave and the head set for the person to speak which means I have to switch the default input audio device on-demand to allow the person to be heard or the wave to be heard. This causes issue with the softphone app depending on how its devices are set. I want to cut out the onboard soundcard altogether. I want to send both my wave audio and the person speaking, into the same input device.
When I play the audio this is the code I call:
WaveStream waveStream = new WaveFileReader(@"C:\Users\Public\Music\tester.wav");WaveOut waveOut = new WaveOut();waveOut.DeviceNumber = int.Parse(device1);WaveOut.Init(waveStream);WaveOut.Play();
At this point I would love to not only send to the selected output device but also to an input device as well. Is there any simple ways I can do this? Thanks for your help in advance.