Created
May 6, 2012 01:11
-
-
Save jlank/2606760 to your computer and use it in GitHub Desktop.
Streaming to stdout
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
#!/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