Skip to content

Commit 0305c21

Browse files
authored
Merge pull request #156 from chris-rudmin/serial-fix
Fix serial
2 parents a65895a + c31d955 commit 0305c21

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

dist-unminified/encoderWorker.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/encoderWorker.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opus-recorder",
3-
"version": "4.1.3",
3+
"version": "4.1.4",
44
"description": "A library for recording opus encoded audio",
55
"homepage": "https://github.com/chris-rudmin/opus-recorder",
66
"author": "Chris Rudmin",

src/encoderWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var OggOpusEncoder = function( config, Module ){
4848
numberOfChannels: 1,
4949
originalSampleRate: 44100,
5050
resampleQuality: 3, // Value between 0 and 10 inclusive. 10 being highest quality.
51-
serial: Math.round(Math.random() * 4294967295)
51+
serial: Math.floor(Math.random() * 4294967296)
5252
}, config );
5353

5454
this._opus_encoder_create = Module._opus_encoder_create;

test/encoderWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ describe('encoderWorker', function() {
282282
});
283283

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

288288
global.postMessage = function(page){

0 commit comments

Comments
 (0)