Skip to content

Instantly share code, notes, and snippets.

@jlank
Created May 6, 2012 01:11
Show Gist options
  • Save jlank/2606760 to your computer and use it in GitHub Desktop.
Save jlank/2606760 to your computer and use it in GitHub Desktop.
Streaming to stdout
#!/usr/bin/env node
var Audio = require('./lib/audio'),
fs = require('fs'),
argv = require('optimist');
var a = new Audio();
var output = fs.createWriteStream('slow.wav');
var cb = function (err, res) {
if (err) {
console.error(err);
}
else {
res.pipe(process.stdout);
}
}
process.stdin.resume();
a.slowDown({ speed: .5}, process.stdin, cb);
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment