Skip to content

Commit

Permalink
Merge pull request #156 from chris-rudmin/serial-fix
Browse files Browse the repository at this point in the history
Fix serial
  • Loading branch information
chris-rudmin authored May 28, 2018
2 parents a65895a + c31d955 commit 0305c21
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist-unminified/encoderWorker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/encoderWorker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opus-recorder",
"version": "4.1.3",
"version": "4.1.4",
"description": "A library for recording opus encoded audio",
"homepage": "https://github.com/chris-rudmin/opus-recorder",
"author": "Chris Rudmin",
Expand Down
2 changes: 1 addition & 1 deletion src/encoderWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var OggOpusEncoder = function( config, Module ){
numberOfChannels: 1,
originalSampleRate: 44100,
resampleQuality: 3, // Value between 0 and 10 inclusive. 10 being highest quality.
serial: Math.round(Math.random() * 4294967295)
serial: Math.floor(Math.random() * 4294967296)
}, config );

this._opus_encoder_create = Module._opus_encoder_create;
Expand Down
2 changes: 1 addition & 1 deletion test/encoderWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ describe('encoderWorker', function() {
});

it('should set serial maximum value as 2^32 - 1', function (done) {
sandbox.stub(Math, 'random').returns(1);
sandbox.stub(Math, 'random').returns(0.9999999999999);
var messageRecieved = false;

global.postMessage = function(page){
Expand Down

0 comments on commit 0305c21

Please sign in to comment.