Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ addons:
language: node_js

node_js:
- "0.10"
- "0.12"
- "3.2"
- "4"
- "5"
- "6"
- "7"

Expand Down
2 changes: 1 addition & 1 deletion lib/decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Decoder.prototype._transform = function (chunk, encoding, done) {
}

function read () {
out = new Buffer(safe_buffer);
out = Buffer.alloc(safe_buffer);
binding.mpg123_read(mh, out, out.length, afterRead);
// XXX: the `afterRead` function below holds the reference to the "out"
// buffer while being filled by `mpg123_read()` on the thread pool.
Expand Down
4 changes: 2 additions & 2 deletions lib/encoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Encoder.prototype._transform = function (chunk, encoding, done) {
var num_samples = chunk.length / this.blockAlign;
// TODO: Use better calculation logic from lame.h here
var estimated_size = 1.25 * num_samples + 7200;
var output = new Buffer(estimated_size);
var output = Buffer.alloc(estimated_size);
debug('encoding %d byte chunk with %d byte output buffer (%d samples)', chunk.length, output.length, num_samples);


Expand Down Expand Up @@ -204,7 +204,7 @@ Encoder.prototype._flush = function (done) {

var self = this;
var estimated_size = 7200; // value specified in lame.h
var output = new Buffer(estimated_size);
var output = Buffer.alloc(estimated_size);

if (!this._initCalled) {
try { this._init(); } catch (e) { return done(e); }
Expand Down
Loading