Closed monte-hayward closed 8 years ago
Thanks, good catch. I fixed it and added a test.
Question for you (and @germanattanasio and @jsstylos): What do you expect the stream to output for a silent audio file: no data
events at all, or at least one data
event with an empty string?
(I just copied in your fix which results in no data
events at all but my initial test had it failing still because I copped the previous test but had it expecting an empty string instead of some text - I rewrote the test so that it now will pass either way: it's happy as long as there are no data
events with truthy values.)
UPDATE: I talked to some folks on the #Node.js IRC and they seem to agree that the current solution (no data
events) is preferable.
Oh, and sorry @monte-hayward - I started looking at this after your first commit and didn't realize that you were also working on a test. It looks like yours is going to be more comprehensive than mine, so we'll go ahead and merge it in once you're ready. One of us will just have to deal with the conflicts.
@monte-hayward thanks for your contribution!
Can occur when a pipeline sends a chunk of audio that is silent.