@@ -48,7 +48,7 @@ var osc = osc || {};
48
48
var t = new Int8Array ( e ) ;
49
49
return new osc . TextDecoder ( "utf-8" ) . decode ( t ) ;
50
50
} , osc . readString . withBuffer = function ( e ) {
51
- return Buffer . from ? Buffer . from ( e ) . toString ( "utf-8" ) : new Buffer ( e ) . toString ( "utf-8" ) ;
51
+ return Buffer . from ( e ) . toString ( "utf-8" ) ;
52
52
} , osc . writeString = function ( e ) {
53
53
for ( var t = e + "\0" , r = t . length , n = new Uint8Array ( r + 3 & - 4 ) , i = 0 ; i < t . length ; i ++ ) {
54
54
var s = t . charCodeAt ( i ) ;
@@ -388,7 +388,7 @@ var osc = osc || {};
388
388
if ( e < 0 ) return c ;
389
389
if ( a <= e ) return A ;
390
390
} else {
391
- if ( e <= - u ) return B ;
391
+ if ( e <= - u ) return P ;
392
392
if ( u <= e + 1 ) return E ;
393
393
}
394
394
return e < 0 ? l ( - e , t ) . neg ( ) : p ( e % i | 0 , e / i | 0 , t ) ;
@@ -441,18 +441,18 @@ var osc = osc || {};
441
441
n . MAX_VALUE = E ;
442
442
var A = p ( - 1 , - 1 , ! 0 ) ;
443
443
n . MAX_UNSIGNED_VALUE = A ;
444
- var B = p ( 0 , - 2147483648 , ! 1 ) ;
445
- n . MIN_VALUE = B ;
446
- var P = n . prototype ;
447
- P . toInt = function ( ) {
444
+ var P = p ( 0 , - 2147483648 , ! 1 ) ;
445
+ n . MIN_VALUE = P ;
446
+ var B = n . prototype ;
447
+ B . toInt = function ( ) {
448
448
return this . unsigned ? this . low >>> 0 : this . low ;
449
- } , P . toNumber = function ( ) {
449
+ } , B . toNumber = function ( ) {
450
450
return this . unsigned ? ( this . high >>> 0 ) * i + ( this . low >>> 0 ) : this . high * i + ( this . low >>> 0 ) ;
451
- } , P . toString = function ( e ) {
451
+ } , B . toString = function ( e ) {
452
452
if ( ( e = e || 10 ) < 2 || 36 < e ) throw RangeError ( "radix" ) ;
453
453
if ( this . isZero ( ) ) return "0" ;
454
454
if ( this . isNegative ( ) ) {
455
- if ( this . eq ( B ) ) {
455
+ if ( this . eq ( P ) ) {
456
456
var t = l ( e ) , r = this . div ( t ) , n = r . mul ( t ) . sub ( this ) ;
457
457
return r . toString ( e ) + n . toInt ( ) . toString ( e ) ;
458
458
}
@@ -464,67 +464,67 @@ var osc = osc || {};
464
464
for ( ; u . length < 6 ; ) u = "0" + u ;
465
465
o = "" + u + o ;
466
466
}
467
- } , P . getHighBits = function ( ) {
467
+ } , B . getHighBits = function ( ) {
468
468
return this . high ;
469
- } , P . getHighBitsUnsigned = function ( ) {
469
+ } , B . getHighBitsUnsigned = function ( ) {
470
470
return this . high >>> 0 ;
471
- } , P . getLowBits = function ( ) {
471
+ } , B . getLowBits = function ( ) {
472
472
return this . low ;
473
- } , P . getLowBitsUnsigned = function ( ) {
473
+ } , B . getLowBitsUnsigned = function ( ) {
474
474
return this . low >>> 0 ;
475
- } , P . getNumBitsAbs = function ( ) {
476
- if ( this . isNegative ( ) ) return this . eq ( B ) ? 64 : this . neg ( ) . getNumBitsAbs ( ) ;
475
+ } , B . getNumBitsAbs = function ( ) {
476
+ if ( this . isNegative ( ) ) return this . eq ( P ) ? 64 : this . neg ( ) . getNumBitsAbs ( ) ;
477
477
for ( var e = 0 != this . high ? this . high : this . low , t = 31 ; 0 < t && 0 == ( e & 1 << t ) ; t -- ) ;
478
478
return 0 != this . high ? t + 33 : t + 1 ;
479
- } , P . isZero = function ( ) {
479
+ } , B . isZero = function ( ) {
480
480
return 0 === this . high && 0 === this . low ;
481
- } , P . eqz = P . isZero , P . isNegative = function ( ) {
481
+ } , B . eqz = B . isZero , B . isNegative = function ( ) {
482
482
return ! this . unsigned && this . high < 0 ;
483
- } , P . isPositive = function ( ) {
483
+ } , B . isPositive = function ( ) {
484
484
return this . unsigned || 0 <= this . high ;
485
- } , P . isOdd = function ( ) {
485
+ } , B . isOdd = function ( ) {
486
486
return 1 == ( 1 & this . low ) ;
487
- } , P . isEven = function ( ) {
487
+ } , B . isEven = function ( ) {
488
488
return 0 == ( 1 & this . low ) ;
489
- } , P . equals = function ( e ) {
489
+ } , B . equals = function ( e ) {
490
490
return g ( e ) || ( e = v ( e ) ) , ( this . unsigned === e . unsigned || this . high >>> 31 != 1 || e . high >>> 31 != 1 ) && this . high === e . high && this . low === e . low ;
491
- } , P . eq = P . equals , P . notEquals = function ( e ) {
491
+ } , B . eq = B . equals , B . notEquals = function ( e ) {
492
492
return ! this . eq ( e ) ;
493
- } , P . neq = P . notEquals , P . ne = P . notEquals , P . lessThan = function ( e ) {
493
+ } , B . neq = B . notEquals , B . ne = B . notEquals , B . lessThan = function ( e ) {
494
494
return this . comp ( e ) < 0 ;
495
- } , P . lt = P . lessThan , P . lessThanOrEqual = function ( e ) {
495
+ } , B . lt = B . lessThan , B . lessThanOrEqual = function ( e ) {
496
496
return this . comp ( e ) <= 0 ;
497
- } , P . lte = P . lessThanOrEqual , P . le = P . lessThanOrEqual , P . greaterThan = function ( e ) {
497
+ } , B . lte = B . lessThanOrEqual , B . le = B . lessThanOrEqual , B . greaterThan = function ( e ) {
498
498
return 0 < this . comp ( e ) ;
499
- } , P . gt = P . greaterThan , P . greaterThanOrEqual = function ( e ) {
499
+ } , B . gt = B . greaterThan , B . greaterThanOrEqual = function ( e ) {
500
500
return 0 <= this . comp ( e ) ;
501
- } , P . gte = P . greaterThanOrEqual , P . ge = P . greaterThanOrEqual , P . compare = function ( e ) {
501
+ } , B . gte = B . greaterThanOrEqual , B . ge = B . greaterThanOrEqual , B . compare = function ( e ) {
502
502
if ( g ( e ) || ( e = v ( e ) ) , this . eq ( e ) ) return 0 ;
503
503
var t = this . isNegative ( ) , r = e . isNegative ( ) ;
504
504
return t && ! r ? - 1 : ! t && r ? 1 : this . unsigned ? e . high >>> 0 > this . high >>> 0 || e . high === this . high && e . low >>> 0 > this . low >>> 0 ? - 1 : 1 : this . sub ( e ) . isNegative ( ) ? - 1 : 1 ;
505
- } , P . comp = P . compare , P . negate = function ( ) {
506
- return ! this . unsigned && this . eq ( B ) ? B : this . not ( ) . add ( d ) ;
507
- } , P . neg = P . negate , P . add = function ( e ) {
505
+ } , B . comp = B . compare , B . negate = function ( ) {
506
+ return ! this . unsigned && this . eq ( P ) ? P : this . not ( ) . add ( d ) ;
507
+ } , B . neg = B . negate , B . add = function ( e ) {
508
508
g ( e ) || ( e = v ( e ) ) ;
509
509
var t = this . high >>> 16 , r = 65535 & this . high , n = this . low >>> 16 , i = 65535 & this . low , s = e . high >>> 16 , o = 65535 & e . high , a = e . low >>> 16 , u = 0 , c = 0 , h = 0 , f = 0 ;
510
510
return h += ( f += i + ( 65535 & e . low ) ) >>> 16 , c += ( h += n + a ) >>> 16 , u += ( c += r + o ) >>> 16 ,
511
511
u += t + s , p ( ( h &= 65535 ) << 16 | ( f &= 65535 ) , ( u &= 65535 ) << 16 | ( c &= 65535 ) , this . unsigned ) ;
512
- } , P . subtract = function ( e ) {
512
+ } , B . subtract = function ( e ) {
513
513
return g ( e ) || ( e = v ( e ) ) , this . add ( e . neg ( ) ) ;
514
- } , P . sub = P . subtract , P . multiply = function ( e ) {
514
+ } , B . sub = B . subtract , B . multiply = function ( e ) {
515
515
if ( this . isZero ( ) ) return m ;
516
516
if ( g ( e ) || ( e = v ( e ) ) , y ) return p ( y . mul ( this . low , this . high , e . low , e . high ) , y . get_high ( ) , this . unsigned ) ;
517
517
if ( e . isZero ( ) ) return m ;
518
- if ( this . eq ( B ) ) return e . isOdd ( ) ? B : m ;
519
- if ( e . eq ( B ) ) return this . isOdd ( ) ? B : m ;
518
+ if ( this . eq ( P ) ) return e . isOdd ( ) ? P : m ;
519
+ if ( e . eq ( P ) ) return this . isOdd ( ) ? P : m ;
520
520
if ( this . isNegative ( ) ) return e . isNegative ( ) ? this . neg ( ) . mul ( e . neg ( ) ) : this . neg ( ) . mul ( e ) . neg ( ) ;
521
521
if ( e . isNegative ( ) ) return this . mul ( e . neg ( ) ) . neg ( ) ;
522
522
if ( this . lt ( w ) && e . lt ( w ) ) return l ( this . toNumber ( ) * e . toNumber ( ) , this . unsigned ) ;
523
523
var t = this . high >>> 16 , r = 65535 & this . high , n = this . low >>> 16 , i = 65535 & this . low , s = e . high >>> 16 , o = 65535 & e . high , a = e . low >>> 16 , u = 65535 & e . low , c = 0 , h = 0 , f = 0 , d = 0 ;
524
524
return f += ( d += i * u ) >>> 16 , h += ( f += n * u ) >>> 16 , f &= 65535 , h += ( f += i * a ) >>> 16 ,
525
525
c += ( h += r * u ) >>> 16 , h &= 65535 , c += ( h += n * a ) >>> 16 , h &= 65535 , c += ( h += i * o ) >>> 16 ,
526
526
c += t * u + r * a + n * o + i * s , p ( ( f &= 65535 ) << 16 | ( d &= 65535 ) , ( c &= 65535 ) << 16 | ( h &= 65535 ) , this . unsigned ) ;
527
- } , P . mul = P . multiply , P . divide = function ( e ) {
527
+ } , B . mul = B . multiply , B . divide = function ( e ) {
528
528
if ( g ( e ) || ( e = v ( e ) ) , e . isZero ( ) ) throw Error ( "division by zero" ) ;
529
529
if ( y ) return this . unsigned || - 2147483648 !== this . high || - 1 !== e . low || - 1 !== e . high ? p ( ( this . unsigned ? y . div_u : y . div_s ) ( this . low , this . high , e . low , e . high ) , y . get_high ( ) , this . unsigned ) : this ;
530
530
if ( this . isZero ( ) ) return this . unsigned ? c : m ;
@@ -534,9 +534,9 @@ var osc = osc || {};
534
534
if ( e . gt ( this . shru ( 1 ) ) ) return b ;
535
535
n = c ;
536
536
} else {
537
- if ( this . eq ( B ) ) return e . eq ( d ) || e . eq ( S ) ? B : e . eq ( B ) ? d : ( t = this . shr ( 1 ) . div ( e ) . shl ( 1 ) ) . eq ( m ) ? e . isNegative ( ) ? d : S : ( r = this . sub ( e . mul ( t ) ) ,
537
+ if ( this . eq ( P ) ) return e . eq ( d ) || e . eq ( S ) ? P : e . eq ( P ) ? d : ( t = this . shr ( 1 ) . div ( e ) . shl ( 1 ) ) . eq ( m ) ? e . isNegative ( ) ? d : S : ( r = this . sub ( e . mul ( t ) ) ,
538
538
n = t . add ( r . div ( e ) ) ) ;
539
- if ( e . eq ( B ) ) return this . unsigned ? c : m ;
539
+ if ( e . eq ( P ) ) return this . unsigned ? c : m ;
540
540
if ( this . isNegative ( ) ) return e . isNegative ( ) ? this . neg ( ) . div ( e . neg ( ) ) : this . neg ( ) . div ( e ) . neg ( ) ;
541
541
if ( e . isNegative ( ) ) return this . div ( e . neg ( ) ) . neg ( ) ;
542
542
n = m ;
@@ -547,34 +547,34 @@ var osc = osc || {};
547
547
o . isZero ( ) && ( o = d ) , n = n . add ( o ) , r = r . sub ( a ) ;
548
548
}
549
549
return n ;
550
- } , P . div = P . divide , P . modulo = function ( e ) {
550
+ } , B . div = B . divide , B . modulo = function ( e ) {
551
551
return g ( e ) || ( e = v ( e ) ) , y ? p ( ( this . unsigned ? y . rem_u : y . rem_s ) ( this . low , this . high , e . low , e . high ) , y . get_high ( ) , this . unsigned ) : this . sub ( this . div ( e ) . mul ( e ) ) ;
552
- } , P . mod = P . modulo , P . rem = P . modulo , P . not = function ( ) {
552
+ } , B . mod = B . modulo , B . rem = B . modulo , B . not = function ( ) {
553
553
return p ( ~ this . low , ~ this . high , this . unsigned ) ;
554
- } , P . and = function ( e ) {
554
+ } , B . and = function ( e ) {
555
555
return g ( e ) || ( e = v ( e ) ) , p ( this . low & e . low , this . high & e . high , this . unsigned ) ;
556
- } , P . or = function ( e ) {
556
+ } , B . or = function ( e ) {
557
557
return g ( e ) || ( e = v ( e ) ) , p ( this . low | e . low , this . high | e . high , this . unsigned ) ;
558
- } , P . xor = function ( e ) {
558
+ } , B . xor = function ( e ) {
559
559
return g ( e ) || ( e = v ( e ) ) , p ( this . low ^ e . low , this . high ^ e . high , this . unsigned ) ;
560
- } , P . shiftLeft = function ( e ) {
560
+ } , B . shiftLeft = function ( e ) {
561
561
return g ( e ) && ( e = e . toInt ( ) ) , 0 == ( e &= 63 ) ? this : e < 32 ? p ( this . low << e , this . high << e | this . low >>> 32 - e , this . unsigned ) : p ( 0 , this . low << e - 32 , this . unsigned ) ;
562
- } , P . shl = P . shiftLeft , P . shiftRight = function ( e ) {
562
+ } , B . shl = B . shiftLeft , B . shiftRight = function ( e ) {
563
563
return g ( e ) && ( e = e . toInt ( ) ) , 0 == ( e &= 63 ) ? this : e < 32 ? p ( this . low >>> e | this . high << 32 - e , this . high >> e , this . unsigned ) : p ( this . high >> e - 32 , 0 <= this . high ? 0 : - 1 , this . unsigned ) ;
564
- } , P . shr = P . shiftRight , P . shiftRightUnsigned = function ( e ) {
564
+ } , B . shr = B . shiftRight , B . shiftRightUnsigned = function ( e ) {
565
565
if ( g ( e ) && ( e = e . toInt ( ) ) , 0 == ( e &= 63 ) ) return this ;
566
566
var t = this . high ;
567
567
return e < 32 ? p ( this . low >>> e | t << 32 - e , t >>> e , this . unsigned ) : p ( 32 === e ? t : t >>> e - 32 , 0 , this . unsigned ) ;
568
- } , P . shru = P . shiftRightUnsigned , P . shr_u = P . shiftRightUnsigned , P . toSigned = function ( ) {
568
+ } , B . shru = B . shiftRightUnsigned , B . shr_u = B . shiftRightUnsigned , B . toSigned = function ( ) {
569
569
return this . unsigned ? p ( this . low , this . high , ! 1 ) : this ;
570
- } , P . toUnsigned = function ( ) {
570
+ } , B . toUnsigned = function ( ) {
571
571
return this . unsigned ? this : p ( this . low , this . high , ! 0 ) ;
572
- } , P . toBytes = function ( e ) {
572
+ } , B . toBytes = function ( e ) {
573
573
return e ? this . toBytesLE ( ) : this . toBytesBE ( ) ;
574
- } , P . toBytesLE = function ( ) {
574
+ } , B . toBytesLE = function ( ) {
575
575
var e = this . high , t = this . low ;
576
576
return [ 255 & t , t >>> 8 & 255 , t >>> 16 & 255 , t >>> 24 , 255 & e , e >>> 8 & 255 , e >>> 16 & 255 , e >>> 24 ] ;
577
- } , P . toBytesBE = function ( ) {
577
+ } , B . toBytesBE = function ( ) {
578
578
var e = this . high , t = this . low ;
579
579
return [ e >>> 24 , e >>> 16 & 255 , e >>> 8 & 255 , 255 & e , t >>> 24 , t >>> 16 & 255 , t >>> 8 & 255 , 255 & t ] ;
580
580
} , n . fromBytes = function ( e , t , r ) {
0 commit comments