Comparing version 0.0.6 to 0.0.7
@@ -0,1 +1,10 @@ | ||
0.0.7 / 2013-01-14 | ||
================== | ||
- wait for the `format` event on pipe'd Readable instances | ||
- default the lowWaterMark and highWaterMark to 0 | ||
- rename _opts() to _format() | ||
- package: allow any "readable-stream" version | ||
- add a few more debug calls | ||
0.0.6 / 2012-12-15 | ||
@@ -2,0 +11,0 @@ ================== |
20
index.js
@@ -38,7 +38,10 @@ | ||
if (!(this instanceof Speaker)) return new Speaker(opts); | ||
// default lwm and hwm to 0 | ||
if (!opts) opts = {}; | ||
if (null == opts.lowWaterMark) opts.lowWaterMark = 0; | ||
if (null == opts.highWaterMark) opts.highWaterMark = 0; | ||
Writable.call(this, opts); | ||
// set options if provided | ||
if (opts) this._opts(opts); | ||
// chunks are sent over to the backend in "samplesPerFrame * blockAlign" size. | ||
@@ -53,3 +56,5 @@ // this is necessary because if we send too big of chunks at once, then there | ||
// call `flush()` upon the "finish" event | ||
// set PCM format | ||
this._format(opts); | ||
this.on('finish', this._flush); | ||
@@ -106,3 +111,3 @@ this.on('pipe', this._pipe); | ||
Speaker.prototype._opts = function (opts) { | ||
Speaker.prototype._format = function (opts) { | ||
debug('opts(%j)', opts); | ||
@@ -171,4 +176,6 @@ if (null != opts.channels) { | ||
} else if (left) { | ||
debug('still %d bytes left in this chunk', left.length); | ||
write(); | ||
} else { | ||
debug('done with this chunk'); | ||
done(); | ||
@@ -189,3 +196,4 @@ } | ||
debug('_pipe()'); | ||
this._opts(source); | ||
this._format(source); | ||
source.once('format', this._format.bind(this)); | ||
}; | ||
@@ -192,0 +200,0 @@ |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)", | ||
@@ -35,3 +35,3 @@ "repository": { | ||
"debug": "*", | ||
"readable-stream": "~0.0.3" | ||
"readable-stream": "*" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
3403288
387
3
+ Addedabort-controller@3.0.0(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addedevent-target-shim@5.0.1(transitive)
+ Addedevents@3.3.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedreadable-stream@4.7.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
- Removedreadable-stream@0.0.4(transitive)
Updatedreadable-stream@*