Join 3,556 readers in helping fund MetaFilter (Hide)


Tunneling audio over TCP/IP
September 7, 2007 2:35 PM   Subscribe

How can I play audio from one computer through another computer's sound card?

At home, I have a server running Debian, which usually has a medium-range wireless headset plugged into it. My time is split between that and a Powerbook running OS X. Which one I use depends on the activity at hand - I use the Debian machine for gaming and music, while the Powerbook tends to get used while I'm online or watching web video.

I was very happy to find mocp, letting me control my music from the Powerbook, but I'd like to make it more general. Ideally, I'd be able to leave the headset's transmitter plugged into the server all the time, but have it play the audio generated by random applications on my Powerbook.

So is there a way to have my Powerbook send audio to esd or alsa on the Debian box? A sort of remote soundcard, I guess. I'm comfortable fiddling with SSH tunneling and config files, but I don't really know anything about how ALSA works (or OS X audio, for that matter).
posted by spaceman_spiff to Computers & Internet (10 answers total) 2 users marked this as a favorite
 
one solution is to set up a shoutcast server.

if you use jack (an audio connection toolkit - it works with alsa but provides a way to "plug things together") then you can make whatever is playing music to also be the source for a shoutcast server. you can then listen to that shoutcast stream on your other computer.

the drawback is that it is a fair amount of work. i kept some notes when i did the above (i also wrote an airport client that will let the music be streamed to my hifi, but that is even flakier).
posted by andrew cooke at 2:54 PM on September 7, 2007


ah, that's backwards i think. sorry - it does debian to mac, not mac to debian.
posted by andrew cooke at 2:56 PM on September 7, 2007


Is there anything preventing you from centralizing your music so you don't have to come up with ideas like tunneling your audio back to the server that your headphones are connected to?
posted by rhizome at 3:27 PM on September 7, 2007


The truly uber-cool linux d00ds use netcat.

It's really the only 'unix' way to do it, pipes and fifos, oh my!
posted by Geckwoistmeinauto at 3:59 PM on September 7, 2007


Rhizome: I have my music centralized. That's hunky-dory and happy, and I've set up a tunnel for my DAAP server so I can also play music from the server on my Powerbook when I'm not within range of the headset. This is for other things, including apps that don't run on Debian.

Geckwoistmeinauto: Googling for netcat brought up a Slashdot articlewith a comment discussing exactly what I want - Tiger to Debian audio. Thanks!

(For anyone who comes by later, apparently there is an OS X port of JACK, and you can use Audio Hijack Pro to send audio to JACK, which then routes it through a module called jack.udp, to JACK running on the Debian box.)
posted by spaceman_spiff at 5:03 PM on September 7, 2007


Er, it might also be helpful if I linked to the comment in question, which has links to the relevant software.
posted by spaceman_spiff at 5:05 PM on September 7, 2007


If you had a Windows instead of MacOS, PulseAudio is what you'd want to use. Maybe someone will make a MacOS version of it some day.
posted by marionnette en chaussette at 5:43 PM on September 7, 2007 [1 favorite]


be careful with netcat and pipes - you may at least want to check what size buffer a fifo has and whether you can increase the size. at least on suse linux i had serious problems (the fifo buffer isn't big enough and you end up with glitches in the sound).
posted by andrew cooke at 6:30 PM on September 7, 2007


videolan will do that, no?
posted by nikko at 6:57 PM on September 7, 2007


Truly uber cool linux d00ds use NAS
posted by majick at 8:36 PM on September 7, 2007


« Older how to train a human to use a ...   |  Where can I find LaTex book te... Newer »
This thread is closed to new comments.