Skip to content

Instantly share code, notes, and snippets.

@kotarou3
Last active August 19, 2024 19:04
Show Gist options
  • Save kotarou3/3813bbf7833a0e4618f7fbe8a377872d to your computer and use it in GitHub Desktop.
Save kotarou3/3813bbf7833a0e4618f7fbe8a377872d to your computer and use it in GitHub Desktop.

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

  1. Setup JACK (easy to do with Cadence)

Windows

  1. Install JACK and ASIO Bridge on the Windows box
  2. Run regsvr32 32bits\JackRouter.dll and regsvr32 64bits\JackRouter.dll from JACK installation directory
  3. Modify 32bits\JackRouter.ini and 64bits\JackRouter.ini to match your channel and sample config
  4. (Optional) Set the ASIO Bridge (Hi-Fi Audio) input as the default playback device

Running

  1. Start the netjack2 server on Linux with jack_load netmanager (probably also possible to add to .jackdrc for it to autoload)
  2. Run JACK NetDriver on Windows (it's in the Start menu), or jackd -R -d net
  3. 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).
  4. Run ASIO Bridge (also in the Start menu), turn ASIO on, and set the ASIO device to JackRouter
  5. 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

Note: Volume control does not work on the ASIO Bridge. You will have to adjust individual application's volumes instead to control volume from Windows.

You can test the result via the Sound control panel → Configure

See attached image for what my patch panel configuration ended up looking like for my 7.1 setup

Reducing Latency

  1. Lower the buffer size on the Linux JACK from the default of 1024 samples (128 worked for me)
  2. Use the -l option for JACK NetDriver on Windows (-l2 worked for me)
  3. Lower the ASIO Bridge latency (2048 samples worked for me)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment