I would like to write a program which can capture the audio output on one PC, buffer it, transmit across the network to another PC which will output that audio. Basically like Airplay, but I want to output from all programs and stream to another PC instead of an apple basestation.

I think this should be possible with Visual Studio? I've been digging around in the Windows SDK, but couldn't find anything that actually worked on Windows 7. Does anyone have any suggestions on wher to look for some APIs which would allow me to capture the audio?

If you find it, let me know...trying to do something similar, with no luck, so far. I started out approaching it as a hardware deal, though, trying to hook a logitech G930 so two headsets could listen to one computer (no issue with digital encryption, or anything other than forcing both headsets onto the same channel at the same time), but since they dynamically change channels, trying to keep one on the same channel as the other isn't working well....or really, at all.

As far as I know there isn't an API to capture loopback audio. (But that doesn't mean its not buried in there somewhere.) Some device drivers have a "Loopback" or "Output" or "Stereo Mix" capture port that lets you capture all audio sent through them. But many devices don't.

To capture all audio you need to write a device driver that acts as a sound card and streams the audio. Or maybe you could do it with a filter driver that sits between the audio streaming and the output. Something like the stuff in the "Enhancements" pane of the audio settings. Either way, you need to look at the Windows DDK. It could take months just to figure out all the weird little APIs needed like the filter graphs and DRM security.

On the hardware side, what about looping the output to the line in(stereo only)? All you need is a 1/8 male/male jack cable (set the output level rather low to start).Your software then only needs to record and stream, you can probably find existing softwares to do that for you too.

Windows if a for profit operating system. As such I always find it more difficult to create programs for Windows. You might turn to open source programs that happen to have been ported to windows. To answer the first half of how to get the sound coming out of your speakers back into the computer there are some ideas here:

Appears the only sure way is to use hardware. Which has already been talked about here.

And for broadcasting I was thinking of a live pod cast program. But I haven't found one yet. Might be worth 5 minutes of your time to see if there is one that is open source. That way you will not be starting from scratch.

First, can you write a windows app? If you can program in a language Visual Studio likes, you are set, but otherwise mixing audio buffers and networks is a tough start.

Capturing audio. Look at the SDK example Multimedia\audio\CaptureSharedEventDriven and see how it works. It captures audio and writes it to a file, but it will get you looking at the right header files for audio work. Then you need to work out your buffer; circular array should work best for this. More of the audio API is available http://msdn.microsoft.com/en-us/library ... 02(v=vs.85).aspx and you might look at the audio programing guide http://msdn.microsoft.com/en-us/library ... 99(v=vs.85).aspx and focus on both the endpoint (microphone and speakers at the other end) and the stream management (how you read from the mic or output to speakers).

Network stuff is last, and I'm not the person to ask about that. I don't know what the stream protocols look like, or how to encode to them. An MP3 stream should work, I would suggest google for something like a streaming audio library. That way you have a standard output. Or you might create your own protocol so only your own device and app could listen at the other end; though security says that's a bad idea it might be an interesting project. Piping raw PCM WAV across your network might work, but you'll need a large buffer and have to account for odd latency issues if you have any network problems; while compressing your audio buffer into an MP3 or other format stream will require the above work.