Closed CliffS closed 9 years ago
require('sox-stream')
does not return a stream; it returns a constructor to make a stream.
Your example above should work.
Ah, sorry, I must have misread the documentation. I didn't spot any reference to new
.
That's fine. There aren't any references to new
, because I am using a closure rather than a prototype.
If you want you can use new
with sox-stream
.
var Sox = require('sox-stream')
var sox = new Sox({ ... })
I think the documentation should be a bit clearer on how to construct the stream.
I'll leave this issue open until I fix the docs.
In order to convert a bunch of objects, a paradigm like
where
sox
is a duplex stream.Otherwise multiple calls to
require('sox-stream');
are going to return the same stream.