Socket
Socket
Sign inDemoInstall

audiolooper

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audiolooper - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

34

dist/audiolooper.js

@@ -19,5 +19,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/
/******/ }
/******/ // Create a new module (and put it into the cache)

@@ -240,15 +240,15 @@ /******/ var module = installedModules[moduleId] = {

if (!isFirstTrack && doProcessing) {
// Prepare buffer!
// Step 1: fade-in + fade-out
for (var channel = 0; channel < audioBuffer.numberOfChannels; channel++) {
var channelData = audioBuffer.getChannelData(channel);
var FADE_LENGTH = 100;
for (var i = 0; i < FADE_LENGTH && i < channelData.length; i++) {
var fadeOutPos = channelData.length - i - 1;
channelData[i] = channelData[i] * i / FADE_LENGTH;
channelData[fadeOutPos] = channelData[fadeOutPos] * i / FADE_LENGTH;
}
// Prepare buffer!
// Step 1: fade-in + fade-out
for (var channel = 0; channel < audioBuffer.numberOfChannels; channel++) {
var channelData = audioBuffer.getChannelData(channel);
var FADE_LENGTH = 100;
for (var i = 0; i < FADE_LENGTH && i < channelData.length; i++) {
var fadeOutPos = channelData.length - i - 1;
channelData[i] = channelData[i] * i / FADE_LENGTH;
channelData[fadeOutPos] = channelData[fadeOutPos] * i / FADE_LENGTH;
}
}
if (!isFirstTrack && doProcessing) {
// Step 2: fit it the first track

@@ -258,2 +258,5 @@ var firstTrackBuffer = this.firstTrack.bufferNode.buffer;

var newAudioBuffer = this.audioCtx.createBuffer(audioBuffer.numberOfChannels, firstTrackBuffer.length * percentualRatio, firstTrackBuffer.sampleRate);
/* console.log(`newAudioBuffer duration: ${ newAudioBuffer.duration }`);
console.log(`oldAudioBuffer duration: ${ audioBuffer.duration }`);
console.log(`firstTrack duration: ${ this.firstTrack.duration }`); */

@@ -265,5 +268,3 @@ // is this even needed or is it enough to:

var channelDataCurrent = audioBuffer.getChannelData(_channel);
for (var _i = 0; _i < channelDataCurrent.length; _i++) {
channelDataNew[_i] = channelDataCurrent[_i];
}
channelDataNew.set(channelDataCurrent, 0);
}

@@ -297,2 +298,3 @@

// const startTrackAt = isFirstTrack ? 0 : track.duration - offset;
bufferNode.start(0, offset);

@@ -299,0 +301,0 @@

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("audiolooper",[],e):"object"==typeof exports?exports.audiolooper=e():t.audiolooper=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=8)}([function(t,e,r){t.exports=!r(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(12),o=r(17),u=r(19),i=Object.defineProperty;e.f=r(0)?Object.defineProperty:function(t,e,r){if(n(t),e=u(e,!0),n(r),o)try{return i(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(9),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=r(6),u=n(o),i=r(7),f=n(i),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new AudioContext;(0,u.default)(this,t),this.pausedTracks=new Map,this.bufferNodes=new Map,this.audioCtx=e}return(0,f.default)(t,[{key:"addTrack",value:function(t){var e=this,r=t.id,n=t.audioBuffer,o=t.doProcessing,u=void 0===o||o,i=t.trackAdded,f=void 0===i?function(){}:i,a=0===this.bufferNodes.size,c=void 0;if(!a&&u){for(var s=0;s<n.numberOfChannels;s++)for(var d=n.getChannelData(s),l=0;l<100&&l<d.length;l++){var p=d.length-l-1;d[l]=d[l]*l/100,d[p]=d[p]*l/100}for(var h=this.firstTrack.bufferNode.buffer,v=Math.ceil(n.length/h.length),y=this.audioCtx.createBuffer(n.numberOfChannels,h.length*v,h.sampleRate),b=0;b<y.numberOfChannels;b++)for(var x=y.getChannelData(b),g=n.getChannelData(b),w=0;w<g.length;w++)x[w]=g[w];c=y}else c=n;var k=this.audioCtx.createBufferSource();k.buffer=c,k.loop=!0;var m={duration:k.buffer.duration,startedAt:this.audioCtx.currentTime,getCurrentTime:function(){return e.audioCtx.currentTime-m.startedAt},bufferNode:k,trackAdded:f};this.bufferNodes.set(r,m),a&&(this.firstTrack=m);var T=this.audioCtx.currentTime-this.firstTrack.startedAt,_=Math.floor(T/this.firstTrack.duration),C=T-_*this.firstTrack.duration;k.start(0,C),f(k)}},{key:"pauseTrack",value:function(t){var e=t.id;if(this.exists(e)){var r=this.bufferNodes.get(e);r.bufferNode.stop(),this.pausedTracks.set(e,r),this.removeTrack({id:e})}}},{key:"playTrack",value:function(t){var e=t.id;if(!this.pausedTracks.has(e))throw new Error("You tried to pause an inexistent track!");var r=this.pausedTracks.get(e),n=r.bufferNode.buffer,o=r.trackAdded;this.addTrack({id:e,audioBuffer:n,doProcessing:!1,trackAdded:o})}},{key:"removeTrack",value:function(t){var e=t.id;if(this.exists(e)){this.bufferNodes.get(e).bufferNode.stop(),this.bufferNodes.delete(e)}}},{key:"getCurrentTime",value:function(t){var e=t.id;if(this.exists(e)){return this.bufferNodes.get(e).getCurrentTime()}throw new Error("You tried to access an inexistent track!")}},{key:"exists",value:function(t){if(!this.bufferNodes.has(t))throw new Error("You tried to access an inexistent track!");return!0}}]),t}();e.default=a},function(t,e,r){t.exports={default:r(10),__esModule:!0}},function(t,e,r){r(20);var n=r(2).Object;t.exports=function(t,e,r){return n.defineProperty(t,e,r)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(1);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(11);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(1),o=r(4).document,u=n(o)&&n(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,r){var n=r(4),o=r(2),u=r(13),i=r(16),f=function(t,e,r){var a,c,s,d=t&f.F,l=t&f.G,p=t&f.S,h=t&f.P,v=t&f.B,y=t&f.W,b=l?o:o[e]||(o[e]={}),x=b.prototype,g=l?n:p?n[e]:(n[e]||{}).prototype;l&&(r=e);for(a in r)(c=!d&&g&&void 0!==g[a])&&a in b||(s=c?g[a]:r[a],b[a]=l&&"function"!=typeof g[a]?r[a]:v&&c?u(s,n):y&&g[a]==s?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(s):h&&"function"==typeof s?u(Function.call,s):s,h&&((b.virtual||(b.virtual={}))[a]=s,t&f.R&&x&&!x[a]&&i(x,a,s)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,e,r){var n=r(5),o=r(18);t.exports=r(0)?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){t.exports=!r(0)&&!r(3)(function(){return 7!=Object.defineProperty(r(14)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(1);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(15);n(n.S+n.F*!r(0),"Object",{defineProperty:r(5).f})}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("audiolooper",[],e):"object"==typeof exports?exports.audiolooper=e():t.audiolooper=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=8)}([function(t,e,r){t.exports=!r(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(12),o=r(17),u=r(19),i=Object.defineProperty;e.f=r(0)?Object.defineProperty:function(t,e,r){if(n(t),e=u(e,!0),n(r),o)try{return i(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(9),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,o.default)(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=r(6),u=n(o),i=r(7),f=n(i),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new AudioContext;(0,u.default)(this,t),this.pausedTracks=new Map,this.bufferNodes=new Map,this.audioCtx=e}return(0,f.default)(t,[{key:"addTrack",value:function(t){for(var e=this,r=t.id,n=t.audioBuffer,o=t.doProcessing,u=void 0===o||o,i=t.trackAdded,f=void 0===i?function(){}:i,a=0===this.bufferNodes.size,c=void 0,s=0;s<n.numberOfChannels;s++)for(var d=n.getChannelData(s),l=0;l<100&&l<d.length;l++){var p=d.length-l-1;d[l]=d[l]*l/100,d[p]=d[p]*l/100}if(!a&&u){for(var h=this.firstTrack.bufferNode.buffer,v=Math.ceil(n.length/h.length),y=this.audioCtx.createBuffer(n.numberOfChannels,h.length*v,h.sampleRate),b=0;b<y.numberOfChannels;b++){var x=y.getChannelData(b),g=n.getChannelData(b);x.set(g,0)}c=y}else c=n;var w=this.audioCtx.createBufferSource();w.buffer=c,w.loop=!0;var k={duration:w.buffer.duration,startedAt:this.audioCtx.currentTime,getCurrentTime:function(){return e.audioCtx.currentTime-k.startedAt},bufferNode:w,trackAdded:f};this.bufferNodes.set(r,k),a&&(this.firstTrack=k);var m=this.audioCtx.currentTime-this.firstTrack.startedAt,T=Math.floor(m/this.firstTrack.duration),_=m-T*this.firstTrack.duration;w.start(0,_),f(w)}},{key:"pauseTrack",value:function(t){var e=t.id;if(this.exists(e)){var r=this.bufferNodes.get(e);r.bufferNode.stop(),this.pausedTracks.set(e,r),this.removeTrack({id:e})}}},{key:"playTrack",value:function(t){var e=t.id;if(!this.pausedTracks.has(e))throw new Error("You tried to pause an inexistent track!");var r=this.pausedTracks.get(e),n=r.bufferNode.buffer,o=r.trackAdded;this.addTrack({id:e,audioBuffer:n,doProcessing:!1,trackAdded:o})}},{key:"removeTrack",value:function(t){var e=t.id;if(this.exists(e)){this.bufferNodes.get(e).bufferNode.stop(),this.bufferNodes.delete(e)}}},{key:"getCurrentTime",value:function(t){var e=t.id;if(this.exists(e)){return this.bufferNodes.get(e).getCurrentTime()}throw new Error("You tried to access an inexistent track!")}},{key:"exists",value:function(t){if(!this.bufferNodes.has(t))throw new Error("You tried to access an inexistent track!");return!0}}]),t}();e.default=a},function(t,e,r){t.exports={default:r(10),__esModule:!0}},function(t,e,r){r(20);var n=r(2).Object;t.exports=function(t,e,r){return n.defineProperty(t,e,r)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(1);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(11);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(1),o=r(4).document,u=n(o)&&n(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,r){var n=r(4),o=r(2),u=r(13),i=r(16),f=function(t,e,r){var a,c,s,d=t&f.F,l=t&f.G,p=t&f.S,h=t&f.P,v=t&f.B,y=t&f.W,b=l?o:o[e]||(o[e]={}),x=b.prototype,g=l?n:p?n[e]:(n[e]||{}).prototype;l&&(r=e);for(a in r)(c=!d&&g&&void 0!==g[a])&&a in b||(s=c?g[a]:r[a],b[a]=l&&"function"!=typeof g[a]?r[a]:v&&c?u(s,n):y&&g[a]==s?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(s):h&&"function"==typeof s?u(Function.call,s):s,h&&((b.virtual||(b.virtual={}))[a]=s,t&f.R&&x&&!x[a]&&i(x,a,s)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,e,r){var n=r(5),o=r(18);t.exports=r(0)?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){t.exports=!r(0)&&!r(3)(function(){return 7!=Object.defineProperty(r(14)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(1);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(15);n(n.S+n.F*!r(0),"Object",{defineProperty:r(5).f})}])});

@@ -19,5 +19,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/
/******/ }
/******/ // Create a new module (and put it into the cache)

@@ -240,15 +240,15 @@ /******/ var module = installedModules[moduleId] = {

if (!isFirstTrack && doProcessing) {
// Prepare buffer!
// Step 1: fade-in + fade-out
for (var channel = 0; channel < audioBuffer.numberOfChannels; channel++) {
var channelData = audioBuffer.getChannelData(channel);
var FADE_LENGTH = 100;
for (var i = 0; i < FADE_LENGTH && i < channelData.length; i++) {
var fadeOutPos = channelData.length - i - 1;
channelData[i] = channelData[i] * i / FADE_LENGTH;
channelData[fadeOutPos] = channelData[fadeOutPos] * i / FADE_LENGTH;
}
// Prepare buffer!
// Step 1: fade-in + fade-out
for (var channel = 0; channel < audioBuffer.numberOfChannels; channel++) {
var channelData = audioBuffer.getChannelData(channel);
var FADE_LENGTH = 100;
for (var i = 0; i < FADE_LENGTH && i < channelData.length; i++) {
var fadeOutPos = channelData.length - i - 1;
channelData[i] = channelData[i] * i / FADE_LENGTH;
channelData[fadeOutPos] = channelData[fadeOutPos] * i / FADE_LENGTH;
}
}
if (!isFirstTrack && doProcessing) {
// Step 2: fit it the first track

@@ -258,2 +258,5 @@ var firstTrackBuffer = this.firstTrack.bufferNode.buffer;

var newAudioBuffer = this.audioCtx.createBuffer(audioBuffer.numberOfChannels, firstTrackBuffer.length * percentualRatio, firstTrackBuffer.sampleRate);
/* console.log(`newAudioBuffer duration: ${ newAudioBuffer.duration }`);
console.log(`oldAudioBuffer duration: ${ audioBuffer.duration }`);
console.log(`firstTrack duration: ${ this.firstTrack.duration }`); */

@@ -265,5 +268,3 @@ // is this even needed or is it enough to:

var channelDataCurrent = audioBuffer.getChannelData(_channel);
for (var _i = 0; _i < channelDataCurrent.length; _i++) {
channelDataNew[_i] = channelDataCurrent[_i];
}
channelDataNew.set(channelDataCurrent, 0);
}

@@ -297,2 +298,3 @@

// const startTrackAt = isFirstTrack ? 0 : track.duration - offset;
bufferNode.start(0, offset);

@@ -299,0 +301,0 @@

{
"name": "audiolooper",
"version": "0.0.9",
"version": "0.0.10",
"description": "AudioLooper - Loop your tracks with automatic synchronization.",

@@ -5,0 +5,0 @@ "main": "dist/audiolooper.js",

@@ -16,15 +16,15 @@ export default class AudioLooper {

if (!isFirstTrack && doProcessing) {
// Prepare buffer!
// Step 1: fade-in + fade-out
for (let channel = 0; channel < audioBuffer.numberOfChannels; channel++) {
const channelData = audioBuffer.getChannelData(channel);
const FADE_LENGTH = 100;
for (let i = 0; i < FADE_LENGTH && i < channelData.length; i++) {
const fadeOutPos = channelData.length - i - 1;
channelData[i] = (channelData[i] * i) / FADE_LENGTH;
channelData[fadeOutPos] = (channelData[fadeOutPos] * i) / FADE_LENGTH;
}
// Prepare buffer!
// Step 1: fade-in + fade-out
for (let channel = 0; channel < audioBuffer.numberOfChannels; channel++) {
const channelData = audioBuffer.getChannelData(channel);
const FADE_LENGTH = 100;
for (let i = 0; i < FADE_LENGTH && i < channelData.length; i++) {
const fadeOutPos = channelData.length - i - 1;
channelData[i] = (channelData[i] * i) / FADE_LENGTH;
channelData[fadeOutPos] = (channelData[fadeOutPos] * i) / FADE_LENGTH;
}
}
if (!isFirstTrack && doProcessing) {
// Step 2: fit it the first track

@@ -34,2 +34,5 @@ const firstTrackBuffer = this.firstTrack.bufferNode.buffer;

const newAudioBuffer = this.audioCtx.createBuffer(audioBuffer.numberOfChannels, firstTrackBuffer.length * percentualRatio, firstTrackBuffer.sampleRate);
/* console.log(`newAudioBuffer duration: ${ newAudioBuffer.duration }`);
console.log(`oldAudioBuffer duration: ${ audioBuffer.duration }`);
console.log(`firstTrack duration: ${ this.firstTrack.duration }`); */

@@ -41,4 +44,3 @@ // is this even needed or is it enough to:

const channelDataCurrent = audioBuffer.getChannelData(channel);
for (let i = 0; i < channelDataCurrent.length; i++)
channelDataNew[i] = channelDataCurrent[i];
channelDataNew.set(channelDataCurrent, 0);
}

@@ -72,2 +74,3 @@

// const startTrackAt = isFirstTrack ? 0 : track.duration - offset;
bufferNode.start(0, offset);

@@ -74,0 +77,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc