Comparing version 4.0.0 to 4.0.1
# CHANGELOG | ||
## v4.0.1 (2018-07-02) | ||
- Fix output array size on encode() | ||
- Removed dev files from the dist | ||
## v4.0.0 (2018-07-01) | ||
@@ -4,0 +8,0 @@ - Use typed arrays for input and output |
@@ -95,3 +95,3 @@ 'use strict'; | ||
/** @type {!Uint8Array} */ | ||
let adpcmSamples = new Uint8Array((samples.length)); | ||
let adpcmSamples = new Uint8Array((samples.length / 2) + 512); | ||
/** @type {!Array<number>} */ | ||
@@ -98,0 +98,0 @@ let block = []; |
@@ -91,3 +91,3 @@ /* | ||
/** @type {!Uint8Array} */ | ||
let adpcmSamples = new Uint8Array((samples.length)); | ||
let adpcmSamples = new Uint8Array((samples.length / 2) + 512); | ||
/** @type {!Array<number>} */ | ||
@@ -94,0 +94,0 @@ let block = []; |
@@ -8,3 +8,3 @@ /* | ||
1;a>c&&(b|=2,a-=c,d+=c);c>>=1;a>c&&(b|=1,d+=c);a=b;h=a&8?h-d:h+d;-32768>h?h=-32768:32767<h&&(h=32767);k+=v[a&7];0>k?k=0:88<k&&(k=88);return b}function u(b){var a=0;b&4&&(a+=l);b&2&&(a+=l>>1);b&1&&(a+=l>>2);a+=l>>3;b&8&&(a=-a);e+=a;32767<e?e=32767:-32767>e&&(e=-32767);g+=v[b];0>g?g=0:88<g&&(g=88);l=p[g];return e}var v=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],p=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371, | ||
408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],h=0,k=0,e=0,g=0,l=7;m.encode=function(b){for(var a=new Uint8Array(b.length),c=[],d=0,f=0;f<b.length;f++)0==f%505&&0!=f&&(a.set(q(c),d),d+=256,c=[]),c.push(b[f]);return a};m.decode=function(b,a){a=void 0===a?256:a;for(var c=new Int16Array(2*b.length),d=[],f=0,e=0;e< | ||
b.length;e++)0==e%a&&0!=e&&(c.set(r(d),f),f+=2*a,d=[]),d.push(b[e]);return c};m.encodeBlock=q;m.decodeBlock=r;return m}({}); | ||
408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],h=0,k=0,e=0,g=0,l=7;m.encode=function(b){for(var a=new Uint8Array(b.length/2+512),c=[],d=0,f=0;f<b.length;f++)0==f%505&&0!=f&&(a.set(q(c),d),d+=256,c=[]),c.push(b[f]);return a};m.decode=function(b,a){a=void 0===a?256:a;for(var c=new Int16Array(2*b.length),d=[],f= | ||
0,e=0;e<b.length;e++)0==e%a&&0!=e&&(c.set(r(d),f),f+=2*a,d=[]),d.push(b[e]);return c};m.encodeBlock=q;m.decodeBlock=r;return m}({}); |
@@ -97,3 +97,3 @@ (function (global, factory) { | ||
/** @type {!Uint8Array} */ | ||
let adpcmSamples = new Uint8Array((samples.length)); | ||
let adpcmSamples = new Uint8Array((samples.length / 2) + 512); | ||
/** @type {!Array<number>} */ | ||
@@ -100,0 +100,0 @@ let block = []; |
@@ -96,3 +96,3 @@ /* | ||
/** @type {!Uint8Array} */ | ||
let adpcmSamples = new Uint8Array((samples.length)); | ||
let adpcmSamples = new Uint8Array((samples.length / 2) + 512); | ||
/** @type {!Array<number>} */ | ||
@@ -99,0 +99,0 @@ let block = []; |
{ | ||
"name": "imaadpcm", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "IMA ADPCM codec in JavaScript.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/rochars/imaadpcm", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
51261
12
1293