Skip to content

Instantly share code, notes, and snippets.

@windytan
Last active December 17, 2015 10:48
Show Gist options
  • Save windytan/5597022 to your computer and use it in GitHub Desktop.
Save windytan/5597022 to your computer and use it in GitHub Desktop.
open(IN, "sox scrambled.wav -r 8600 -c 1 -t .s16 -|");
open(OUT,"|sox -r 8600 -c 1 -t .s16 - descrambled.wav");
$n = 1;
while (not eof IN) {
read IN, $a, 2;
print OUT pack("s",unpack("s",$a) * $n);
$n *= -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment