Skip to content

Commit

Permalink
Don't close the input stream on overflow.
Browse files Browse the repository at this point in the history
Fixes this issue: Streampunk#34
  • Loading branch information
martinblech authored Nov 17, 2019
1 parent 8e946eb commit a473ef2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ function AudioIO(options) {
audioIOAdon.read(size, (err, buf) => {
if (err)
process.nextTick(() => ioStream.emit('error', err));
ioStream.push(buf);
if (buf && buf.length < size)
ioStream.push(null);
ioStream.push(buf);
});
};

Expand Down

0 comments on commit a473ef2

Please sign in to comment.