Skip to content

Instantly share code, notes, and snippets.

@brettcvz
Last active December 31, 2015 23:49
Show Gist options
  • Select an option

  • Save brettcvz/8062555 to your computer and use it in GitHub Desktop.

Select an option

Save brettcvz/8062555 to your computer and use it in GitHub Desktop.

Revisions

  1. brettcvz revised this gist Dec 20, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion client.sh
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,4 @@ PID_dump=$!
    sleep 1
    kill -9 $PID_dump
    sleep 1
    nc hopscotch.inkmobility.com 1339 | play -t raw -r 44100 -s -L -b 16 -c 2 -
    nc hopscotch.inkmobility.com 1339 | play --buffer 32 -t raw -r 44100 -s -L -b 16 -c 2 -
  2. brettcvz created this gist Dec 20, 2013.
    2 changes: 2 additions & 0 deletions Server.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    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 &
    9 changes: 9 additions & 0 deletions client.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/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 -t raw -r 44100 -s -L -b 16 -c 2 -