views:

137

answers:

5

Imagine this scenario: You have a desktop and a laptop. The desktop has a high end set of speakers, the laptop does not. You currently use Synergy to share your mouse and keyboard, but audio is a problem.

Is there a way in C# to create a client that captures all of the sound on a PC(I'm thinking like a virtual sound card) and streams it to server that hosts the real sound card?

A: 

Streaming sound shouldn't be a problem if you design something like a ring buffer in case you have lags in the network to avoid breaking the sound wave.

For capture though, I don't see any easy solution short of creating a virtual WDM driver that you put on top of the sound card (either input or output) you want to capture.

Padu Merloti
I'm confident that streaming won't be an issue, it's creating the virtual sound card that has me stumped. I don't even know where to start.
nwalker85
+1  A: 

Not a programming solution - but airfoil with airfoil speakers will do what you want and it's not expensive.

http://rogueamoeba.com/airfoil/speakers.php

morechilli
If there is a solution out there, why reinvent the wheel. Thanks for the link; in all my googling for an answer to this I never came across this software. It doesn't look like creating a virtual driver in c# is feasible anyway.
nwalker85
A: 

There is AirFoil, as morechilli mentioned. It works with minimal setup, however the output is very noticeably latent.

The PulseAudio project might hold the key to low-latency. A lot of relevant questions on SuperUser.

gWiz
It looks like AirFoil definitely does what I want it to do. IDK if its worth buying if there is a delay however.
nwalker85
There's a trial version that runs for 10 minutes before cutting to static.
gWiz
A: 

I'm not sure if this is the solution you're looking for, but I quite often shoutcast over my home network using winamp and the shoutcast server. If it's just music you want to listen to, this will do the trick. However (and I admit I have not tested this), you can tell the encoder what to listen to - normally you just get it to listen to the output buffer of winamp, but there is a setting that allows it to listen to the output to your soundcard.

http://www.shoutcast.com/download

Iain Fraser
I looked into this, but I'm looking to stream *everything* that gets sent to the sound card; sound from chrome, wmp, a game, w/e happens to be sending info to the sound card. It's looking like AirFoil is going to be my best bet.
nwalker85
A: 

Yeah, you write a driver that is a virtual sound card and IPC's off the information to a service that streams the data out.

Paul Nathan