Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

examples: make mp3player.js example use .pipe() all the way down

  • Loading branch information...
commit cdb5fabf253940a8c400e667d0ef167366490a14 1 parent b2d9ce3
Nathan Rajlich authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 examples/mp3player.js
8 examples/mp3player.js
View
@@ -3,8 +3,6 @@ var lame = require('lame');
var Speaker = require('speaker');
fs.createReadStream(process.argv[2])
- .pipe(new lame.Decoder())
- .on('format', function (format) {
- console.error(format);
- this.pipe(new Speaker(format));
- });
+ .pipe(new lame.Decoder)
+ .on('format', console.log)
+ .pipe(new Speaker);
Please sign in to comment.
Something went wrong with that request. Please try again.