I have Linux box with Ubuntu + PulseAudio network server installed. I can stream audio from my laptop (with Linux installed too) to the box over local network.
I've recently installed Windows 7 into my laptop. I want to stream my laptop audio to the box. Could someone help me setup audio streaming over network over PulseAudio from Windows to Linux box?
6 Answers
It took less than 5 minutes to setup. It supports unicast and multicast raw streams from Windows at multiple sample rates. It has listeners for windows, ALSA and pulse-audio.
2The second part of the answer (the Windows part) probably applies to your case:
either use an old Windows esd driver, or the linco tool.
AFAIU, there is no pulseaudio sound output driver for Windows as of now, nor even the pulseaudio output module for VLC has been ever built for Windows. (This would allow at least an easy way to output the sound from VLC to your remote pulseaudio server.)
There are many success stories using Jack streaming server.
One of them:
I was successful with using JACK, though unlike Eir Nym's answer, the sound is playing from the Linux box as you requested. I did a small write-up of it here:
The advantage of using JACK over PulseAudio would be lower latency (provided you configure it correctly). Doesn't really matter if you're just playing music, but things like games and recording work needs the low latency.
Partially quoting for posterity:
Stream audio from Windows to Linux
Tested on Ubuntu 16.04 and Windows 10 Redstone 1
Both boxes need to be on the same network (such that multicast packets can be passed between them)
Installing
Linux
- Setup JACK (easy to do with Cadence)
Windows
- Install JACK and ASIO Bridge on the Windows box
- Run
regsvr32 32bits\JackRouter.dllandregsvr32 64bits\JackRouter.dllfrom JACK installation directory- Modify
32bits\JackRouter.iniand64bits\JackRouter.inito match your channel and sample config- (Optional) Set the ASIO Bridge (Hi-Fi Audio) input as the default playback device
Running
- Start the netjack2 server on Linux with
jack_load netmanager(probably also possible to add to.jackdrcfor it to autoload)- Run JACK NetDriver on Windows (it's in the Start menu), or
jackd -R -d net- A new device named the hostname of the Windows box should have appeared on the Linux JACK patch panel (Catia if you're using Cadence). Connect it as you see fit (Note: Channels might not match up as expected if you have more than 2).
- Run ASIO Bridge (also in the Start menu), turn ASIO on, and set the ASIO device to JackRouter
- The ASIO Bridge should have automatically set up routes to the system device in the Windows JACK patch panel. You can double check with qjackctl (Jack Control in the Start menu) → Connections and connect them if not
A really simple solution with minimal software is to stream audio using VLC as RTP server and setting up a RTP source in pulseaudio.
1I've altered a program found on internet and created WLStream. It enables you to stream audio from a Windows output device so Pulse Audio will be able to play it back on a Linux host. The communication between the two is done with plink from Putty. There's a delay in the audio stream caused by the network, I'm sure if you alter the privilege on the TCP packet sent from plink or change your router's configuration as you would for VOIP it'll reduce the audio's stream lag but my research didn't go any further. WLStream can be compiled using Visual Studio 2017 and there's a pre-compiled from the last version here.