Permalink
Browse files

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

  • Loading branch information...
1 parent b2d9ce3 commit cdb5fabf253940a8c400e667d0ef167366490a14 @TooTallNate committed Mar 7, 2013
Showing with 3 additions and 5 deletions.
  1. +3 −5 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);

0 comments on commit cdb5fab

Please sign in to comment.