Last active
December 31, 2015 23:49
-
-
Save brettcvz/8062555 to your computer and use it in GitHub Desktop.
Audio streaming teleportation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
command -v play >/dev/null 2>&1 || { echo >&2 "I require 'play' but it's not installed. Install it using 'brew install sox' or 'sudo apt-get install sox'. Aborting."; exit 1;} | |
nc hopscotch.inkmobility.com 1339 > /dev/null & | |
PID_dump=$! | |
sleep 1 | |
kill -9 $PID_dump | |
sleep 1 | |
nc hopscotch.inkmobility.com 1339 | play --buffer 32 -t raw -r 44100 -s -L -b 16 -c 2 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pacat -r -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | ncat -k --send-only -l -p 1337 > server_output.txt & | |
ssh -R 1339:localhost:1337 hopscotch.inkmobility.com & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment