Purpose

Mainly documenting a few things I don't want to forget. Perhaps it's useful to others as well.

If you came here for FISHWORKS (which I'm pretty sure you didn't), click here

söndag 21 februari 2010

Stream sound from Windows to Linux with LiveInCode and PulseAudio

My OS's: Debian 5.0 Lenny / Windows Vista Home Premium.

Debian 5.0 (Lenny):
1. sudo apt-get install pulseaudio alsa-utils
2. sudo alsamixer -Dhw crank volume, unmute ...
3. pulseaudio --log-target=stderr
4. alsamixer -Dpulse crank, unmute ...


Windows Vista, configure Recording Mixer.:
1. Go to Recording Devices -> Recording.
2. Right click a free area in the recording device list -> mark "Show Disabled Devices"
3. Now enable "Stereo Mix".

Windows Vista, the Levels I chose for minimum distortion.
Click Properties on "Stereo Mix". Choose "Levels". Crank Stereo Mix to 100.
Set the Main output Level to 50.
Next, I jacked a headphone jack (3.5mm) into my laptops headphone outlet in order to physically mute it.

Windows Vista, software:
1. Install Cygwin.
2. Install LineInCode: http://liveincode.rm.pp.ru/
3. Put lineco.exe in your path for simplicity.
4. Launch cygwin, run linco.sh after putting the following in it:

linco.exe --flag-files -B 16 -C 2 -R 48000 | ssh mikaelf@host.internal.example.com "pacat --rate=48000 --playback"

Now all your audio is "routed" to your Linux Machine!
Note: I used SSH public keys for the ssh connection.

Next, wrap the linco.exe line in a while [ 1 ]; do linco ...; sleep 60; done to make it autorestarting in case you lose connection to your sound server.

Things to note:
You might be using 44.1Khz rate all over, make sure you adapt your settings and scripts so the rate matches on both hosts.

References:

Inga kommentarer:

Skicka en kommentar