New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

speaker

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

speaker - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

9

History.md

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc