tags:

views:

2012

answers:

4

I'm trying to build a program in C# that will allow me to stream audio and video from one computer, over the network, to another computer, which is hooked up to a bunch of video/audio equipment (projector, speakers, etc). Ideally, I'd like to be able to capture this data directly from the "presenter" computer without it having to plug into anything.

The video, streaming, and re-displaying on the "output" computer is all working well, but I can't seem to find a good way to capture audio output without the need for a cable plugged in to the headphone jack and wired to the other computer. The whole point of this program is to allow this to be done wirelessly, so this is kind of a problem. To sum up, I'm looking for some sort of C# interface that will allow me to capture the sound output on a windows machine, as though I had plugged something into the headphone jack.

Thanks in advance for any help.

+1  A: 

Have a look at the code in this article , it needs to be modified quite a bit to be able to stream the output over the network , but that should not be hard enough. http://www.csharpfriends.com/Forums/ShowPost.aspx?PostID=19102

RC1140
+2  A: 

In Windows, the audio card manufacturers could choose to supply a "what you hear" input stream in order for you to capture the output. If your sound card/driver doesn't have this feature, you could try to use the Virtual Audio Cable to perform the same thing.

In Windows 7, there's a new functionality that allows you to listen to / capture any input stream directly.

Magnus Johansson
+1  A: 

If you already have the Video side figured out; NAudio is a good way to handle the Audio component.

Assuming we break the task in to the recording and then the receiving and playing components then the following should help you with each side;

The recording: http://opensebj.blogspot.com/2009/04/naudio-tutorial-5-recording-audio.html

The receiving and playing: http://stackoverflow.com/questions/184683/play-audio-from-a-stream-using-c

The method of transport in between is up to you but if you already have a way of sending a stream between two computers you should be able to reuse that. Just make sure your buffer is big enough that there is always data to play back on the receiving computer.

Sebastian Gray
A: 

@Magnus Johansson :"In Windows 7, there's a new functionality that allows you to listen to / capture any input stream directly."

What is it called, any refrence, links , more info please

Ryan