├── .eslintrc.json ├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE ├── index.js ├── package-lock.json ├── package.json ├── process.md ├── readme.md ├── test.js └── todo.md /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true, 5 | "commonjs": true, 6 | "es6": true 7 | }, 8 | "extends": "eslint:recommended", 9 | "rules": { 10 | "strict": 2, 11 | "indent": 0, 12 | "linebreak-style": 0, 13 | "quotes": 0, 14 | "semi": 0, 15 | "no-cond-assign": 1, 16 | "no-constant-condition": 1, 17 | "no-duplicate-case": 1, 18 | "no-empty": 1, 19 | "no-ex-assign": 1, 20 | "no-extra-boolean-cast": 1, 21 | "no-extra-semi": 1, 22 | "no-fallthrough": 1, 23 | "no-func-assign": 1, 24 | "no-global-assign": 1, 25 | "no-implicit-globals": 2, 26 | "no-inner-declarations": ["error", "functions"], 27 | "no-irregular-whitespace": 2, 28 | "no-loop-func": 1, 29 | "no-magic-numbers": ["warn", { "ignore": [1, 0, -1], "ignoreArrayIndexes": true}], 30 | "no-multi-str": 1, 31 | "no-mixed-spaces-and-tabs": 1, 32 | "no-proto": 1, 33 | "no-sequences": 1, 34 | "no-throw-literal": 1, 35 | "no-unmodified-loop-condition": 1, 36 | "no-useless-call": 1, 37 | "no-void": 1, 38 | "no-with": 2, 39 | "wrap-iife": 1, 40 | "no-redeclare": 1, 41 | "no-unused-vars": ["error", { "vars": "all", "args": "none" }], 42 | "no-sparse-arrays": 1 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | //this will affect all the git repos 2 | git config --global core.excludesfile ~/.gitignore 3 | 4 | 5 | //update files since .ignore won't if already tracked 6 | git rm --cached 7 | 8 | # Compiled source # 9 | ################### 10 | *.com 11 | *.class 12 | *.dll 13 | *.exe 14 | *.o 15 | *.so 16 | 17 | # Packages # 18 | ############ 19 | # it's better to unpack these files and commit the raw source 20 | # git has its own built in compression methods 21 | *.7z 22 | *.dmg 23 | *.gz 24 | *.iso 25 | *.jar 26 | *.rar 27 | *.tar 28 | *.zip 29 | 30 | # Logs and databases # 31 | ###################### 32 | *.log 33 | *.sql 34 | *.sqlite 35 | 36 | # OS generated files # 37 | ###################### 38 | .DS_Store 39 | .DS_Store? 40 | ._* 41 | .Spotlight-V100 42 | .Trashes 43 | # Icon? 44 | ehthumbs.db 45 | Thumbs.db 46 | .cache 47 | .project 48 | .settings 49 | .tmproj 50 | *.esproj 51 | nbproject 52 | 53 | # Numerous always-ignore extensions # 54 | ##################################### 55 | *.diff 56 | *.err 57 | *.orig 58 | *.rej 59 | *.swn 60 | *.swo 61 | *.swp 62 | *.vi 63 | *~ 64 | *.sass-cache 65 | *.grunt 66 | *.tmp 67 | 68 | # Dreamweaver added files # 69 | ########################### 70 | _notes 71 | dwsync.xml 72 | 73 | # Komodo # 74 | ########################### 75 | *.komodoproject 76 | .komodotools 77 | 78 | # Node # 79 | ##################### 80 | node_modules 81 | 82 | # Bower # 83 | ##################### 84 | bower_components 85 | 86 | # Folders to ignore # 87 | ##################### 88 | .hg 89 | .svn 90 | .CVS 91 | intermediate 92 | publish 93 | .idea 94 | .graphics 95 | _test 96 | _archive 97 | uploads 98 | tmp 99 | 100 | # Vim files to ignore # 101 | ####################### 102 | .VimballRecord 103 | .netrwhist 104 | 105 | bundle.* 106 | 107 | _demo -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | benchmark.js 2 | bundle.js 3 | test.* 4 | *.md 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 'node' 5 | - '6' 6 | - '5' 7 | - '4' 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2018 Dima Yv 3 | 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * AudioBufferList class 3 | */ 4 | 5 | import util from 'audio-buffer-utils' 6 | 7 | export default AudioBufferList 8 | 9 | // @constructor 10 | function AudioBufferList(arg, options) { 11 | if (arg?.constructor === Object && !options) options = arg, arg = null 12 | 13 | if (!(this instanceof AudioBufferList)) return new AudioBufferList(arg, options) 14 | 15 | if (typeof options === 'number') { 16 | options = {channels: options} 17 | } 18 | if (options && options.channels != null) options.numberOfChannels = options.channels 19 | 20 | Object.assign(this, options) 21 | 22 | this.buffers = [] 23 | this.length = 0 24 | this.duration = 0 25 | 26 | this.append(arg) 27 | } 28 | 29 | 30 | //AudioBuffer interface 31 | AudioBufferList.prototype.numberOfChannels = 1 32 | AudioBufferList.prototype.sampleRate = null 33 | 34 | 35 | //copy from channel into destination array 36 | AudioBufferList.prototype.copyFromChannel = function (destination, channel, from, to) { 37 | if (from == null) from = 0 38 | if (to == null) to = this.length 39 | from = nidx(from, this.length) 40 | to = nidx(to, this.length) 41 | 42 | var fromOffset = this.offset(from) 43 | var bufOffset = from - fromOffset[1] 44 | var initialOffset = from 45 | var toOffset = this.offset(to) 46 | 47 | if (fromOffset[0] === toOffset[0]) { 48 | var buf = this.buffers[fromOffset[0]] 49 | var data = buf.getChannelData(channel).subarray(fromOffset[1], toOffset[1]) 50 | destination.set(data) 51 | return this 52 | } 53 | 54 | for (var i = fromOffset[0], l = toOffset[0]; i < l; i++) { 55 | var buf = this.buffers[i] 56 | var data = buf.getChannelData(channel) 57 | if (from > bufOffset) data = data.subarray(from - bufOffset) 58 | if (channel < buf.numberOfChannels) { 59 | destination.set(data, Math.max(0, -initialOffset + bufOffset)) 60 | } 61 | bufOffset += buf.length 62 | } 63 | 64 | var lastBuf = this.buffers[toOffset[0]] 65 | if (toOffset[1]) { 66 | destination.set(lastBuf.getChannelData(channel).subarray(0, toOffset[1]), Math.max(0, bufOffset - initialOffset)) 67 | } 68 | 69 | return this 70 | } 71 | 72 | //put data from array to channel 73 | AudioBufferList.prototype.copyToChannel = function (source, channel, from) { 74 | if (from == null) from = 0 75 | from = nidx(from, this.length) 76 | 77 | var offsets = this.offset(from) 78 | var bufOffset = from - offsets[1] 79 | 80 | source = source.subarray(0, this.length - from) 81 | 82 | for (var i = offsets[0], l = this.buffers.length; i < l; i++) { 83 | var buf = this.buffers[i] 84 | var channelData = buf.getChannelData(channel) 85 | if (channel < buf.numberOfChannels) { 86 | var chunk = source.subarray(Math.max(0, bufOffset - from), bufOffset - from + buf.length) 87 | channelData.set(chunk, from > bufOffset ? from : 0); 88 | } 89 | bufOffset += buf.length 90 | } 91 | 92 | return this 93 | } 94 | 95 | 96 | // append buffer to list 97 | AudioBufferList.prototype.append = function (buf) { 98 | if (!buf) return this 99 | 100 | //FIXME: we may want to do resampling/channel mapping here or something 101 | var i = 0 102 | 103 | const appendBuffer = (buf) => { 104 | //update channels count 105 | this.numberOfChannels = !this.buffers.length ? buf.numberOfChannels : Math.max(this.numberOfChannels, buf.numberOfChannels) 106 | this.duration += buf.duration 107 | if (!this.sampleRate) this.sampleRate = buf.sampleRate 108 | 109 | //push buffer 110 | this.buffers.push(buf) 111 | this.length += buf.length 112 | } 113 | 114 | // unwrap argument into individual BufferLists 115 | if (buf instanceof AudioBufferList) { 116 | this.append(buf.buffers) 117 | } 118 | else if (buf.numberOfChannels && buf.length) { 119 | appendBuffer(buf) 120 | } 121 | else if (Array.isArray(buf) && typeof buf[0] !== 'number') { 122 | for (var l = buf.length; i < l; i++) { 123 | this.append(buf[i]) 124 | } 125 | } 126 | //create AudioBuffer from (possibly num) arg 127 | else if (buf) { 128 | buf = util.create(buf, this.numberOfChannels, this.sampleRate) 129 | appendBuffer(buf) 130 | } 131 | 132 | return this 133 | } 134 | 135 | // get offset from ... 136 | AudioBufferList.prototype.offset = function (offset) { 137 | var tot = 0, i = 0, _t 138 | if (offset === 0) return [ 0, 0 ] 139 | for (; i < this.buffers.length; i++) { 140 | _t = tot + this.buffers[i].length 141 | if (offset < _t || i == this.buffers.length - 1) 142 | return [ i, offset - tot ] 143 | tot = _t 144 | } 145 | } 146 | 147 | 148 | 149 | //copy data to destination audio buffer 150 | AudioBufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) { 151 | if (typeof dst === 'number') { 152 | srcEnd = srcStart; 153 | srcStart = dstStart 154 | dstStart = dst; 155 | dst = null; 156 | } 157 | if (srcEnd == null && srcStart != null) { 158 | srcEnd = srcStart 159 | srcStart = dstStart 160 | dstStart = 0 161 | } 162 | 163 | if (typeof srcStart != 'number' || srcStart < 0) srcStart = 0 164 | if (typeof srcEnd != 'number' || srcEnd > this.length) srcEnd = this.length 165 | if (srcStart >= this.length) return dst || util.create({length: 0,sampleRate:this.sampleRate}) 166 | if (srcEnd <= 0) return dst || util.create({length: 0,sampleRate:this.sampleRate}) 167 | 168 | var copy = !!dst 169 | , off = this.offset(srcStart) 170 | , len = srcEnd - srcStart 171 | , bytes = len 172 | , bufoff = (copy && dstStart) || 0 173 | , start = off[1] 174 | , l 175 | , i 176 | 177 | // copy/slice everything 178 | if (srcStart === 0 && srcEnd == this.length) { 179 | if (!copy) { // slice, but full concat if multiple buffers 180 | return this.buffers.length === 1 181 | ? util.slice(this.buffers[0]) 182 | : util.concat(this.buffers) 183 | } 184 | // copy, need to copy individual buffers 185 | for (i = 0; i < this.buffers.length; i++) { 186 | util.copy(this.buffers[i], dst, bufoff) 187 | bufoff += this.buffers[i].length 188 | } 189 | 190 | return dst 191 | } 192 | 193 | // easy, cheap case where it's a subset of one of the buffers 194 | if (bytes <= this.buffers[off[0]].length - start) { 195 | return copy 196 | ? util.copy(util.subbuffer(this.buffers[off[0]], start, start + bytes), dst, dstStart) 197 | : util.slice(this.buffers[off[0]], start, start + bytes) 198 | } 199 | 200 | if (!copy) // a slice, we need something to copy in to 201 | dst = util.create(len, this.numberOfChannels) 202 | 203 | for (i = off[0]; i < this.buffers.length; i++) { 204 | l = this.buffers[i].length - start 205 | 206 | if (bytes > l) { 207 | util.copy(util.subbuffer(this.buffers[i], start), dst, bufoff) 208 | } else { 209 | util.copy(util.subbuffer(this.buffers[i], start, start + bytes), dst, bufoff) 210 | break 211 | } 212 | 213 | bufoff += l 214 | bytes -= l 215 | 216 | if (start) 217 | start = 0 218 | } 219 | 220 | return dst 221 | } 222 | 223 | //create a new list with the same data 224 | AudioBufferList.prototype.clone = function clone (start, end) { 225 | var i = 0, copy = new AudioBufferList(0, this.numberOfChannels), sublist = this.slice(start, end) 226 | 227 | for (; i < sublist.buffers.length; i++) 228 | copy.append(util.clone(sublist.buffers[i])) 229 | 230 | return copy 231 | } 232 | 233 | //do superficial handle 234 | AudioBufferList.prototype.slice = function slice (start, end) { 235 | start = start || 0 236 | end = end == null ? this.length : end 237 | 238 | start = nidx(start, this.length) 239 | end = nidx(end, this.length) 240 | 241 | if (start == end) { 242 | return new AudioBufferList(0, this.numberOfChannels) 243 | } 244 | 245 | var startOffset = this.offset(start) 246 | , endOffset = this.offset(end) 247 | , buffers = this.buffers.slice(startOffset[0], endOffset[0] + 1) 248 | 249 | if (endOffset[1] == 0) { 250 | buffers.pop() 251 | } 252 | else { 253 | buffers[buffers.length-1] = util.subbuffer(buffers[buffers.length-1], 0, endOffset[1]) 254 | } 255 | 256 | if (startOffset[1] != 0) { 257 | buffers[0] = util.subbuffer(buffers[0], startOffset[1]) 258 | } 259 | 260 | return new AudioBufferList(buffers, this.numberOfChannels) 261 | } 262 | 263 | 264 | //clean up 265 | AudioBufferList.prototype.destroy = function destroy () { 266 | this.buffers.length = 0 267 | this.length = 0 268 | this.buffers = null 269 | } 270 | 271 | 272 | //repeat contents N times 273 | AudioBufferList.prototype.repeat = function (times) { 274 | times = Math.floor(times) 275 | if (!times && times !== 0 || !Number.isFinite(times)) throw RangeError('Repeat count must be non-negative number.') 276 | 277 | if (!times) { 278 | this.remove(0, this.length) 279 | return this 280 | } 281 | 282 | if (times === 1) return this 283 | 284 | var data = this 285 | 286 | for (var i = 1; i < times; i++) { 287 | data = new AudioBufferList(data.copy()) 288 | this.append(data) 289 | } 290 | 291 | return this 292 | } 293 | 294 | //insert new buffer/buffers at the offset 295 | AudioBufferList.prototype.insert = function (offset, source) { 296 | if (source == null) { 297 | source = offset 298 | offset = 0 299 | } 300 | 301 | offset = nidx(offset, this.length) 302 | 303 | this.split(offset) 304 | 305 | offset = this.offset(offset) 306 | 307 | //convert any type of source to audio buffer list 308 | source = new AudioBufferList(source) 309 | 310 | this.buffers.splice.apply(this.buffers, [offset[0] + (offset[1] ? 1 : 0), 0].concat(source.buffers)) 311 | 312 | //update params 313 | this.length += source.length 314 | this.duration += source.duration 315 | this.numberOfChannels = Math.max(source.numberOfChannels, this.numberOfChannels) 316 | 317 | return this 318 | } 319 | 320 | //delete N samples from any position 321 | AudioBufferList.prototype.remove = function (offset, count) { 322 | if (!this.length) return null 323 | 324 | if (count == null) { 325 | count = offset 326 | offset = 0 327 | } 328 | if (!count) return this 329 | 330 | if (count < 0) { 331 | count = -count 332 | offset -= count 333 | } 334 | 335 | offset = nidx(offset, this.length) 336 | count = Math.min(this.length - offset, count) 337 | 338 | this.split(offset, offset + count) 339 | 340 | var offsetLeft = this.offset(offset) 341 | var offsetRight = this.offset(offset + count) 342 | 343 | if (offsetRight[1] === this.buffers[offsetRight[0]].length) { 344 | offsetRight[0] += 1 345 | } 346 | 347 | let deleted = this.buffers.splice(offsetLeft[0], offsetRight[0] - offsetLeft[0]) 348 | deleted = new AudioBufferList(deleted, this.numberOfChannels) 349 | 350 | this.length -= deleted.length 351 | this.duration = this.length / this.sampleRate 352 | 353 | return deleted 354 | } 355 | 356 | //return new list via applying fn to each buffer from the indicated range 357 | AudioBufferList.prototype.map = function map (fn, from, to) { 358 | if (typeof from != 'number') from = 0 359 | if (typeof to != 'number') to = this.length 360 | from = nidx(from, this.length) 361 | to = nidx(to, this.length) 362 | 363 | this.split(from, to) 364 | 365 | let fromOffset = this.offset(from) 366 | let toOffset = this.offset(to) 367 | 368 | if (toOffset[1]) { 369 | toOffset[0] += 1 370 | toOffset[1] = 0 371 | } 372 | let offset = from - fromOffset[1] 373 | for (let i = fromOffset[0], l = toOffset[0]; i < l; i++) { 374 | let buf = this.buffers[i] 375 | let res = fn.call(this, buf, i, offset, this.buffers, this) 376 | if (res === false) break 377 | if (res !== undefined) { 378 | this.buffers[i] = res 379 | } 380 | offset += buf.length 381 | } 382 | 383 | this.normalize(); 384 | 385 | return this 386 | } 387 | 388 | // runs map from tail 389 | AudioBufferList.prototype.reverseMap = function (fn, from, to) { 390 | if (typeof from != 'number') from = 0 391 | if (typeof to != 'number') to = this.length 392 | from = nidx(from, this.length) 393 | to = nidx(to, this.length) 394 | 395 | this.split(from, to) 396 | 397 | let fromOffset = this.offset(from) 398 | let toOffset = this.offset(to) 399 | 400 | let offset = to - toOffset[1] 401 | for (let i = toOffset[0], l = fromOffset[0]; i >= l; i--) { 402 | let buf = this.buffers[i] 403 | let res = fn.call(this, buf, i, offset, this.buffers, this) 404 | if (res === false) break 405 | if (res !== undefined) this.buffers[i] = res 406 | offset -= buf.length 407 | } 408 | } 409 | 410 | // remove empty buffers, normalize number of channels, length, duration 411 | AudioBufferList.prototype.normalize = function () { 412 | this.buffers = this.buffers.filter(buf => { 413 | return buf ? !!buf.length : false 414 | }) 415 | 416 | let l = 0 417 | for (let i = 0; i < this.buffers.length; i++) { 418 | this.numberOfChannels = Math.max(this.buffers[i].numberOfChannels, this.numberOfChannels) 419 | l += this.buffers[i].length 420 | } 421 | this.length = l 422 | this.duration = this.length / this.sampleRate 423 | 424 | } 425 | 426 | 427 | //split at the indicated indexes 428 | AudioBufferList.prototype.split = function split () { 429 | let args = arguments; 430 | 431 | for (let i = 0; i < args.length; i++ ) { 432 | let arg = args[i] 433 | if (Array.isArray(arg)) { 434 | this.split.apply(this, arg) 435 | } 436 | else if (typeof arg === 'number') { 437 | let offset = this.offset(arg) 438 | let buf = this.buffers[offset[0]] 439 | 440 | if (offset[1] > 0 && offset[1] < buf.length) { 441 | let left = util.subbuffer(buf, 0, offset[1]) 442 | let right = util.subbuffer(buf, offset[1]) 443 | 444 | this.buffers.splice(offset[0], 1, left, right) 445 | } 446 | } 447 | } 448 | 449 | return this 450 | } 451 | 452 | 453 | //join buffers within the subrange 454 | AudioBufferList.prototype.join = function join (from, to) { 455 | if (from == null) from = 0 456 | if (to == null) to = this.length 457 | 458 | from = nidx(from, this.length) 459 | to = nidx(to, this.length) 460 | 461 | let fromOffset = this.offset(from) 462 | let toOffset = this.offset(to) 463 | 464 | if (toOffset[1]) { 465 | toOffset[0] += 1 466 | toOffset[1] = 0 467 | } 468 | 469 | let bufs = this.buffers.slice(fromOffset[0], toOffset[0]) 470 | 471 | let buf = util.concat(bufs) 472 | 473 | this.buffers.splice.apply(this.buffers, [fromOffset[0], toOffset[0] - fromOffset[0] + (toOffset[1] ? 1 : 0)].concat(buf)) 474 | 475 | return buf 476 | } 477 | 478 | // negative-index package (no need to store as dep) 479 | function nidx (idx, length) { 480 | return idx == null ? 0 : 481 | idx < 0 ? Math.max(idx + length, 0) : 482 | idx > 0 ? Math.min(length, idx) : 483 | Object.is(idx, -0) ? length : 0 484 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "audio-buffer-list", 3 | "version": "5.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "audio-buffer-list", 9 | "version": "5.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "audio-buffer-utils": "^5.1.1" 13 | }, 14 | "devDependencies": { 15 | "tape": "^4.6.3" 16 | } 17 | }, 18 | "node_modules/atob-lite": { 19 | "version": "2.0.0", 20 | "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", 21 | "integrity": "sha512-LEeSAWeh2Gfa2FtlQE1shxQ8zi5F9GHarrGKz08TMdODD5T4eH6BMsvtnhbWZ+XQn+Gb6om/917ucvRu7l7ukw==" 22 | }, 23 | "node_modules/audio-buffer": { 24 | "version": "4.0.4", 25 | "resolved": "https://registry.npmjs.org/audio-buffer/-/audio-buffer-4.0.4.tgz", 26 | "integrity": "sha512-phH+MR3G+N/PO5ZKKxx7HlU6vJwAJFa0+FCaTjr/4lUZU/RCjUTqlk3nMJTRy5+b+6cbx8m//EtwZOVI5Ht9+w==", 27 | "deprecated": "Depends on Web-Audio-API implementation. Use either web-audio-api, web-audio-js or web-audio-engine package.", 28 | "dependencies": { 29 | "audio-context": "^1.0.0" 30 | } 31 | }, 32 | "node_modules/audio-buffer-from": { 33 | "version": "1.1.1", 34 | "resolved": "https://registry.npmjs.org/audio-buffer-from/-/audio-buffer-from-1.1.1.tgz", 35 | "integrity": "sha512-8Wcira24z+26GXDFe7ZFRF1bJm1iWrz8O+XL8iNZxZjxqAPXIoK1IrJiOqStv35ASPbRjG57ZK/T0WO92MDUSg==", 36 | "dependencies": { 37 | "audio-buffer": "^4.0.4", 38 | "audio-context": "^1.0.1", 39 | "audio-format": "^2.0.0", 40 | "is-audio-buffer": "^1.0.11", 41 | "is-plain-obj": "^1.1.0", 42 | "pcm-convert": "^1.6.0", 43 | "pick-by-alias": "^1.2.0", 44 | "string-to-arraybuffer": "^1.0.0" 45 | } 46 | }, 47 | "node_modules/audio-buffer-utils": { 48 | "version": "5.1.2", 49 | "resolved": "https://registry.npmjs.org/audio-buffer-utils/-/audio-buffer-utils-5.1.2.tgz", 50 | "integrity": "sha512-MZEnf8PLnnSwIySffyxG3Q33PwlKHH4r66FZMPUJMDLAtGt8OblzoLcxHInlGZmDqRt1MxYG0Eovn0CpHKsqzg==", 51 | "dependencies": { 52 | "audio-buffer": "^4.0.0", 53 | "audio-buffer-from": "^1.0.0", 54 | "audio-context": "^1.0.0", 55 | "clamp": "^1.0.1", 56 | "is-audio-buffer": "^1.0.8", 57 | "is-browser": "^2.0.1", 58 | "is-buffer": "^2.0.0" 59 | } 60 | }, 61 | "node_modules/audio-context": { 62 | "version": "1.0.3", 63 | "resolved": "https://registry.npmjs.org/audio-context/-/audio-context-1.0.3.tgz", 64 | "integrity": "sha512-RH3/rM74f2ITlohhjgC7oYZVS97wtv/SEjXLCzEinnrIPIDxc39m2aFc6wmdkM0NYRKo1DMleYPMAIbnTRW0eA==", 65 | "deprecated": "Depends on Web-Audio-API implementation. Use either web-audio-api, web-audio-js or web-audio-engine package." 66 | }, 67 | "node_modules/audio-format": { 68 | "version": "2.3.2", 69 | "resolved": "https://registry.npmjs.org/audio-format/-/audio-format-2.3.2.tgz", 70 | "integrity": "sha512-5IA2grZhaVhpGxX6lbJm8VVh/SKQULMXXrFxuiodi0zhzDPRB8BJfieo89AclEQv4bDxZRH4lv06qNnxqkFhKQ==", 71 | "dependencies": { 72 | "is-audio-buffer": "^1.0.11", 73 | "is-buffer": "^1.1.5", 74 | "is-plain-obj": "^1.1.0", 75 | "pick-by-alias": "^1.2.0", 76 | "sample-rate": "^2.0.0" 77 | } 78 | }, 79 | "node_modules/audio-format/node_modules/is-buffer": { 80 | "version": "1.1.6", 81 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 82 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 83 | }, 84 | "node_modules/available-typed-arrays": { 85 | "version": "1.0.5", 86 | "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", 87 | "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", 88 | "dev": true, 89 | "engines": { 90 | "node": ">= 0.4" 91 | }, 92 | "funding": { 93 | "url": "https://github.com/sponsors/ljharb" 94 | } 95 | }, 96 | "node_modules/balanced-match": { 97 | "version": "1.0.2", 98 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 99 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 100 | "dev": true 101 | }, 102 | "node_modules/brace-expansion": { 103 | "version": "1.1.11", 104 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 105 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 106 | "dev": true, 107 | "dependencies": { 108 | "balanced-match": "^1.0.0", 109 | "concat-map": "0.0.1" 110 | } 111 | }, 112 | "node_modules/call-bind": { 113 | "version": "1.0.2", 114 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 115 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 116 | "dev": true, 117 | "dependencies": { 118 | "function-bind": "^1.1.1", 119 | "get-intrinsic": "^1.0.2" 120 | }, 121 | "funding": { 122 | "url": "https://github.com/sponsors/ljharb" 123 | } 124 | }, 125 | "node_modules/clamp": { 126 | "version": "1.0.1", 127 | "resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz", 128 | "integrity": "sha512-kgMuFyE78OC6Dyu3Dy7vcx4uy97EIbVxJB/B0eJ3bUNAkwdNcxYzgKltnyADiYwsR7SEqkkUPsEUT//OVS6XMA==" 129 | }, 130 | "node_modules/concat-map": { 131 | "version": "0.0.1", 132 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 133 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 134 | "dev": true 135 | }, 136 | "node_modules/deep-equal": { 137 | "version": "1.1.1", 138 | "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", 139 | "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", 140 | "dev": true, 141 | "dependencies": { 142 | "is-arguments": "^1.0.4", 143 | "is-date-object": "^1.0.1", 144 | "is-regex": "^1.0.4", 145 | "object-is": "^1.0.1", 146 | "object-keys": "^1.1.1", 147 | "regexp.prototype.flags": "^1.2.0" 148 | }, 149 | "funding": { 150 | "url": "https://github.com/sponsors/ljharb" 151 | } 152 | }, 153 | "node_modules/define-properties": { 154 | "version": "1.1.4", 155 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", 156 | "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", 157 | "dev": true, 158 | "dependencies": { 159 | "has-property-descriptors": "^1.0.0", 160 | "object-keys": "^1.1.1" 161 | }, 162 | "engines": { 163 | "node": ">= 0.4" 164 | }, 165 | "funding": { 166 | "url": "https://github.com/sponsors/ljharb" 167 | } 168 | }, 169 | "node_modules/defined": { 170 | "version": "1.0.1", 171 | "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", 172 | "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", 173 | "dev": true, 174 | "funding": { 175 | "url": "https://github.com/sponsors/ljharb" 176 | } 177 | }, 178 | "node_modules/dotignore": { 179 | "version": "0.1.2", 180 | "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", 181 | "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", 182 | "dev": true, 183 | "dependencies": { 184 | "minimatch": "^3.0.4" 185 | }, 186 | "bin": { 187 | "ignored": "bin/ignored" 188 | } 189 | }, 190 | "node_modules/es-abstract": { 191 | "version": "1.21.0", 192 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.0.tgz", 193 | "integrity": "sha512-GUGtW7eXQay0c+PRq0sGIKSdaBorfVqsCMhGHo4elP7YVqZu9nCZS4UkK4gv71gOWNMra/PaSKD3ao1oWExO0g==", 194 | "dev": true, 195 | "dependencies": { 196 | "call-bind": "^1.0.2", 197 | "es-set-tostringtag": "^2.0.0", 198 | "es-to-primitive": "^1.2.1", 199 | "function-bind": "^1.1.1", 200 | "function.prototype.name": "^1.1.5", 201 | "get-intrinsic": "^1.1.3", 202 | "get-symbol-description": "^1.0.0", 203 | "globalthis": "^1.0.3", 204 | "gopd": "^1.0.1", 205 | "has": "^1.0.3", 206 | "has-property-descriptors": "^1.0.0", 207 | "has-proto": "^1.0.1", 208 | "has-symbols": "^1.0.3", 209 | "internal-slot": "^1.0.4", 210 | "is-array-buffer": "^3.0.0", 211 | "is-callable": "^1.2.7", 212 | "is-negative-zero": "^2.0.2", 213 | "is-regex": "^1.1.4", 214 | "is-shared-array-buffer": "^1.0.2", 215 | "is-string": "^1.0.7", 216 | "is-typed-array": "^1.1.10", 217 | "is-weakref": "^1.0.2", 218 | "object-inspect": "^1.12.2", 219 | "object-keys": "^1.1.1", 220 | "object.assign": "^4.1.4", 221 | "regexp.prototype.flags": "^1.4.3", 222 | "safe-regex-test": "^1.0.0", 223 | "string.prototype.trimend": "^1.0.6", 224 | "string.prototype.trimstart": "^1.0.6", 225 | "typed-array-length": "^1.0.4", 226 | "unbox-primitive": "^1.0.2", 227 | "which-typed-array": "^1.1.9" 228 | }, 229 | "engines": { 230 | "node": ">= 0.4" 231 | }, 232 | "funding": { 233 | "url": "https://github.com/sponsors/ljharb" 234 | } 235 | }, 236 | "node_modules/es-set-tostringtag": { 237 | "version": "2.0.1", 238 | "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", 239 | "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", 240 | "dev": true, 241 | "dependencies": { 242 | "get-intrinsic": "^1.1.3", 243 | "has": "^1.0.3", 244 | "has-tostringtag": "^1.0.0" 245 | }, 246 | "engines": { 247 | "node": ">= 0.4" 248 | } 249 | }, 250 | "node_modules/es-to-primitive": { 251 | "version": "1.2.1", 252 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", 253 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", 254 | "dev": true, 255 | "dependencies": { 256 | "is-callable": "^1.1.4", 257 | "is-date-object": "^1.0.1", 258 | "is-symbol": "^1.0.2" 259 | }, 260 | "engines": { 261 | "node": ">= 0.4" 262 | }, 263 | "funding": { 264 | "url": "https://github.com/sponsors/ljharb" 265 | } 266 | }, 267 | "node_modules/for-each": { 268 | "version": "0.3.3", 269 | "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", 270 | "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", 271 | "dev": true, 272 | "dependencies": { 273 | "is-callable": "^1.1.3" 274 | } 275 | }, 276 | "node_modules/fs.realpath": { 277 | "version": "1.0.0", 278 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 279 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 280 | "dev": true 281 | }, 282 | "node_modules/function-bind": { 283 | "version": "1.1.1", 284 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 285 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 286 | "dev": true 287 | }, 288 | "node_modules/function.prototype.name": { 289 | "version": "1.1.5", 290 | "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", 291 | "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", 292 | "dev": true, 293 | "dependencies": { 294 | "call-bind": "^1.0.2", 295 | "define-properties": "^1.1.3", 296 | "es-abstract": "^1.19.0", 297 | "functions-have-names": "^1.2.2" 298 | }, 299 | "engines": { 300 | "node": ">= 0.4" 301 | }, 302 | "funding": { 303 | "url": "https://github.com/sponsors/ljharb" 304 | } 305 | }, 306 | "node_modules/functions-have-names": { 307 | "version": "1.2.3", 308 | "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", 309 | "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", 310 | "dev": true, 311 | "funding": { 312 | "url": "https://github.com/sponsors/ljharb" 313 | } 314 | }, 315 | "node_modules/get-intrinsic": { 316 | "version": "1.1.3", 317 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", 318 | "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", 319 | "dev": true, 320 | "dependencies": { 321 | "function-bind": "^1.1.1", 322 | "has": "^1.0.3", 323 | "has-symbols": "^1.0.3" 324 | }, 325 | "funding": { 326 | "url": "https://github.com/sponsors/ljharb" 327 | } 328 | }, 329 | "node_modules/get-symbol-description": { 330 | "version": "1.0.0", 331 | "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", 332 | "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", 333 | "dev": true, 334 | "dependencies": { 335 | "call-bind": "^1.0.2", 336 | "get-intrinsic": "^1.1.1" 337 | }, 338 | "engines": { 339 | "node": ">= 0.4" 340 | }, 341 | "funding": { 342 | "url": "https://github.com/sponsors/ljharb" 343 | } 344 | }, 345 | "node_modules/glob": { 346 | "version": "7.2.3", 347 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 348 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 349 | "dev": true, 350 | "dependencies": { 351 | "fs.realpath": "^1.0.0", 352 | "inflight": "^1.0.4", 353 | "inherits": "2", 354 | "minimatch": "^3.1.1", 355 | "once": "^1.3.0", 356 | "path-is-absolute": "^1.0.0" 357 | }, 358 | "engines": { 359 | "node": "*" 360 | }, 361 | "funding": { 362 | "url": "https://github.com/sponsors/isaacs" 363 | } 364 | }, 365 | "node_modules/globalthis": { 366 | "version": "1.0.3", 367 | "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", 368 | "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", 369 | "dev": true, 370 | "dependencies": { 371 | "define-properties": "^1.1.3" 372 | }, 373 | "engines": { 374 | "node": ">= 0.4" 375 | }, 376 | "funding": { 377 | "url": "https://github.com/sponsors/ljharb" 378 | } 379 | }, 380 | "node_modules/gopd": { 381 | "version": "1.0.1", 382 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 383 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 384 | "dev": true, 385 | "dependencies": { 386 | "get-intrinsic": "^1.1.3" 387 | }, 388 | "funding": { 389 | "url": "https://github.com/sponsors/ljharb" 390 | } 391 | }, 392 | "node_modules/has": { 393 | "version": "1.0.3", 394 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 395 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 396 | "dev": true, 397 | "dependencies": { 398 | "function-bind": "^1.1.1" 399 | }, 400 | "engines": { 401 | "node": ">= 0.4.0" 402 | } 403 | }, 404 | "node_modules/has-bigints": { 405 | "version": "1.0.2", 406 | "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", 407 | "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", 408 | "dev": true, 409 | "funding": { 410 | "url": "https://github.com/sponsors/ljharb" 411 | } 412 | }, 413 | "node_modules/has-property-descriptors": { 414 | "version": "1.0.0", 415 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", 416 | "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", 417 | "dev": true, 418 | "dependencies": { 419 | "get-intrinsic": "^1.1.1" 420 | }, 421 | "funding": { 422 | "url": "https://github.com/sponsors/ljharb" 423 | } 424 | }, 425 | "node_modules/has-proto": { 426 | "version": "1.0.1", 427 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 428 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 429 | "dev": true, 430 | "engines": { 431 | "node": ">= 0.4" 432 | }, 433 | "funding": { 434 | "url": "https://github.com/sponsors/ljharb" 435 | } 436 | }, 437 | "node_modules/has-symbols": { 438 | "version": "1.0.3", 439 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 440 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 441 | "dev": true, 442 | "engines": { 443 | "node": ">= 0.4" 444 | }, 445 | "funding": { 446 | "url": "https://github.com/sponsors/ljharb" 447 | } 448 | }, 449 | "node_modules/has-tostringtag": { 450 | "version": "1.0.0", 451 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", 452 | "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", 453 | "dev": true, 454 | "dependencies": { 455 | "has-symbols": "^1.0.2" 456 | }, 457 | "engines": { 458 | "node": ">= 0.4" 459 | }, 460 | "funding": { 461 | "url": "https://github.com/sponsors/ljharb" 462 | } 463 | }, 464 | "node_modules/inflight": { 465 | "version": "1.0.6", 466 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 467 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 468 | "dev": true, 469 | "dependencies": { 470 | "once": "^1.3.0", 471 | "wrappy": "1" 472 | } 473 | }, 474 | "node_modules/inherits": { 475 | "version": "2.0.4", 476 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 477 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 478 | "dev": true 479 | }, 480 | "node_modules/internal-slot": { 481 | "version": "1.0.4", 482 | "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", 483 | "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", 484 | "dev": true, 485 | "dependencies": { 486 | "get-intrinsic": "^1.1.3", 487 | "has": "^1.0.3", 488 | "side-channel": "^1.0.4" 489 | }, 490 | "engines": { 491 | "node": ">= 0.4" 492 | } 493 | }, 494 | "node_modules/is-arguments": { 495 | "version": "1.1.1", 496 | "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", 497 | "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", 498 | "dev": true, 499 | "dependencies": { 500 | "call-bind": "^1.0.2", 501 | "has-tostringtag": "^1.0.0" 502 | }, 503 | "engines": { 504 | "node": ">= 0.4" 505 | }, 506 | "funding": { 507 | "url": "https://github.com/sponsors/ljharb" 508 | } 509 | }, 510 | "node_modules/is-array-buffer": { 511 | "version": "3.0.1", 512 | "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", 513 | "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", 514 | "dev": true, 515 | "dependencies": { 516 | "call-bind": "^1.0.2", 517 | "get-intrinsic": "^1.1.3", 518 | "is-typed-array": "^1.1.10" 519 | }, 520 | "funding": { 521 | "url": "https://github.com/sponsors/ljharb" 522 | } 523 | }, 524 | "node_modules/is-audio-buffer": { 525 | "version": "1.1.0", 526 | "resolved": "https://registry.npmjs.org/is-audio-buffer/-/is-audio-buffer-1.1.0.tgz", 527 | "integrity": "sha512-fmPC/dizJmP4ITCsW5oTQGMJ9wZVE+A/zAe6FQo3XwgERxmXHmm3ON5XkWDAxmyxvsrDmWx3NArpSgamp/59AA==" 528 | }, 529 | "node_modules/is-base64": { 530 | "version": "0.1.0", 531 | "resolved": "https://registry.npmjs.org/is-base64/-/is-base64-0.1.0.tgz", 532 | "integrity": "sha512-WRRyllsGXJM7ZN7gPTCCQ/6wNPTRDwiWdPK66l5sJzcU/oOzcIcRRf0Rux8bkpox/1yjt0F6VJRsQOIG2qz5sg==" 533 | }, 534 | "node_modules/is-bigint": { 535 | "version": "1.0.4", 536 | "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", 537 | "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", 538 | "dev": true, 539 | "dependencies": { 540 | "has-bigints": "^1.0.1" 541 | }, 542 | "funding": { 543 | "url": "https://github.com/sponsors/ljharb" 544 | } 545 | }, 546 | "node_modules/is-boolean-object": { 547 | "version": "1.1.2", 548 | "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", 549 | "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", 550 | "dev": true, 551 | "dependencies": { 552 | "call-bind": "^1.0.2", 553 | "has-tostringtag": "^1.0.0" 554 | }, 555 | "engines": { 556 | "node": ">= 0.4" 557 | }, 558 | "funding": { 559 | "url": "https://github.com/sponsors/ljharb" 560 | } 561 | }, 562 | "node_modules/is-browser": { 563 | "version": "2.1.0", 564 | "resolved": "https://registry.npmjs.org/is-browser/-/is-browser-2.1.0.tgz", 565 | "integrity": "sha512-F5rTJxDQ2sW81fcfOR1GnCXT6sVJC104fCyfj+mjpwNEwaPYSn5fte5jiHmBg3DHsIoL/l8Kvw5VN5SsTRcRFQ==" 566 | }, 567 | "node_modules/is-buffer": { 568 | "version": "2.0.5", 569 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", 570 | "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", 571 | "funding": [ 572 | { 573 | "type": "github", 574 | "url": "https://github.com/sponsors/feross" 575 | }, 576 | { 577 | "type": "patreon", 578 | "url": "https://www.patreon.com/feross" 579 | }, 580 | { 581 | "type": "consulting", 582 | "url": "https://feross.org/support" 583 | } 584 | ], 585 | "engines": { 586 | "node": ">=4" 587 | } 588 | }, 589 | "node_modules/is-callable": { 590 | "version": "1.2.7", 591 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", 592 | "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", 593 | "dev": true, 594 | "engines": { 595 | "node": ">= 0.4" 596 | }, 597 | "funding": { 598 | "url": "https://github.com/sponsors/ljharb" 599 | } 600 | }, 601 | "node_modules/is-core-module": { 602 | "version": "2.11.0", 603 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", 604 | "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", 605 | "dev": true, 606 | "dependencies": { 607 | "has": "^1.0.3" 608 | }, 609 | "funding": { 610 | "url": "https://github.com/sponsors/ljharb" 611 | } 612 | }, 613 | "node_modules/is-date-object": { 614 | "version": "1.0.5", 615 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", 616 | "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", 617 | "dev": true, 618 | "dependencies": { 619 | "has-tostringtag": "^1.0.0" 620 | }, 621 | "engines": { 622 | "node": ">= 0.4" 623 | }, 624 | "funding": { 625 | "url": "https://github.com/sponsors/ljharb" 626 | } 627 | }, 628 | "node_modules/is-negative-zero": { 629 | "version": "2.0.2", 630 | "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", 631 | "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", 632 | "dev": true, 633 | "engines": { 634 | "node": ">= 0.4" 635 | }, 636 | "funding": { 637 | "url": "https://github.com/sponsors/ljharb" 638 | } 639 | }, 640 | "node_modules/is-number-object": { 641 | "version": "1.0.7", 642 | "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", 643 | "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", 644 | "dev": true, 645 | "dependencies": { 646 | "has-tostringtag": "^1.0.0" 647 | }, 648 | "engines": { 649 | "node": ">= 0.4" 650 | }, 651 | "funding": { 652 | "url": "https://github.com/sponsors/ljharb" 653 | } 654 | }, 655 | "node_modules/is-plain-obj": { 656 | "version": "1.1.0", 657 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", 658 | "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", 659 | "engines": { 660 | "node": ">=0.10.0" 661 | } 662 | }, 663 | "node_modules/is-regex": { 664 | "version": "1.1.4", 665 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", 666 | "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", 667 | "dev": true, 668 | "dependencies": { 669 | "call-bind": "^1.0.2", 670 | "has-tostringtag": "^1.0.0" 671 | }, 672 | "engines": { 673 | "node": ">= 0.4" 674 | }, 675 | "funding": { 676 | "url": "https://github.com/sponsors/ljharb" 677 | } 678 | }, 679 | "node_modules/is-shared-array-buffer": { 680 | "version": "1.0.2", 681 | "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", 682 | "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", 683 | "dev": true, 684 | "dependencies": { 685 | "call-bind": "^1.0.2" 686 | }, 687 | "funding": { 688 | "url": "https://github.com/sponsors/ljharb" 689 | } 690 | }, 691 | "node_modules/is-string": { 692 | "version": "1.0.7", 693 | "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", 694 | "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", 695 | "dev": true, 696 | "dependencies": { 697 | "has-tostringtag": "^1.0.0" 698 | }, 699 | "engines": { 700 | "node": ">= 0.4" 701 | }, 702 | "funding": { 703 | "url": "https://github.com/sponsors/ljharb" 704 | } 705 | }, 706 | "node_modules/is-symbol": { 707 | "version": "1.0.4", 708 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", 709 | "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", 710 | "dev": true, 711 | "dependencies": { 712 | "has-symbols": "^1.0.2" 713 | }, 714 | "engines": { 715 | "node": ">= 0.4" 716 | }, 717 | "funding": { 718 | "url": "https://github.com/sponsors/ljharb" 719 | } 720 | }, 721 | "node_modules/is-typed-array": { 722 | "version": "1.1.10", 723 | "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", 724 | "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", 725 | "dev": true, 726 | "dependencies": { 727 | "available-typed-arrays": "^1.0.5", 728 | "call-bind": "^1.0.2", 729 | "for-each": "^0.3.3", 730 | "gopd": "^1.0.1", 731 | "has-tostringtag": "^1.0.0" 732 | }, 733 | "engines": { 734 | "node": ">= 0.4" 735 | }, 736 | "funding": { 737 | "url": "https://github.com/sponsors/ljharb" 738 | } 739 | }, 740 | "node_modules/is-weakref": { 741 | "version": "1.0.2", 742 | "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", 743 | "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", 744 | "dev": true, 745 | "dependencies": { 746 | "call-bind": "^1.0.2" 747 | }, 748 | "funding": { 749 | "url": "https://github.com/sponsors/ljharb" 750 | } 751 | }, 752 | "node_modules/minimatch": { 753 | "version": "3.1.2", 754 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 755 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 756 | "dev": true, 757 | "dependencies": { 758 | "brace-expansion": "^1.1.7" 759 | }, 760 | "engines": { 761 | "node": "*" 762 | } 763 | }, 764 | "node_modules/minimist": { 765 | "version": "1.2.7", 766 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", 767 | "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", 768 | "dev": true, 769 | "funding": { 770 | "url": "https://github.com/sponsors/ljharb" 771 | } 772 | }, 773 | "node_modules/object-assign": { 774 | "version": "4.1.1", 775 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 776 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 777 | "engines": { 778 | "node": ">=0.10.0" 779 | } 780 | }, 781 | "node_modules/object-inspect": { 782 | "version": "1.12.2", 783 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", 784 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", 785 | "dev": true, 786 | "funding": { 787 | "url": "https://github.com/sponsors/ljharb" 788 | } 789 | }, 790 | "node_modules/object-is": { 791 | "version": "1.1.5", 792 | "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", 793 | "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", 794 | "dev": true, 795 | "dependencies": { 796 | "call-bind": "^1.0.2", 797 | "define-properties": "^1.1.3" 798 | }, 799 | "engines": { 800 | "node": ">= 0.4" 801 | }, 802 | "funding": { 803 | "url": "https://github.com/sponsors/ljharb" 804 | } 805 | }, 806 | "node_modules/object-keys": { 807 | "version": "1.1.1", 808 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 809 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 810 | "dev": true, 811 | "engines": { 812 | "node": ">= 0.4" 813 | } 814 | }, 815 | "node_modules/object.assign": { 816 | "version": "4.1.4", 817 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", 818 | "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", 819 | "dev": true, 820 | "dependencies": { 821 | "call-bind": "^1.0.2", 822 | "define-properties": "^1.1.4", 823 | "has-symbols": "^1.0.3", 824 | "object-keys": "^1.1.1" 825 | }, 826 | "engines": { 827 | "node": ">= 0.4" 828 | }, 829 | "funding": { 830 | "url": "https://github.com/sponsors/ljharb" 831 | } 832 | }, 833 | "node_modules/once": { 834 | "version": "1.4.0", 835 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 836 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 837 | "dev": true, 838 | "dependencies": { 839 | "wrappy": "1" 840 | } 841 | }, 842 | "node_modules/path-is-absolute": { 843 | "version": "1.0.1", 844 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 845 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 846 | "dev": true, 847 | "engines": { 848 | "node": ">=0.10.0" 849 | } 850 | }, 851 | "node_modules/path-parse": { 852 | "version": "1.0.7", 853 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 854 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 855 | "dev": true 856 | }, 857 | "node_modules/pcm-convert": { 858 | "version": "1.6.5", 859 | "resolved": "https://registry.npmjs.org/pcm-convert/-/pcm-convert-1.6.5.tgz", 860 | "integrity": "sha512-5CEspU4j8aEQ80AhNbcLfpT0apc93E6endFxahWd4sV70I6PN7LPdz8GoYm/1qr400K9bUVsVA+KxNgbFROZPw==", 861 | "dependencies": { 862 | "audio-format": "^2.3.2", 863 | "is-audio-buffer": "^1.0.11", 864 | "is-buffer": "^1.1.5", 865 | "object-assign": "^4.1.1" 866 | } 867 | }, 868 | "node_modules/pcm-convert/node_modules/is-buffer": { 869 | "version": "1.1.6", 870 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 871 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 872 | }, 873 | "node_modules/pick-by-alias": { 874 | "version": "1.2.0", 875 | "resolved": "https://registry.npmjs.org/pick-by-alias/-/pick-by-alias-1.2.0.tgz", 876 | "integrity": "sha512-ESj2+eBxhGrcA1azgHs7lARG5+5iLakc/6nlfbpjcLl00HuuUOIuORhYXN4D1HfvMSKuVtFQjAlnwi1JHEeDIw==" 877 | }, 878 | "node_modules/regexp.prototype.flags": { 879 | "version": "1.4.3", 880 | "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", 881 | "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", 882 | "dev": true, 883 | "dependencies": { 884 | "call-bind": "^1.0.2", 885 | "define-properties": "^1.1.3", 886 | "functions-have-names": "^1.2.2" 887 | }, 888 | "engines": { 889 | "node": ">= 0.4" 890 | }, 891 | "funding": { 892 | "url": "https://github.com/sponsors/ljharb" 893 | } 894 | }, 895 | "node_modules/resolve": { 896 | "version": "1.22.1", 897 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", 898 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", 899 | "dev": true, 900 | "dependencies": { 901 | "is-core-module": "^2.9.0", 902 | "path-parse": "^1.0.7", 903 | "supports-preserve-symlinks-flag": "^1.0.0" 904 | }, 905 | "bin": { 906 | "resolve": "bin/resolve" 907 | }, 908 | "funding": { 909 | "url": "https://github.com/sponsors/ljharb" 910 | } 911 | }, 912 | "node_modules/resumer": { 913 | "version": "0.0.0", 914 | "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", 915 | "integrity": "sha512-Fn9X8rX8yYF4m81rZCK/5VmrmsSbqS/i3rDLl6ZZHAXgC2nTAx3dhwG8q8odP/RmdLa2YrybDJaAMg+X1ajY3w==", 916 | "dev": true, 917 | "dependencies": { 918 | "through": "~2.3.4" 919 | } 920 | }, 921 | "node_modules/safe-regex-test": { 922 | "version": "1.0.0", 923 | "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", 924 | "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", 925 | "dev": true, 926 | "dependencies": { 927 | "call-bind": "^1.0.2", 928 | "get-intrinsic": "^1.1.3", 929 | "is-regex": "^1.1.4" 930 | }, 931 | "funding": { 932 | "url": "https://github.com/sponsors/ljharb" 933 | } 934 | }, 935 | "node_modules/sample-rate": { 936 | "version": "2.0.1", 937 | "resolved": "https://registry.npmjs.org/sample-rate/-/sample-rate-2.0.1.tgz", 938 | "integrity": "sha512-AIK0vVBiAEObmpJOxQu/WCyklnWGqzTSDII4O7nBo+SJHmfgBUiYhgV/Y3Ohz76gfSlU6R5CIAKggj+nAOLSvg==" 939 | }, 940 | "node_modules/side-channel": { 941 | "version": "1.0.4", 942 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 943 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 944 | "dev": true, 945 | "dependencies": { 946 | "call-bind": "^1.0.0", 947 | "get-intrinsic": "^1.0.2", 948 | "object-inspect": "^1.9.0" 949 | }, 950 | "funding": { 951 | "url": "https://github.com/sponsors/ljharb" 952 | } 953 | }, 954 | "node_modules/string-to-arraybuffer": { 955 | "version": "1.0.2", 956 | "resolved": "https://registry.npmjs.org/string-to-arraybuffer/-/string-to-arraybuffer-1.0.2.tgz", 957 | "integrity": "sha512-DaGZidzi93dwjQen5I2osxR9ERS/R7B1PFyufNMnzhj+fmlDQAc1DSDIJVJhgI8Oq221efIMbABUBdPHDRt43Q==", 958 | "dependencies": { 959 | "atob-lite": "^2.0.0", 960 | "is-base64": "^0.1.0" 961 | } 962 | }, 963 | "node_modules/string.prototype.trim": { 964 | "version": "1.2.7", 965 | "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", 966 | "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", 967 | "dev": true, 968 | "dependencies": { 969 | "call-bind": "^1.0.2", 970 | "define-properties": "^1.1.4", 971 | "es-abstract": "^1.20.4" 972 | }, 973 | "engines": { 974 | "node": ">= 0.4" 975 | }, 976 | "funding": { 977 | "url": "https://github.com/sponsors/ljharb" 978 | } 979 | }, 980 | "node_modules/string.prototype.trimend": { 981 | "version": "1.0.6", 982 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", 983 | "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", 984 | "dev": true, 985 | "dependencies": { 986 | "call-bind": "^1.0.2", 987 | "define-properties": "^1.1.4", 988 | "es-abstract": "^1.20.4" 989 | }, 990 | "funding": { 991 | "url": "https://github.com/sponsors/ljharb" 992 | } 993 | }, 994 | "node_modules/string.prototype.trimstart": { 995 | "version": "1.0.6", 996 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", 997 | "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", 998 | "dev": true, 999 | "dependencies": { 1000 | "call-bind": "^1.0.2", 1001 | "define-properties": "^1.1.4", 1002 | "es-abstract": "^1.20.4" 1003 | }, 1004 | "funding": { 1005 | "url": "https://github.com/sponsors/ljharb" 1006 | } 1007 | }, 1008 | "node_modules/supports-preserve-symlinks-flag": { 1009 | "version": "1.0.0", 1010 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1011 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1012 | "dev": true, 1013 | "engines": { 1014 | "node": ">= 0.4" 1015 | }, 1016 | "funding": { 1017 | "url": "https://github.com/sponsors/ljharb" 1018 | } 1019 | }, 1020 | "node_modules/tape": { 1021 | "version": "4.16.1", 1022 | "resolved": "https://registry.npmjs.org/tape/-/tape-4.16.1.tgz", 1023 | "integrity": "sha512-U4DWOikL5gBYUrlzx+J0oaRedm2vKLFbtA/+BRAXboGWpXO7bMP8ddxlq3Cse2bvXFQ0jZMOj6kk3546mvCdFg==", 1024 | "dev": true, 1025 | "dependencies": { 1026 | "call-bind": "~1.0.2", 1027 | "deep-equal": "~1.1.1", 1028 | "defined": "~1.0.0", 1029 | "dotignore": "~0.1.2", 1030 | "for-each": "~0.3.3", 1031 | "glob": "~7.2.3", 1032 | "has": "~1.0.3", 1033 | "inherits": "~2.0.4", 1034 | "is-regex": "~1.1.4", 1035 | "minimist": "~1.2.6", 1036 | "object-inspect": "~1.12.2", 1037 | "resolve": "~1.22.1", 1038 | "resumer": "~0.0.0", 1039 | "string.prototype.trim": "~1.2.6", 1040 | "through": "~2.3.8" 1041 | }, 1042 | "bin": { 1043 | "tape": "bin/tape" 1044 | }, 1045 | "funding": { 1046 | "url": "https://github.com/sponsors/ljharb" 1047 | } 1048 | }, 1049 | "node_modules/through": { 1050 | "version": "2.3.8", 1051 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1052 | "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", 1053 | "dev": true 1054 | }, 1055 | "node_modules/typed-array-length": { 1056 | "version": "1.0.4", 1057 | "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", 1058 | "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", 1059 | "dev": true, 1060 | "dependencies": { 1061 | "call-bind": "^1.0.2", 1062 | "for-each": "^0.3.3", 1063 | "is-typed-array": "^1.1.9" 1064 | }, 1065 | "funding": { 1066 | "url": "https://github.com/sponsors/ljharb" 1067 | } 1068 | }, 1069 | "node_modules/unbox-primitive": { 1070 | "version": "1.0.2", 1071 | "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", 1072 | "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", 1073 | "dev": true, 1074 | "dependencies": { 1075 | "call-bind": "^1.0.2", 1076 | "has-bigints": "^1.0.2", 1077 | "has-symbols": "^1.0.3", 1078 | "which-boxed-primitive": "^1.0.2" 1079 | }, 1080 | "funding": { 1081 | "url": "https://github.com/sponsors/ljharb" 1082 | } 1083 | }, 1084 | "node_modules/which-boxed-primitive": { 1085 | "version": "1.0.2", 1086 | "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", 1087 | "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", 1088 | "dev": true, 1089 | "dependencies": { 1090 | "is-bigint": "^1.0.1", 1091 | "is-boolean-object": "^1.1.0", 1092 | "is-number-object": "^1.0.4", 1093 | "is-string": "^1.0.5", 1094 | "is-symbol": "^1.0.3" 1095 | }, 1096 | "funding": { 1097 | "url": "https://github.com/sponsors/ljharb" 1098 | } 1099 | }, 1100 | "node_modules/which-typed-array": { 1101 | "version": "1.1.9", 1102 | "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", 1103 | "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", 1104 | "dev": true, 1105 | "dependencies": { 1106 | "available-typed-arrays": "^1.0.5", 1107 | "call-bind": "^1.0.2", 1108 | "for-each": "^0.3.3", 1109 | "gopd": "^1.0.1", 1110 | "has-tostringtag": "^1.0.0", 1111 | "is-typed-array": "^1.1.10" 1112 | }, 1113 | "engines": { 1114 | "node": ">= 0.4" 1115 | }, 1116 | "funding": { 1117 | "url": "https://github.com/sponsors/ljharb" 1118 | } 1119 | }, 1120 | "node_modules/wrappy": { 1121 | "version": "1.0.2", 1122 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1123 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1124 | "dev": true 1125 | } 1126 | }, 1127 | "dependencies": { 1128 | "atob-lite": { 1129 | "version": "2.0.0", 1130 | "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", 1131 | "integrity": "sha512-LEeSAWeh2Gfa2FtlQE1shxQ8zi5F9GHarrGKz08TMdODD5T4eH6BMsvtnhbWZ+XQn+Gb6om/917ucvRu7l7ukw==" 1132 | }, 1133 | "audio-buffer": { 1134 | "version": "4.0.4", 1135 | "resolved": "https://registry.npmjs.org/audio-buffer/-/audio-buffer-4.0.4.tgz", 1136 | "integrity": "sha512-phH+MR3G+N/PO5ZKKxx7HlU6vJwAJFa0+FCaTjr/4lUZU/RCjUTqlk3nMJTRy5+b+6cbx8m//EtwZOVI5Ht9+w==", 1137 | "requires": { 1138 | "audio-context": "^1.0.0" 1139 | } 1140 | }, 1141 | "audio-buffer-from": { 1142 | "version": "1.1.1", 1143 | "resolved": "https://registry.npmjs.org/audio-buffer-from/-/audio-buffer-from-1.1.1.tgz", 1144 | "integrity": "sha512-8Wcira24z+26GXDFe7ZFRF1bJm1iWrz8O+XL8iNZxZjxqAPXIoK1IrJiOqStv35ASPbRjG57ZK/T0WO92MDUSg==", 1145 | "requires": { 1146 | "audio-buffer": "^4.0.4", 1147 | "audio-context": "^1.0.1", 1148 | "audio-format": "^2.0.0", 1149 | "is-audio-buffer": "^1.0.11", 1150 | "is-plain-obj": "^1.1.0", 1151 | "pcm-convert": "^1.6.0", 1152 | "pick-by-alias": "^1.2.0", 1153 | "string-to-arraybuffer": "^1.0.0" 1154 | } 1155 | }, 1156 | "audio-buffer-utils": { 1157 | "version": "5.1.2", 1158 | "resolved": "https://registry.npmjs.org/audio-buffer-utils/-/audio-buffer-utils-5.1.2.tgz", 1159 | "integrity": "sha512-MZEnf8PLnnSwIySffyxG3Q33PwlKHH4r66FZMPUJMDLAtGt8OblzoLcxHInlGZmDqRt1MxYG0Eovn0CpHKsqzg==", 1160 | "requires": { 1161 | "audio-buffer": "^4.0.0", 1162 | "audio-buffer-from": "^1.0.0", 1163 | "audio-context": "^1.0.0", 1164 | "clamp": "^1.0.1", 1165 | "is-audio-buffer": "^1.0.8", 1166 | "is-browser": "^2.0.1", 1167 | "is-buffer": "^2.0.0" 1168 | } 1169 | }, 1170 | "audio-context": { 1171 | "version": "1.0.3", 1172 | "resolved": "https://registry.npmjs.org/audio-context/-/audio-context-1.0.3.tgz", 1173 | "integrity": "sha512-RH3/rM74f2ITlohhjgC7oYZVS97wtv/SEjXLCzEinnrIPIDxc39m2aFc6wmdkM0NYRKo1DMleYPMAIbnTRW0eA==" 1174 | }, 1175 | "audio-format": { 1176 | "version": "2.3.2", 1177 | "resolved": "https://registry.npmjs.org/audio-format/-/audio-format-2.3.2.tgz", 1178 | "integrity": "sha512-5IA2grZhaVhpGxX6lbJm8VVh/SKQULMXXrFxuiodi0zhzDPRB8BJfieo89AclEQv4bDxZRH4lv06qNnxqkFhKQ==", 1179 | "requires": { 1180 | "is-audio-buffer": "^1.0.11", 1181 | "is-buffer": "^1.1.5", 1182 | "is-plain-obj": "^1.1.0", 1183 | "pick-by-alias": "^1.2.0", 1184 | "sample-rate": "^2.0.0" 1185 | }, 1186 | "dependencies": { 1187 | "is-buffer": { 1188 | "version": "1.1.6", 1189 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 1190 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 1191 | } 1192 | } 1193 | }, 1194 | "available-typed-arrays": { 1195 | "version": "1.0.5", 1196 | "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", 1197 | "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", 1198 | "dev": true 1199 | }, 1200 | "balanced-match": { 1201 | "version": "1.0.2", 1202 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1203 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1204 | "dev": true 1205 | }, 1206 | "brace-expansion": { 1207 | "version": "1.1.11", 1208 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1209 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1210 | "dev": true, 1211 | "requires": { 1212 | "balanced-match": "^1.0.0", 1213 | "concat-map": "0.0.1" 1214 | } 1215 | }, 1216 | "call-bind": { 1217 | "version": "1.0.2", 1218 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 1219 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 1220 | "dev": true, 1221 | "requires": { 1222 | "function-bind": "^1.1.1", 1223 | "get-intrinsic": "^1.0.2" 1224 | } 1225 | }, 1226 | "clamp": { 1227 | "version": "1.0.1", 1228 | "resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz", 1229 | "integrity": "sha512-kgMuFyE78OC6Dyu3Dy7vcx4uy97EIbVxJB/B0eJ3bUNAkwdNcxYzgKltnyADiYwsR7SEqkkUPsEUT//OVS6XMA==" 1230 | }, 1231 | "concat-map": { 1232 | "version": "0.0.1", 1233 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1234 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 1235 | "dev": true 1236 | }, 1237 | "deep-equal": { 1238 | "version": "1.1.1", 1239 | "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", 1240 | "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", 1241 | "dev": true, 1242 | "requires": { 1243 | "is-arguments": "^1.0.4", 1244 | "is-date-object": "^1.0.1", 1245 | "is-regex": "^1.0.4", 1246 | "object-is": "^1.0.1", 1247 | "object-keys": "^1.1.1", 1248 | "regexp.prototype.flags": "^1.2.0" 1249 | } 1250 | }, 1251 | "define-properties": { 1252 | "version": "1.1.4", 1253 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", 1254 | "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", 1255 | "dev": true, 1256 | "requires": { 1257 | "has-property-descriptors": "^1.0.0", 1258 | "object-keys": "^1.1.1" 1259 | } 1260 | }, 1261 | "defined": { 1262 | "version": "1.0.1", 1263 | "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", 1264 | "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", 1265 | "dev": true 1266 | }, 1267 | "dotignore": { 1268 | "version": "0.1.2", 1269 | "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", 1270 | "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", 1271 | "dev": true, 1272 | "requires": { 1273 | "minimatch": "^3.0.4" 1274 | } 1275 | }, 1276 | "es-abstract": { 1277 | "version": "1.21.0", 1278 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.0.tgz", 1279 | "integrity": "sha512-GUGtW7eXQay0c+PRq0sGIKSdaBorfVqsCMhGHo4elP7YVqZu9nCZS4UkK4gv71gOWNMra/PaSKD3ao1oWExO0g==", 1280 | "dev": true, 1281 | "requires": { 1282 | "call-bind": "^1.0.2", 1283 | "es-set-tostringtag": "^2.0.0", 1284 | "es-to-primitive": "^1.2.1", 1285 | "function-bind": "^1.1.1", 1286 | "function.prototype.name": "^1.1.5", 1287 | "get-intrinsic": "^1.1.3", 1288 | "get-symbol-description": "^1.0.0", 1289 | "globalthis": "^1.0.3", 1290 | "gopd": "^1.0.1", 1291 | "has": "^1.0.3", 1292 | "has-property-descriptors": "^1.0.0", 1293 | "has-proto": "^1.0.1", 1294 | "has-symbols": "^1.0.3", 1295 | "internal-slot": "^1.0.4", 1296 | "is-array-buffer": "^3.0.0", 1297 | "is-callable": "^1.2.7", 1298 | "is-negative-zero": "^2.0.2", 1299 | "is-regex": "^1.1.4", 1300 | "is-shared-array-buffer": "^1.0.2", 1301 | "is-string": "^1.0.7", 1302 | "is-typed-array": "^1.1.10", 1303 | "is-weakref": "^1.0.2", 1304 | "object-inspect": "^1.12.2", 1305 | "object-keys": "^1.1.1", 1306 | "object.assign": "^4.1.4", 1307 | "regexp.prototype.flags": "^1.4.3", 1308 | "safe-regex-test": "^1.0.0", 1309 | "string.prototype.trimend": "^1.0.6", 1310 | "string.prototype.trimstart": "^1.0.6", 1311 | "typed-array-length": "^1.0.4", 1312 | "unbox-primitive": "^1.0.2", 1313 | "which-typed-array": "^1.1.9" 1314 | } 1315 | }, 1316 | "es-set-tostringtag": { 1317 | "version": "2.0.1", 1318 | "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", 1319 | "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", 1320 | "dev": true, 1321 | "requires": { 1322 | "get-intrinsic": "^1.1.3", 1323 | "has": "^1.0.3", 1324 | "has-tostringtag": "^1.0.0" 1325 | } 1326 | }, 1327 | "es-to-primitive": { 1328 | "version": "1.2.1", 1329 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", 1330 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", 1331 | "dev": true, 1332 | "requires": { 1333 | "is-callable": "^1.1.4", 1334 | "is-date-object": "^1.0.1", 1335 | "is-symbol": "^1.0.2" 1336 | } 1337 | }, 1338 | "for-each": { 1339 | "version": "0.3.3", 1340 | "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", 1341 | "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", 1342 | "dev": true, 1343 | "requires": { 1344 | "is-callable": "^1.1.3" 1345 | } 1346 | }, 1347 | "fs.realpath": { 1348 | "version": "1.0.0", 1349 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1350 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 1351 | "dev": true 1352 | }, 1353 | "function-bind": { 1354 | "version": "1.1.1", 1355 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 1356 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 1357 | "dev": true 1358 | }, 1359 | "function.prototype.name": { 1360 | "version": "1.1.5", 1361 | "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", 1362 | "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", 1363 | "dev": true, 1364 | "requires": { 1365 | "call-bind": "^1.0.2", 1366 | "define-properties": "^1.1.3", 1367 | "es-abstract": "^1.19.0", 1368 | "functions-have-names": "^1.2.2" 1369 | } 1370 | }, 1371 | "functions-have-names": { 1372 | "version": "1.2.3", 1373 | "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", 1374 | "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", 1375 | "dev": true 1376 | }, 1377 | "get-intrinsic": { 1378 | "version": "1.1.3", 1379 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", 1380 | "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", 1381 | "dev": true, 1382 | "requires": { 1383 | "function-bind": "^1.1.1", 1384 | "has": "^1.0.3", 1385 | "has-symbols": "^1.0.3" 1386 | } 1387 | }, 1388 | "get-symbol-description": { 1389 | "version": "1.0.0", 1390 | "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", 1391 | "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", 1392 | "dev": true, 1393 | "requires": { 1394 | "call-bind": "^1.0.2", 1395 | "get-intrinsic": "^1.1.1" 1396 | } 1397 | }, 1398 | "glob": { 1399 | "version": "7.2.3", 1400 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 1401 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 1402 | "dev": true, 1403 | "requires": { 1404 | "fs.realpath": "^1.0.0", 1405 | "inflight": "^1.0.4", 1406 | "inherits": "2", 1407 | "minimatch": "^3.1.1", 1408 | "once": "^1.3.0", 1409 | "path-is-absolute": "^1.0.0" 1410 | } 1411 | }, 1412 | "globalthis": { 1413 | "version": "1.0.3", 1414 | "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", 1415 | "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", 1416 | "dev": true, 1417 | "requires": { 1418 | "define-properties": "^1.1.3" 1419 | } 1420 | }, 1421 | "gopd": { 1422 | "version": "1.0.1", 1423 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 1424 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 1425 | "dev": true, 1426 | "requires": { 1427 | "get-intrinsic": "^1.1.3" 1428 | } 1429 | }, 1430 | "has": { 1431 | "version": "1.0.3", 1432 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 1433 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 1434 | "dev": true, 1435 | "requires": { 1436 | "function-bind": "^1.1.1" 1437 | } 1438 | }, 1439 | "has-bigints": { 1440 | "version": "1.0.2", 1441 | "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", 1442 | "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", 1443 | "dev": true 1444 | }, 1445 | "has-property-descriptors": { 1446 | "version": "1.0.0", 1447 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", 1448 | "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", 1449 | "dev": true, 1450 | "requires": { 1451 | "get-intrinsic": "^1.1.1" 1452 | } 1453 | }, 1454 | "has-proto": { 1455 | "version": "1.0.1", 1456 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 1457 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 1458 | "dev": true 1459 | }, 1460 | "has-symbols": { 1461 | "version": "1.0.3", 1462 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 1463 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 1464 | "dev": true 1465 | }, 1466 | "has-tostringtag": { 1467 | "version": "1.0.0", 1468 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", 1469 | "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", 1470 | "dev": true, 1471 | "requires": { 1472 | "has-symbols": "^1.0.2" 1473 | } 1474 | }, 1475 | "inflight": { 1476 | "version": "1.0.6", 1477 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1478 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 1479 | "dev": true, 1480 | "requires": { 1481 | "once": "^1.3.0", 1482 | "wrappy": "1" 1483 | } 1484 | }, 1485 | "inherits": { 1486 | "version": "2.0.4", 1487 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1488 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1489 | "dev": true 1490 | }, 1491 | "internal-slot": { 1492 | "version": "1.0.4", 1493 | "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", 1494 | "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", 1495 | "dev": true, 1496 | "requires": { 1497 | "get-intrinsic": "^1.1.3", 1498 | "has": "^1.0.3", 1499 | "side-channel": "^1.0.4" 1500 | } 1501 | }, 1502 | "is-arguments": { 1503 | "version": "1.1.1", 1504 | "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", 1505 | "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", 1506 | "dev": true, 1507 | "requires": { 1508 | "call-bind": "^1.0.2", 1509 | "has-tostringtag": "^1.0.0" 1510 | } 1511 | }, 1512 | "is-array-buffer": { 1513 | "version": "3.0.1", 1514 | "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", 1515 | "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", 1516 | "dev": true, 1517 | "requires": { 1518 | "call-bind": "^1.0.2", 1519 | "get-intrinsic": "^1.1.3", 1520 | "is-typed-array": "^1.1.10" 1521 | } 1522 | }, 1523 | "is-audio-buffer": { 1524 | "version": "1.1.0", 1525 | "resolved": "https://registry.npmjs.org/is-audio-buffer/-/is-audio-buffer-1.1.0.tgz", 1526 | "integrity": "sha512-fmPC/dizJmP4ITCsW5oTQGMJ9wZVE+A/zAe6FQo3XwgERxmXHmm3ON5XkWDAxmyxvsrDmWx3NArpSgamp/59AA==" 1527 | }, 1528 | "is-base64": { 1529 | "version": "0.1.0", 1530 | "resolved": "https://registry.npmjs.org/is-base64/-/is-base64-0.1.0.tgz", 1531 | "integrity": "sha512-WRRyllsGXJM7ZN7gPTCCQ/6wNPTRDwiWdPK66l5sJzcU/oOzcIcRRf0Rux8bkpox/1yjt0F6VJRsQOIG2qz5sg==" 1532 | }, 1533 | "is-bigint": { 1534 | "version": "1.0.4", 1535 | "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", 1536 | "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", 1537 | "dev": true, 1538 | "requires": { 1539 | "has-bigints": "^1.0.1" 1540 | } 1541 | }, 1542 | "is-boolean-object": { 1543 | "version": "1.1.2", 1544 | "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", 1545 | "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", 1546 | "dev": true, 1547 | "requires": { 1548 | "call-bind": "^1.0.2", 1549 | "has-tostringtag": "^1.0.0" 1550 | } 1551 | }, 1552 | "is-browser": { 1553 | "version": "2.1.0", 1554 | "resolved": "https://registry.npmjs.org/is-browser/-/is-browser-2.1.0.tgz", 1555 | "integrity": "sha512-F5rTJxDQ2sW81fcfOR1GnCXT6sVJC104fCyfj+mjpwNEwaPYSn5fte5jiHmBg3DHsIoL/l8Kvw5VN5SsTRcRFQ==" 1556 | }, 1557 | "is-buffer": { 1558 | "version": "2.0.5", 1559 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", 1560 | "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" 1561 | }, 1562 | "is-callable": { 1563 | "version": "1.2.7", 1564 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", 1565 | "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", 1566 | "dev": true 1567 | }, 1568 | "is-core-module": { 1569 | "version": "2.11.0", 1570 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", 1571 | "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", 1572 | "dev": true, 1573 | "requires": { 1574 | "has": "^1.0.3" 1575 | } 1576 | }, 1577 | "is-date-object": { 1578 | "version": "1.0.5", 1579 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", 1580 | "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", 1581 | "dev": true, 1582 | "requires": { 1583 | "has-tostringtag": "^1.0.0" 1584 | } 1585 | }, 1586 | "is-negative-zero": { 1587 | "version": "2.0.2", 1588 | "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", 1589 | "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", 1590 | "dev": true 1591 | }, 1592 | "is-number-object": { 1593 | "version": "1.0.7", 1594 | "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", 1595 | "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", 1596 | "dev": true, 1597 | "requires": { 1598 | "has-tostringtag": "^1.0.0" 1599 | } 1600 | }, 1601 | "is-plain-obj": { 1602 | "version": "1.1.0", 1603 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", 1604 | "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==" 1605 | }, 1606 | "is-regex": { 1607 | "version": "1.1.4", 1608 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", 1609 | "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", 1610 | "dev": true, 1611 | "requires": { 1612 | "call-bind": "^1.0.2", 1613 | "has-tostringtag": "^1.0.0" 1614 | } 1615 | }, 1616 | "is-shared-array-buffer": { 1617 | "version": "1.0.2", 1618 | "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", 1619 | "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", 1620 | "dev": true, 1621 | "requires": { 1622 | "call-bind": "^1.0.2" 1623 | } 1624 | }, 1625 | "is-string": { 1626 | "version": "1.0.7", 1627 | "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", 1628 | "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", 1629 | "dev": true, 1630 | "requires": { 1631 | "has-tostringtag": "^1.0.0" 1632 | } 1633 | }, 1634 | "is-symbol": { 1635 | "version": "1.0.4", 1636 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", 1637 | "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", 1638 | "dev": true, 1639 | "requires": { 1640 | "has-symbols": "^1.0.2" 1641 | } 1642 | }, 1643 | "is-typed-array": { 1644 | "version": "1.1.10", 1645 | "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", 1646 | "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", 1647 | "dev": true, 1648 | "requires": { 1649 | "available-typed-arrays": "^1.0.5", 1650 | "call-bind": "^1.0.2", 1651 | "for-each": "^0.3.3", 1652 | "gopd": "^1.0.1", 1653 | "has-tostringtag": "^1.0.0" 1654 | } 1655 | }, 1656 | "is-weakref": { 1657 | "version": "1.0.2", 1658 | "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", 1659 | "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", 1660 | "dev": true, 1661 | "requires": { 1662 | "call-bind": "^1.0.2" 1663 | } 1664 | }, 1665 | "minimatch": { 1666 | "version": "3.1.2", 1667 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1668 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1669 | "dev": true, 1670 | "requires": { 1671 | "brace-expansion": "^1.1.7" 1672 | } 1673 | }, 1674 | "minimist": { 1675 | "version": "1.2.7", 1676 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", 1677 | "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", 1678 | "dev": true 1679 | }, 1680 | "object-assign": { 1681 | "version": "4.1.1", 1682 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1683 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" 1684 | }, 1685 | "object-inspect": { 1686 | "version": "1.12.2", 1687 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", 1688 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", 1689 | "dev": true 1690 | }, 1691 | "object-is": { 1692 | "version": "1.1.5", 1693 | "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", 1694 | "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", 1695 | "dev": true, 1696 | "requires": { 1697 | "call-bind": "^1.0.2", 1698 | "define-properties": "^1.1.3" 1699 | } 1700 | }, 1701 | "object-keys": { 1702 | "version": "1.1.1", 1703 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 1704 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 1705 | "dev": true 1706 | }, 1707 | "object.assign": { 1708 | "version": "4.1.4", 1709 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", 1710 | "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", 1711 | "dev": true, 1712 | "requires": { 1713 | "call-bind": "^1.0.2", 1714 | "define-properties": "^1.1.4", 1715 | "has-symbols": "^1.0.3", 1716 | "object-keys": "^1.1.1" 1717 | } 1718 | }, 1719 | "once": { 1720 | "version": "1.4.0", 1721 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1722 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 1723 | "dev": true, 1724 | "requires": { 1725 | "wrappy": "1" 1726 | } 1727 | }, 1728 | "path-is-absolute": { 1729 | "version": "1.0.1", 1730 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1731 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1732 | "dev": true 1733 | }, 1734 | "path-parse": { 1735 | "version": "1.0.7", 1736 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1737 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1738 | "dev": true 1739 | }, 1740 | "pcm-convert": { 1741 | "version": "1.6.5", 1742 | "resolved": "https://registry.npmjs.org/pcm-convert/-/pcm-convert-1.6.5.tgz", 1743 | "integrity": "sha512-5CEspU4j8aEQ80AhNbcLfpT0apc93E6endFxahWd4sV70I6PN7LPdz8GoYm/1qr400K9bUVsVA+KxNgbFROZPw==", 1744 | "requires": { 1745 | "audio-format": "^2.3.2", 1746 | "is-audio-buffer": "^1.0.11", 1747 | "is-buffer": "^1.1.5", 1748 | "object-assign": "^4.1.1" 1749 | }, 1750 | "dependencies": { 1751 | "is-buffer": { 1752 | "version": "1.1.6", 1753 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 1754 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 1755 | } 1756 | } 1757 | }, 1758 | "pick-by-alias": { 1759 | "version": "1.2.0", 1760 | "resolved": "https://registry.npmjs.org/pick-by-alias/-/pick-by-alias-1.2.0.tgz", 1761 | "integrity": "sha512-ESj2+eBxhGrcA1azgHs7lARG5+5iLakc/6nlfbpjcLl00HuuUOIuORhYXN4D1HfvMSKuVtFQjAlnwi1JHEeDIw==" 1762 | }, 1763 | "regexp.prototype.flags": { 1764 | "version": "1.4.3", 1765 | "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", 1766 | "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", 1767 | "dev": true, 1768 | "requires": { 1769 | "call-bind": "^1.0.2", 1770 | "define-properties": "^1.1.3", 1771 | "functions-have-names": "^1.2.2" 1772 | } 1773 | }, 1774 | "resolve": { 1775 | "version": "1.22.1", 1776 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", 1777 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", 1778 | "dev": true, 1779 | "requires": { 1780 | "is-core-module": "^2.9.0", 1781 | "path-parse": "^1.0.7", 1782 | "supports-preserve-symlinks-flag": "^1.0.0" 1783 | } 1784 | }, 1785 | "resumer": { 1786 | "version": "0.0.0", 1787 | "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", 1788 | "integrity": "sha512-Fn9X8rX8yYF4m81rZCK/5VmrmsSbqS/i3rDLl6ZZHAXgC2nTAx3dhwG8q8odP/RmdLa2YrybDJaAMg+X1ajY3w==", 1789 | "dev": true, 1790 | "requires": { 1791 | "through": "~2.3.4" 1792 | } 1793 | }, 1794 | "safe-regex-test": { 1795 | "version": "1.0.0", 1796 | "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", 1797 | "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", 1798 | "dev": true, 1799 | "requires": { 1800 | "call-bind": "^1.0.2", 1801 | "get-intrinsic": "^1.1.3", 1802 | "is-regex": "^1.1.4" 1803 | } 1804 | }, 1805 | "sample-rate": { 1806 | "version": "2.0.1", 1807 | "resolved": "https://registry.npmjs.org/sample-rate/-/sample-rate-2.0.1.tgz", 1808 | "integrity": "sha512-AIK0vVBiAEObmpJOxQu/WCyklnWGqzTSDII4O7nBo+SJHmfgBUiYhgV/Y3Ohz76gfSlU6R5CIAKggj+nAOLSvg==" 1809 | }, 1810 | "side-channel": { 1811 | "version": "1.0.4", 1812 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1813 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1814 | "dev": true, 1815 | "requires": { 1816 | "call-bind": "^1.0.0", 1817 | "get-intrinsic": "^1.0.2", 1818 | "object-inspect": "^1.9.0" 1819 | } 1820 | }, 1821 | "string-to-arraybuffer": { 1822 | "version": "1.0.2", 1823 | "resolved": "https://registry.npmjs.org/string-to-arraybuffer/-/string-to-arraybuffer-1.0.2.tgz", 1824 | "integrity": "sha512-DaGZidzi93dwjQen5I2osxR9ERS/R7B1PFyufNMnzhj+fmlDQAc1DSDIJVJhgI8Oq221efIMbABUBdPHDRt43Q==", 1825 | "requires": { 1826 | "atob-lite": "^2.0.0", 1827 | "is-base64": "^0.1.0" 1828 | } 1829 | }, 1830 | "string.prototype.trim": { 1831 | "version": "1.2.7", 1832 | "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", 1833 | "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", 1834 | "dev": true, 1835 | "requires": { 1836 | "call-bind": "^1.0.2", 1837 | "define-properties": "^1.1.4", 1838 | "es-abstract": "^1.20.4" 1839 | } 1840 | }, 1841 | "string.prototype.trimend": { 1842 | "version": "1.0.6", 1843 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", 1844 | "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", 1845 | "dev": true, 1846 | "requires": { 1847 | "call-bind": "^1.0.2", 1848 | "define-properties": "^1.1.4", 1849 | "es-abstract": "^1.20.4" 1850 | } 1851 | }, 1852 | "string.prototype.trimstart": { 1853 | "version": "1.0.6", 1854 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", 1855 | "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", 1856 | "dev": true, 1857 | "requires": { 1858 | "call-bind": "^1.0.2", 1859 | "define-properties": "^1.1.4", 1860 | "es-abstract": "^1.20.4" 1861 | } 1862 | }, 1863 | "supports-preserve-symlinks-flag": { 1864 | "version": "1.0.0", 1865 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1866 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1867 | "dev": true 1868 | }, 1869 | "tape": { 1870 | "version": "4.16.1", 1871 | "resolved": "https://registry.npmjs.org/tape/-/tape-4.16.1.tgz", 1872 | "integrity": "sha512-U4DWOikL5gBYUrlzx+J0oaRedm2vKLFbtA/+BRAXboGWpXO7bMP8ddxlq3Cse2bvXFQ0jZMOj6kk3546mvCdFg==", 1873 | "dev": true, 1874 | "requires": { 1875 | "call-bind": "~1.0.2", 1876 | "deep-equal": "~1.1.1", 1877 | "defined": "~1.0.0", 1878 | "dotignore": "~0.1.2", 1879 | "for-each": "~0.3.3", 1880 | "glob": "~7.2.3", 1881 | "has": "~1.0.3", 1882 | "inherits": "~2.0.4", 1883 | "is-regex": "~1.1.4", 1884 | "minimist": "~1.2.6", 1885 | "object-inspect": "~1.12.2", 1886 | "resolve": "~1.22.1", 1887 | "resumer": "~0.0.0", 1888 | "string.prototype.trim": "~1.2.6", 1889 | "through": "~2.3.8" 1890 | } 1891 | }, 1892 | "through": { 1893 | "version": "2.3.8", 1894 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1895 | "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", 1896 | "dev": true 1897 | }, 1898 | "typed-array-length": { 1899 | "version": "1.0.4", 1900 | "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", 1901 | "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", 1902 | "dev": true, 1903 | "requires": { 1904 | "call-bind": "^1.0.2", 1905 | "for-each": "^0.3.3", 1906 | "is-typed-array": "^1.1.9" 1907 | } 1908 | }, 1909 | "unbox-primitive": { 1910 | "version": "1.0.2", 1911 | "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", 1912 | "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", 1913 | "dev": true, 1914 | "requires": { 1915 | "call-bind": "^1.0.2", 1916 | "has-bigints": "^1.0.2", 1917 | "has-symbols": "^1.0.3", 1918 | "which-boxed-primitive": "^1.0.2" 1919 | } 1920 | }, 1921 | "which-boxed-primitive": { 1922 | "version": "1.0.2", 1923 | "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", 1924 | "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", 1925 | "dev": true, 1926 | "requires": { 1927 | "is-bigint": "^1.0.1", 1928 | "is-boolean-object": "^1.1.0", 1929 | "is-number-object": "^1.0.4", 1930 | "is-string": "^1.0.5", 1931 | "is-symbol": "^1.0.3" 1932 | } 1933 | }, 1934 | "which-typed-array": { 1935 | "version": "1.1.9", 1936 | "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", 1937 | "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", 1938 | "dev": true, 1939 | "requires": { 1940 | "available-typed-arrays": "^1.0.5", 1941 | "call-bind": "^1.0.2", 1942 | "for-each": "^0.3.3", 1943 | "gopd": "^1.0.1", 1944 | "has-tostringtag": "^1.0.0", 1945 | "is-typed-array": "^1.1.10" 1946 | } 1947 | }, 1948 | "wrappy": { 1949 | "version": "1.0.2", 1950 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1951 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1952 | "dev": true 1953 | } 1954 | } 1955 | } 1956 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "audio-buffer-list", 3 | "version": "5.0.0", 4 | "description": "Data structure for sequence of AudioBuffers", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "node test", 8 | "test:browser": "budo test" 9 | }, 10 | "type": "module", 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/audiojs/audio-buffer-list" 14 | }, 15 | "keywords": [ 16 | "audio", 17 | "audiojs", 18 | "pcm", 19 | "buffer-list", 20 | "dsp", 21 | "sound", 22 | "processing", 23 | "ndarray", 24 | "ndsamples", 25 | "audio-buffer-list", 26 | "web-audio" 27 | ], 28 | "author": "Dima Yv ", 29 | "license": "MIT", 30 | "bugs": { 31 | "url": "https://github.com/audiojs/audio-buffer-list/issues" 32 | }, 33 | "homepage": "https://github.com/audiojs/audio-buffer-list", 34 | "dependencies": { 35 | "audio-buffer-utils": "^5.1.1" 36 | }, 37 | "devDependencies": { 38 | "tape": "^4.6.3" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /process.md: -------------------------------------------------------------------------------- 1 | 2 | ## Principles 3 | 4 | * It starts being very tempting to just implement WAA-compatible AudioBuffer and fuck all the various audio formats, as it is a fucking headache (see questions). 5 | * It can be thought as a color class for images — a single audio primitive. 6 | * More generally, it is perception frame - a chunk of data from some sensorial area, which can be treated with any possible methods. So these methods are better kept separately, as this is a raw chunk. In fact, any model can be placed on this chunk of data, like color model, fourier analysis, etc. 7 | * The format is unambiguously defines the way to get/set/serialize/parse/etc data. It is the same as color-space in color object. 8 | * The inner storage is always an ArrayBuffer, as far it is the fastest and the most generic object wrapper over the data. Keep only that and avoid everything else. Though there are issues with that. 9 | 10 | 11 | ## Questions 12 | 13 | * Should we get rid of isWAA flag? 14 | * + it makes difficulties for surely creating non-WAA audioBuffers. We can provide always non-WAA version and leave WAA-version up to user. 15 | * - But how then user is supposed to use that buffer for AudioBufferSourceNode? How to convert? 16 | * + Leave that up to audio-buffer-utils, 'from'? 17 | * - But that is shit in browser-usage: `util.from(new AudioBuffer())` instead of simply `new AudioBuffer()`. Only the author will know that `util.from` converts (if possible) to WAAAudioBuffer. Same shit, different place. 18 | * + place `buffer.js`, which is pure polyfill, and create `index.js` with constructor? 19 | * - static properties, like `FloatArray` and `context` mess. 20 | * - `./buffer` and `./` return various buffers, which is bad. 21 | * + create `.from` method, returning pure buffer, and constructor, wrapping it to WAABuffer? 22 | * - misleading functionality for browser users, it is publicly private method. 23 | * + though it is pure method, returning same result, always. 24 | * - we should not let in browser get access publicly to fake-buffer instances. So seems that ass-way via using technical flag `isWAA` is ok. 25 | * Should we transform data from interleaved to planar and from int to float, if the passed format of data is weird? 26 | * - ✔ delegate to pcm-util 27 | * Order of params - AudioBuffer(data, channels?, rate?) or AudioBuffer(channels, data, rate?) 28 | * + first is intuitive, but unnatural if channel number is not passed 29 | * - second is compatible w/spec for `ctx.createBuffer(channels, length, rate)`, though there is no spec on constructor. 30 | * + all buffers have data/len as first argument, so `new AudioBuffer(1024)` is obviously for 1024 samples, stereo (?, but doesnt matter much as mono will work also if default channels = 2). vs `new AudioBuffer(2, 1024)` 31 | * - for ndim array is more obvious to show dimensions `new NDimArray(channels, len)` 32 | * - other implementations, like node-web-audio-api, include `new AudioBuffer(ch, len, rate)` order 33 | * + if already formatted object passed, like other abuffer or separated array, there a contradiction may occur: `new AudioBuffer([[0,1], [2,3]], 3)` - how many channels - 2 or 3? 3, but third is left empty. In case `new AudioBuffer(3, [[0,1], [2,3]])` it is also ok tho, just impossible to infer that number like `new AudioBuffer([[0,1], [2,3]])` → 2 channels. 34 | * Maybe make it compatible for both cases? If (ch, len, rate) - use classic, otherwise - use modern? 35 | * - No, it looks like untaken decision. 36 | * - ✔ As far buffer complies the standard - be standard. AudioBuffer(channels?, data|length, sampleRate) is ok, totally. 37 | * Do we have to extend format, or just mimic WAABuffer? 38 | * + format is useful on outcoding 39 | * - format is not related to buffer, buffer is logical structure, not low-level 40 | * How to transform interleaved int16 (node default) to buffer? 41 | * Just to have toBuffer(format), from(array, format)? 42 | * - interleaved - is the first problematic property. Number type - the second. 43 | * ✔ keep it simple, mimic WAABuffer in node, provide WAABuffer constructor in browser 44 | * Clone passed argument or keep reference to it? 45 | * + With WAAudioBuffer its cool to reference 46 | * - The paradigm (Buffer, TypedArrays) is to clone passed data in constructor 47 | * + But .slice is the opposite - buffer shares memory, array - clones. 48 | * + Passing ArrayBuffer to TypedArray saves reference to it, even possible to share arrayBuffer between various typedArrays 49 | * + Saving reference is fast and useful - just a wrapper for the data 50 | * - Saving reference prevents from garbage-collecting the data, right? 51 | * + As far we have refs on our cloned data - is also keep reference to the memory area, so references are shorter 52 | * ✔ Keeping reference if possible seems to be a good practice 53 | * What is better: keeping data source unchanged and accessing it on any operation or converting it to fast array and then converting back? 54 | * + Converting, handling and converting back seems to be faster than each operation, both for browser/node both for buffer/dataview, 2+ times. In case of avoiding conversion - up to 10 times. 55 | * - Converting unbinds data, which is baaad, we really want to preserve data binding, but when to update source values then? 56 | * What is faster in typical use-cases: sync source data periodically, or per-sample access? Which are typical use-cases? 57 | * Ex: using WAABuffer for output, wee need to write samples ASAP, how - if we get buffer input? 58 | * Using WAA for that is perfect 59 | * Ex: in the chain of nodes we have to process volume of each sample in buffer object. 60 | * Simple WAA 61 | * Ex: calculate FFT in analyserNode from audioBuffer, ASAP. 62 | * getChannelData (instant), create ndarray (should be speedy), use fft (fast). 63 | * ✔ Just polyfill ArrayBuffer, force format to be floating point 64 | * ✘ What is the profit of keeping ndarray wrapper over the raw data? 65 | * - `fill` method is implementable manually quite efficiently 66 | * Use fill method of typedarray beneath 67 | * - ndarray utils can be applicable as `ndmethod(ndarray(buffer.data))` 68 | * + the way to access data without destruction of inner structure 69 | * - requires data wrapper with get/set methods 70 | * ✘ What does it give to us keeping format as a separate property? 71 | * - it isn’t faster on creation, in fact having prototyped these props is faster 72 | * - intuitively, the buffer itself has all properties, not some inner stuff like `.format.shit` 73 | * Is it better to keep data channeled, or single-buffer? 74 | * + channeled is simple to create from WAABuffer 75 | * - but forcing WAAAudioBuffer into some other format anyways requires whether method of preserving data-format separate from our format or converting the data, which unbinds it, which is bad. 76 | * + channeled is simple and fast to access 77 | * - chanelled takes time to convert to/from node buffers, which are stream defaults 78 | * + but it is a bonus on using audio-nodes 79 | * - chanelled is innatural if interleaved = true. 80 | * + it is same innatural to get channel data from such data-storage 81 | * - as far audioBuffer is just a wrapper, it is good to follow ImageData or TypedArray example and keep .data property as plain array. 82 | * + web-audio AudioBuffer innerly keeps data as a vector of typed arrays 83 | 84 | * Think twice. What will audiobuffer give comparing to ndarray, which can’t give ndarray? 85 | * parsing any input argument 86 | * .format property 87 | * type: pcm, 88 | * channels 89 | * interleaved 90 | * fft in ndarrays already 91 | * resampling, reinterleaving - external ndarray methods 92 | * ✔ reading audiobuffer → audio-node task? 93 | * ✔ reading Buffer of a specific format, ie fromPcmFormat 94 | * ✔ toPcmFormat 95 | * audio-util methods: maxSampleRate, minSampleRate 96 | * .duration 97 | * .average 98 | * .toDecibels (different representations) 99 | * .loudness 100 | * .magnitude 101 | * .frequencies 102 | * .mapChannels 103 | * .map 104 | * .volume 105 | * .length (number of samples) 106 | * ndarray gives speed, community and supportability 107 | * ✘ Maybe call it sound? 108 | * + similar to color. 109 | * - for sound there might be other utils, like pulse. Sound is not necessarily the data. 110 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # audio-buffer-list [![Build Status](https://travis-ci.org/audiojs/audio-buffer-list.svg?branch=master)](https://travis-ci.org/audiojs/audio-buffer-list) [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) [![Greenkeeper badge](https://badges.greenkeeper.io/audiojs/audio-buffer-list.svg)](https://greenkeeper.io/) 2 | 3 | Extension of [BufferList](https://npmjs.org/package/bl) for [AudioBuffers](https://npmjs.org/package/audio-buffer). 4 | Handy and performant to deal with (possibly long) sequence of audio buffers − accumulate, read, stream, modify, delete etc. 5 | 6 | ## Usage 7 | 8 | [![npm install audio-buffer-list](https://nodei.co/npm/audio-buffer-list.png?mini=true)](https://npmjs.org/package/audio-buffer-list/) 9 | 10 | ```js 11 | import AudioBufferList from 'audio-buffer-list' 12 | 13 | let abl = new AudioBufferList([ 14 | new AudioBuffer({length: 4, sampleRate: 44100 }), 15 | new AudioBuffer({length: 100, sampleRate: 44100 }) 16 | ]) 17 | 18 | abl.append( 19 | new AudioBuffer({length: 100}) 20 | ) 21 | 22 | abl.length // 204 23 | abl.slice() // 24 | ``` 25 | 26 | ## API 27 | 28 | ### `new AudioBufferList(source, options?)` 29 | 30 | Creates new audio buffer list instance, `new` is not strictly required. 31 | 32 | `source` can be _AudioBuffer_, _AudioBuffer_ array, _AudioBufferList_ or _AudioBufferList_ array. 33 | 34 | `options` may provide `numberOfChannels`, `context` for web audio API context and `sampleRate`. 35 | 36 | The created list instance contains the following properties: 37 | 38 | * `list.buffers` − sequence of audio buffers with actual data. 39 | * `list.length` − total length of list in samples, i.e. sum of inner buffer lengths. 40 | * `list.duration` − total duration of the audio list, i.e. sum of buffers durations. 41 | * `list.numberOfChannels` − detected from the buffer with max number of channels in the list. Can be set by options. 42 | * `list.sampleRate` − just for convenience with _AudioBuffer_ interface. 43 | 44 | 45 | ### `list.append(buffer)` 46 | 47 | Insert new AudioBuffer, AudioBufferList or array of them to the end. 48 | 49 | ### `list.insert(offset=0, buffer)` 50 | 51 | Put new AudioBuffer, AudioBufferList or array of them at the offset. 52 | 53 | ### `list.remove(offset=0, count)` 54 | 55 | Remove number of samples from the list starting at the `offset`. `count` can possibly be negative, then items are removed on the left side from the offset. `offset` can also be negative, meaning to remove from the end. Retuns removed sublist instance. 56 | 57 | 58 | ### `list.slice(start=0, end=-0)` 59 | 60 | Return sublist of the initial list. The data is not copied but returned as subarrays. 61 | 62 | ### `list.map(mapper, from=0, to=-0)` 63 | 64 | Map buffers from the interval defined by `from` and `to` arguments. Modifies list in-place. 65 | 66 | Mapper function has signature `(buffer, idx, offset) => buffer`. `buffer` is an audio buffer to process, `idx` is buffer number, and `offset` is first buffer sample absolute offset. If mapper returns `undefined`, the buffer is preserved. If mapper returns `null`, the buffer is discarded. If mapper returns `false`, iterations are stopped. 67 | 68 | Pass `{reversed: true}` option to walk in reversed order. 69 | 70 | ```js 71 | list = list.map((buf, idx, offset) => { 72 | for (let c = 0; c < channels; c++) { 73 | let data = buf.getChannelData(c) 74 | 75 | //start buffer from the subset may start earlier than the subset 76 | //end buffer from the subset may end later than the subset 77 | for (let i = 0, l = buf.length; i < l; i++) { 78 | data[i] = process(data[i]) 79 | } 80 | } 81 | }, from, to) 82 | ``` 83 | 84 | ### `list.reverseMap(mapper, from=0, to=-0)` 85 | 86 | Same as map, but runs from tail (to break preliminarily). 87 | 88 | ### `list.repeat(count)` 89 | 90 | Repeats contents of the list specified number of times. Modifies list in-place, returns self. 91 | 92 | ### `list.copy(dest?, start=0, end=-0)` 93 | 94 | Put data into destination _AudioBuffer_ or create one. It is like `slice`, but returns an _AudioBuffer_. 95 | 96 | ### `list.copyFromChannel(dest, channel, startInChannel=0, end=-0)` 97 | 98 | Put data from the channel to destination _FloatArray_. Optional `startInChannel` defines offset in the channel to start from. 99 | 100 | ### `list.copyToChannel(src, channel, startInChannel=0, end=-0)` 101 | 102 | Put data from the source _FloatArray_ into channel, optionally starting at `startInChannel` offset. 103 | 104 | ### `list.split([a, b, c, ...], d, e, ...)` 105 | 106 | Split list at the indicated indexes. That increases number of inner buffers. 107 | 108 | ### `list.join(start=0, end=-0)` 109 | 110 | Joins buffers from the indicated range. Returns an AudioBuffer with joined data. 111 | 112 | ### `list.offset(idx)` 113 | 114 | Return `[bufIdx, offset]` pair for any sample number. `bufIdx` is the number of buffer in the list, `offset` is sample offset inside of that buffer. 115 | 116 | ### `list.destroy()` 117 | 118 | Clean up list. 119 | 120 | 121 | ## See also 122 | 123 | * [audio-buffer-utils](https://github.com/audio-buffer-utils) — toolset for audio buffers. 124 | * [buffer-list](https://npmjs.org/package/bl) — canonical BufferList implementation. 125 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import t from 'tape' 2 | import AudioBufferList from './index.js' 3 | import util from 'audio-buffer-utils' 4 | 5 | 6 | function getChannelData(list, channel, from, to) { 7 | if (from == null) from = 0 8 | if (to == null) to = list.length 9 | let arr = new Float32Array(to - from) 10 | list.copyFromChannel(arr, channel, from, to) 11 | return Array.from(arr) 12 | } 13 | 14 | t('create with options argument', t => { 15 | var a = new AudioBufferList({channels: 3}) 16 | 17 | t.equal(a.length, 0) 18 | t.equal(a.channels, 3) 19 | 20 | t.end() 21 | }) 22 | 23 | t('create with sample rate', t => { 24 | var a = new AudioBufferList(0, {sampleRate: 70000}) 25 | a.append(70000) 26 | 27 | t.equal(a.duration, 1) 28 | t.equal(a.numberOfChannels, 1) 29 | 30 | t.end() 31 | }) 32 | 33 | //new methods 34 | t('repeat', t => { 35 | var a = new AudioBufferList(util.create(10, 2)) 36 | a.repeat(0) 37 | t.equal(a.length, 0) 38 | 39 | var b = new AudioBufferList(util.create(10, 2)) 40 | b.repeat(1) 41 | t.equal(b.length, 10) 42 | 43 | var c = new AudioBufferList(util.create(10, 2)) 44 | c.repeat(2) 45 | t.equal(c.length, 20) 46 | 47 | let d = new AudioBufferList(2, 2).repeat(4) 48 | t.equal(d.numberOfChannels, 2) 49 | t.equal(d.length, 8) 50 | 51 | t.end() 52 | }) 53 | 54 | t('full map', t => { 55 | let list = new AudioBufferList([util.fill(util.create(2, 2), 1), util.fill(util.create(2, 2), 0)]) 56 | 57 | let dest = list.map((b, idx) => { 58 | return util.fill(b, idx) 59 | }) 60 | 61 | t.deepEqual(getChannelData(dest, 0), Array(2).fill(0).concat(Array(2).fill(1))) 62 | t.deepEqual(getChannelData(dest, 1), Array(2).fill(0).concat(Array(2).fill(1))) 63 | 64 | t.end() 65 | }) 66 | 67 | t('each last elem', t => { 68 | let list = new AudioBufferList([0, 1, 2, 3, 4]) 69 | 70 | let c = 0 71 | list.map(b => { 72 | c++ 73 | }, 1, 3) 74 | 75 | t.equal(c, 1) 76 | 77 | t.end() 78 | }) 79 | 80 | t('subset map', t => { 81 | let list2 = new AudioBufferList([util.fill(util.create(4, 2), 0), util.fill(util.create(4, 2), 0)]) 82 | 83 | let dest2 = list2.map((b, idx, offset) => { 84 | return util.fill(b, 1, Math.max(2 - offset, 0), Math.min(6 - offset, b.length)) 85 | }, 2, 6) 86 | 87 | t.deepEqual(getChannelData(dest2, 1), Array(2).fill(0).concat(Array(4).fill(1)).concat(Array(2).fill(0))) 88 | 89 | t.end() 90 | }) 91 | 92 | t('map subset length', t => { 93 | //subset length 94 | let list3 = new AudioBufferList([util.create([0,1,0], 1), util.create([-1,1,0,-1], 1)]) 95 | list3 = list3.map((b, idx) => {return b}, 0, 4) 96 | t.equal(list3.length, 7) 97 | 98 | t.end() 99 | }) 100 | 101 | t('map upd channels', t => { 102 | //upd channels 103 | let list4 = new AudioBufferList([util.create(1, 1), util.create(1, 2)]) 104 | list4 = list4.map(buf => util.create(1, 3)) 105 | t.equal(list4.numberOfChannels, 3) 106 | 107 | //change itself 108 | //track offset 109 | //filter null/zeros 110 | //recalculates length & duration 111 | let list5 = new AudioBufferList([util.create([1,1]), util.create([.5,.5]), util.create([-1,-1])]) 112 | 113 | list5.map((buf, idx, offset) => { 114 | if (idx === 0) t.equal(offset, 0) 115 | else if (idx === 2) { 116 | t.equal(offset, 4) 117 | return null 118 | } 119 | 120 | if (idx === 1) { 121 | buf.copyToChannel(new Float32Array([0,0]), 0) 122 | } 123 | }) 124 | t.deepEqual(list5.length, 4) 125 | t.deepEqual(getChannelData(list5, 0), [1,1,0,0]) 126 | t.end() 127 | }) 128 | 129 | t('each', t => { 130 | //full each 131 | let list = new AudioBufferList([util.fill(util.create(2, 2), 1), util.fill(util.create(2, 2), 0)]) 132 | 133 | list.map((b, idx) => { 134 | return util.fill(b, idx) 135 | }) 136 | 137 | t.deepEqual(getChannelData(list, 0), Array(2).fill(0).concat(Array(2).fill(1))) 138 | t.deepEqual(getChannelData(list, 1), Array(2).fill(0).concat(Array(2).fill(1))) 139 | 140 | //subset each 141 | let list2 = new AudioBufferList([util.fill(util.create(4, 2), 0), util.fill(util.create(4, 2), 0)]) 142 | 143 | list2.map((b, idx, offset) => { 144 | return util.fill(b, 1, Math.max(2 - offset, 0), Math.min(6 - offset, b.length)) 145 | }, 2, 6) 146 | 147 | t.deepEqual(getChannelData(list2, 1), Array(2).fill(0).concat(Array(4).fill(1)).concat(Array(2).fill(0))) 148 | 149 | //change itself 150 | //track offset 151 | //filter null/zeros 152 | //recalculates length & duration 153 | let list5 = new AudioBufferList([util.create([1,1]), util.create([.5,.5]), util.create([-1,-1])]) 154 | 155 | list5.map((buf, idx, offset) => { 156 | if (idx === 0) t.equal(offset, 0) 157 | else if (idx === 2) t.equal(offset, 4) 158 | 159 | if (idx === 1) { 160 | buf.copyToChannel(new Float32Array([0,0]), 0) 161 | } 162 | }) 163 | t.deepEqual(list5.length, 6) 164 | t.deepEqual(getChannelData(list5, 0), [1,1,0,0,-1,-1]) 165 | 166 | //break vicious cycle 167 | let list6 = new AudioBufferList(util.create(2)).repeat(4) 168 | list6.map((buf, idx, offset) => { 169 | if (idx > 1) return false 170 | t.ok(idx <= 1) 171 | }) 172 | 173 | t.end() 174 | }) 175 | 176 | t('reverse each', t => { 177 | //do reversed walking 178 | let list7 = new AudioBufferList(2).repeat(4) 179 | t.equal(list7.length, 8) 180 | let arr = [] 181 | list7.reverseMap((buf, idx, offset) => { 182 | arr.push(idx) 183 | }, {reversed: true}) 184 | t.deepEqual(arr, [3,2,1,0]) 185 | 186 | t.end() 187 | }) 188 | 189 | 190 | t.skip('reverse', t => { 191 | let list = new AudioBufferList(util.create([0,1,2, 3,4,5])).split(3) 192 | 193 | list.reverse(1,5) 194 | 195 | t.deepEqual(getChannelData(list, 0), [0,4,3,2,1,5]) 196 | 197 | t.end() 198 | }) 199 | 200 | 201 | //AudioBuffer methods/props 202 | t('AudioBuffer properties', t => { 203 | let bl = new AudioBufferList(util.create([0,1,2,3], 2)) 204 | 205 | t.equal(bl.length, 2) 206 | t.equal(bl.numberOfChannels, 2) 207 | t.equal(bl.duration, 2/bl.sampleRate) 208 | 209 | bl.append(util.create([4,5,6,7,8,9,10,11,12,13], 3)) 210 | 211 | t.equal(bl.length, 5) 212 | t.equal(bl.numberOfChannels, 3) 213 | t.ok(Math.abs(bl.duration - 5/bl.sampleRate) < 1e-8) 214 | 215 | t.end() 216 | }) 217 | 218 | 219 | t('getChannelData', function (t) { 220 | let bl = new AudioBufferList([util.create(2, 2), util.create(2, 2), util.create(2, 2)]) 221 | 222 | t.equal(getChannelData(bl, 0).length, 6) 223 | t.equal(getChannelData(bl, 0, 3).length, 3) 224 | t.equal(getChannelData(bl, 0, 2, 4).length, 2) 225 | 226 | t.end() 227 | }) 228 | 229 | t('copyToChannel', function (t) { 230 | var a = new AudioBufferList(util.create(2, 2)).repeat(2); 231 | var arr = new Float32Array(4); 232 | arr.fill(-1); 233 | 234 | a.copyToChannel(arr, 0, 0); 235 | t.deepEqual(arr, getChannelData(a, 0)); 236 | 237 | a.copyToChannel(arr, 1, 1); 238 | 239 | var zeros = new Float32Array(1); 240 | arr.set(zeros); 241 | 242 | t.deepEqual(arr, getChannelData(a, 1)); 243 | 244 | a.copyToChannel(new Float32Array([0]), 0, 1) 245 | t.deepEqual(getChannelData(a, 0), [-1, 0, -1, -1]) 246 | 247 | t.end() 248 | }) 249 | 250 | 251 | t('copyFromChannel', function (t) { 252 | var a = new AudioBufferList(util.fill(util.create(20, 2), (v, idx, channel) => channel ? 1 : -1)).repeat(2); 253 | 254 | var arr 255 | arr = new Float32Array(40) 256 | a.copyFromChannel(arr, 0); 257 | t.deepEqual(arr, getChannelData(a, 0)); 258 | 259 | a.copyFromChannel(arr, 1, 10); 260 | var result = Array(30).fill(1).concat(Array(10).fill(-1)); 261 | t.deepEqual(arr, result); 262 | 263 | arr = new Float32Array(40) 264 | a.copyFromChannel(arr, 0, 2, 10) 265 | var result = Array(8).fill(-1).concat(Array(32).fill(0)) 266 | t.deepEqual(arr, result) 267 | 268 | arr = new Float32Array(40) 269 | a.copyFromChannel(arr, 0, 2, 9) 270 | var result = Array(7).fill(-1).concat(Array(33).fill(0)) 271 | t.deepEqual(arr, result) 272 | 273 | arr = new Float32Array(40) 274 | a.copyFromChannel(arr, 0, 2, 11) 275 | var result = Array(9).fill(-1).concat(Array(31).fill(0)) 276 | t.deepEqual(arr, result) 277 | 278 | t.end() 279 | }) 280 | 281 | t('split/join', t => { 282 | let a = new AudioBufferList(10) 283 | 284 | t.equal(a.length, 10) 285 | t.equal(a.buffers.length, 1) 286 | t.equal(l(a.buffers), a.length) 287 | 288 | a.split(4) 289 | 290 | t.equal(a.buffers.length, 2) 291 | t.equal(l(a.buffers), a.length) 292 | 293 | a.split(4) 294 | 295 | t.equal(a.buffers.length, 2) 296 | t.equal(l(a.buffers), a.length) 297 | 298 | a.split(5) 299 | 300 | t.equal(a.buffers.length, 3) 301 | t.equal(l(a.buffers), a.length) 302 | 303 | a.split(10) 304 | 305 | t.equal(a.buffers.length, 3) 306 | t.equal(l(a.buffers), a.length) 307 | 308 | a.split(9,8) 309 | 310 | t.equal(a.buffers.length, 5) 311 | t.equal(l(a.buffers), a.length) 312 | 313 | a.split([7,6]) 314 | 315 | t.equal(a.buffers.length, 7) 316 | t.equal(l(a.buffers), a.length) 317 | 318 | let x = a.join() 319 | 320 | t.equal(a.buffers.length, 1) 321 | t.equal(l(a.buffers), a.length) 322 | 323 | function l (bufs) { 324 | let l = 0 325 | for (let i = 0; i < bufs.length; i++) { 326 | l += bufs[i].length 327 | } 328 | return l 329 | } 330 | 331 | t.end() 332 | }) 333 | 334 | t('join single', t => { 335 | let l = new AudioBufferList([0, .1, .2, .3]) 336 | 337 | l.join(1, 2) 338 | 339 | t.equal(l.buffers.length, 1) 340 | t.equal(l.buffers[0].length, 4) 341 | t.equal(l.length, 4) 342 | 343 | t.end() 344 | }) 345 | 346 | t('remove', t => { 347 | var a = new AudioBufferList([util.fill(util.create(20, 2), (v, idx, channel) => channel), util.fill(util.create(20, 2), (v, idx, channel) => 1 -channel)]); 348 | 349 | a.remove(10) 350 | t.equal(a.length, 30) 351 | t.deepEqual(getChannelData(a,0), Array(10).fill(0).concat(Array(20).fill(1))) 352 | t.deepEqual(getChannelData(a,1), Array(10).fill(1).concat(Array(20).fill(0))) 353 | 354 | a.remove(8, 10) 355 | t.equal(a.length, 20) 356 | t.deepEqual(getChannelData(a,0), Array(8).fill(0).concat(Array(12).fill(1))) 357 | t.deepEqual(getChannelData(a,1), Array(8).fill(1).concat(Array(12).fill(0))) 358 | 359 | a.remove(-12) 360 | t.equal(a.length, 8) 361 | t.deepEqual(getChannelData(a,0), Array(8).fill(0)) 362 | t.deepEqual(getChannelData(a,1), Array(8).fill(1)) 363 | 364 | var b = new AudioBufferList([util.create([0,1,2]), util.create([3,4,5])]) 365 | 366 | b.remove(1, 4) 367 | t.equal(b.length, 2) 368 | 369 | var c = new AudioBufferList(3).repeat(2) 370 | c.remove(5, 3) 371 | t.equal(c.length, 5) 372 | 373 | t.end() 374 | }) 375 | 376 | t('insert', t => { 377 | var a = new AudioBufferList() 378 | 379 | t.equal(a.length, 0) 380 | 381 | a.insert(2, util.fill(util.create(10,2), 2)) 382 | 383 | t.equal(a.length, 10) 384 | t.equal(a.numberOfChannels, 2) 385 | t.deepEqual(getChannelData(a, 0), Array(10).fill(2)) 386 | 387 | a.insert(2, util.fill(util.create(10,2), (v,i,c) => c)) 388 | 389 | t.equal(a.length, 20) 390 | t.deepEqual(getChannelData(a, 0), Array(2).fill(2).concat(Array(10).fill(0)).concat(Array(8).fill(2))) 391 | 392 | a.insert(-5, util.fill(util.create(10, 2), (v,i,c) => 1-c)) 393 | 394 | t.equal(a.length, 30) 395 | t.deepEqual(getChannelData(a, 1), Array(2).fill(2).concat(Array(10).fill(1)).concat(Array(3).fill(2)).concat(Array(10).fill(0)).concat(Array(5).fill(2))) 396 | 397 | t.end() 398 | }) 399 | 400 | t('insert to the end case', t => { 401 | let a = new AudioBufferList(7, {numberOfChannels: 3}) 402 | 403 | a.insert(0, util.create([[0,.5,1], [0, -.5, -1], [0,0,0]])) 404 | t.deepEqual(getChannelData(a, 0), [0,.5,1, 0,0,0,0,0,0,0]) 405 | t.deepEqual(getChannelData(a, 1), [0,-.5,-1, 0,0,0,0,0,0,0]) 406 | t.deepEqual(getChannelData(a, 2), [0,0,0, 0,0,0,0,0,0,0]) 407 | 408 | a.insert(1, util.create(2, 3)) 409 | t.deepEqual(getChannelData(a, 0), [0,0,0,.5,1, 0,0,0,0,0,0,0]) 410 | t.deepEqual(getChannelData(a, 1), [0,0,0,-.5,-1, 0,0,0,0,0,0,0]) 411 | t.deepEqual(getChannelData(a, 2), [0,0,0,0,0, 0,0,0,0,0,0,0]) 412 | 413 | a.insert(-0, util.create([[0,0,0], [0,0,0], [1,1,1]])) 414 | t.deepEqual(getChannelData(a, 0), [0,0,0,.5,1, 0,0,0,0,0,0,0,0,0,0]) 415 | t.deepEqual(getChannelData(a, 1), [0,0,0,-.5,-1, 0,0,0,0,0,0,0,0,0,0]) 416 | t.deepEqual(getChannelData(a, 2), [0,0,0,0,0, 0,0,0,0,0,0,0,1,1,1]) 417 | 418 | t.end() 419 | }) 420 | 421 | 422 | //bl patch methods 423 | t.skip('single bytes from single buffer', function (t) { 424 | var bl = new AudioBufferList() 425 | bl.append(util.create([0,1,2,3])) 426 | 427 | t.equal(bl.length, 4) 428 | 429 | t.equal(bl.get(0)[0], 0) 430 | t.equal(bl.get(1)[0], 1) 431 | t.equal(bl.get(2)[0], 2) 432 | t.equal(bl.get(3)[0], 3) 433 | 434 | t.end() 435 | }) 436 | 437 | t.skip('single bytes from multiple buffers', function (t) { 438 | var bl = new AudioBufferList() 439 | bl.append(util.create([1,2,3,4])) 440 | bl.append(util.create([5,6,7])) 441 | bl.append(util.create([8,9])) 442 | bl.append(util.create([10])) 443 | 444 | t.equal(bl.length, 10) 445 | 446 | t.equal(bl.get(0), 1) 447 | t.equal(bl.get(1), 2) 448 | t.equal(bl.get(2), 3) 449 | t.equal(bl.get(3), 4) 450 | t.equal(bl.get(4), 5) 451 | t.equal(bl.get(5), 6) 452 | t.equal(bl.get(6), 7) 453 | t.equal(bl.get(7), 8) 454 | t.equal(bl.get(8), 9) 455 | t.equal(bl.get(9), 10) 456 | t.end() 457 | }) 458 | 459 | t('multi bytes from single buffer', function (t) { 460 | var bl = new AudioBufferList() 461 | bl.append(util.create([-1, -.5, 0, 1])) 462 | 463 | t.equal(bl.length, 4) 464 | 465 | t.deepEqual(getChannelData(bl.slice(0, 4), 0), [-1, -.5, 0, 1]) 466 | t.deepEqual(getChannelData(bl.slice(0, 3), 0), [-1, -.5, 0]) 467 | t.deepEqual(getChannelData(bl.slice(1, 4), 0), [-.5, 0, 1]) 468 | t.deepEqual(getChannelData(bl.slice(-4, -1), 0), [-1, -.5, 0]) 469 | 470 | t.end() 471 | }) 472 | 473 | t('multi bytes from single buffer (negative indexes)', function (t) { 474 | var bl = new AudioBufferList() 475 | bl.append(util.create([1,2,3,4,5,6,7,8,9,10,11,12], 2)) 476 | 477 | t.equal(bl.length, 6) 478 | 479 | t.deepEqual(getChannelData(bl.slice(-6, -1), 0), [1,2,3,4,5]) 480 | t.deepEqual(getChannelData(bl.slice(-6, -2), 0), [1,2,3,4]) 481 | t.deepEqual(getChannelData(bl.slice(-5, -2), 0), [2,3,4]) 482 | 483 | t.end() 484 | }) 485 | 486 | t('multiple bytes from multiple buffers', function (t) { 487 | var bl = new AudioBufferList() 488 | 489 | bl.append(util.create([0,1,2,3])) 490 | bl.append(util.create([4,5,6])) 491 | bl.append(util.create([7,8])) 492 | bl.append(util.create([9])) 493 | 494 | t.equal(bl.length, 10) 495 | 496 | t.deepEqual(getChannelData(bl.slice(0, 10), 0), [0,1,2,3,4,5,6,7,8,9]) 497 | t.deepEqual(getChannelData(bl.slice(3, 10), 0), [3,4,5,6,7,8,9]) 498 | t.deepEqual(getChannelData(bl.slice(3, 6), 0), [3,4,5]) 499 | t.deepEqual(getChannelData(bl.slice(3, 8), 0), [3,4,5,6,7]) 500 | t.deepEqual(getChannelData(bl.slice(5, 10), 0), [5,6,7,8,9]) 501 | t.deepEqual(getChannelData(bl.slice(-7, -4), 0), [3,4,5]) 502 | 503 | t.end() 504 | }) 505 | 506 | t('multiple bytes from multiple buffer lists', function (t) { 507 | var bl = new AudioBufferList() 508 | 509 | bl.append(new AudioBufferList([ util.create([0,1,2,3]), util.create([4,5,6]) ])) 510 | bl.append(new AudioBufferList([ util.create([7,8]), util.create([9]) ])) 511 | 512 | t.equal(bl.length, 10) 513 | 514 | t.deepEqual(getChannelData(bl.slice(0, 10), 0), [0,1,2,3,4,5,6,7,8,9]) 515 | t.deepEqual(getChannelData(bl.slice(3, 10), 0), [3,4,5,6,7,8,9]) 516 | t.deepEqual(getChannelData(bl.slice(3, 6), 0), [3,4,5]) 517 | t.deepEqual(getChannelData(bl.slice(3, 8), 0), [3,4,5,6,7]) 518 | t.deepEqual(getChannelData(bl.slice(5, 10), 0), [5,6,7,8,9]) 519 | 520 | t.end() 521 | }) 522 | 523 | // same data as previous test, just using nested constructors 524 | t('multiple bytes from crazy nested buffer lists', function (t) { 525 | var bl = new AudioBufferList() 526 | 527 | bl.append(new AudioBufferList([ 528 | new AudioBufferList([ 529 | new AudioBufferList(util.create([0,1,2])) 530 | , util.create([3]) 531 | , new AudioBufferList(util.create([4,5,6])) 532 | ]) 533 | , new AudioBufferList([ util.create([7,8]) ]) 534 | , new AudioBufferList(util.create([9])) 535 | ])) 536 | 537 | t.equal(bl.length, 10) 538 | 539 | t.deepEqual(getChannelData(bl.slice(0, 10), 0), [0,1,2,3,4,5,6,7,8,9]) 540 | 541 | t.deepEqual(getChannelData(bl.slice(3, 10), 0), [3,4,5,6,7,8,9]) 542 | t.deepEqual(getChannelData(bl.slice(3, 6), 0), [3,4,5]) 543 | t.deepEqual(getChannelData(bl.slice(3, 8), 0), [3,4,5,6,7]) 544 | t.deepEqual(getChannelData(bl.slice(5, 10), 0), [5,6,7,8,9]) 545 | 546 | t.end() 547 | }) 548 | 549 | t('append accepts arrays of Buffers', function (t) { 550 | var bl = new AudioBufferList() 551 | bl.append(util.create([0,1,2])) 552 | bl.append([ util.create([3,4,5]) ]) 553 | bl.append([ util.create([6,7,8]), util.create([9,10,11]) ]) 554 | bl.append([ util.create([12,13,14,15]), util.create([16,17,18,19,20]), util.create([21,22,23,24,25]) ]) 555 | 556 | t.equal(bl.length, 26) 557 | 558 | t.deepEqual(getChannelData(bl, 0), [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]) 559 | t.end() 560 | }) 561 | 562 | t('append accepts arrays of AudioBufferLists', function (t) { 563 | var bl = new AudioBufferList() 564 | bl.append(util.create([0,1,2])) 565 | bl.append([ new AudioBufferList(util.create([3,4,5])) ]) 566 | bl.append(new AudioBufferList([ util.create([6,7,8]), new AudioBufferList(util.create([9,10,11])) ])) 567 | bl.append([ util.create([12,13,14,15]), new AudioBufferList([ util.create([16,17,18,19,20]), util.create([21,22,23,24,25]) ]) ]) 568 | t.equal(bl.length, 26) 569 | t.deepEqual(getChannelData(bl, 0), [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]) 570 | t.end() 571 | }) 572 | 573 | t('append chainable', function (t) { 574 | var bl = new AudioBufferList() 575 | t.ok(bl.append(util.create([0,1,2,3])) === bl) 576 | t.ok(bl.append([ util.create([0,1,2,3]) ]) === bl) 577 | t.ok(bl.append(new AudioBufferList(util.create([0,1,2,3]))) === bl) 578 | t.ok(bl.append([ new AudioBufferList(util.create([0,1,2,3])) ]) === bl) 579 | t.end() 580 | }) 581 | 582 | t('append chainable (test results)', function (t) { 583 | var bl = new AudioBufferList(util.create([0,1,2])) 584 | .append([ new AudioBufferList(util.create([3,4,5])) ]) 585 | .append(new AudioBufferList([ util.create([6,7,8]), new AudioBufferList(util.create([9,10,11])) ])) 586 | .append([ util.create([12,13,14,15]), new AudioBufferList([ util.create([16,17,18,19,20]), util.create([21,22,23,24,25]) ]) ]) 587 | 588 | t.equal(bl.length, 26) 589 | t.deepEqual(getChannelData(bl, 0), [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]) 590 | t.end() 591 | }) 592 | 593 | t('consuming from multiple buffers', function (t) { 594 | var bl = new AudioBufferList() 595 | 596 | bl.append(util.create([0,1,2,3])) 597 | bl.append(util.create([4,5,6])) 598 | bl.append(util.create([7,8])) 599 | bl.append(util.create([9])) 600 | 601 | t.equal(bl.length, 10) 602 | 603 | t.deepEqual(getChannelData(bl.slice(0, 10), 0), [0,1,2,3,4,5,6,7,8,9]) 604 | 605 | bl.remove(3) 606 | t.equal(bl.length, 7) 607 | t.deepEqual(getChannelData(bl.slice(0, 7), 0), [3,4,5,6,7,8,9]) 608 | 609 | bl.remove(2) 610 | t.equal(bl.length, 5) 611 | t.deepEqual(getChannelData(bl.slice(0, 5), 0), [5,6,7,8,9]) 612 | 613 | bl.remove(1) 614 | t.equal(bl.length, 4) 615 | t.deepEqual(getChannelData(bl.slice(0, 4), 0), [6,7,8,9]) 616 | 617 | bl.remove(1) 618 | t.equal(bl.length, 3) 619 | t.deepEqual(getChannelData(bl.slice(0, 3), 0), [7,8,9]) 620 | 621 | bl.remove(2) 622 | t.equal(bl.length, 1) 623 | t.deepEqual(getChannelData(bl.slice(0, 1), 0), [9]) 624 | 625 | t.end() 626 | }) 627 | 628 | t('complete consumption', function (t) { 629 | var bl = new AudioBufferList() 630 | 631 | bl.append(util.create([0])) 632 | bl.append(util.create([1])) 633 | 634 | bl.remove(2) 635 | 636 | t.equal(bl.length, 0) 637 | t.equal(bl.buffers.length, 0) 638 | 639 | t.end() 640 | }) 641 | 642 | t('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) { 643 | var buf1 = util.create(1) 644 | , buf2 = util.create(3) 645 | , buf3 = util.create(3) 646 | , bl = new AudioBufferList() 647 | 648 | buf2[1] = 0x3 649 | buf2[2] = 0x4 650 | buf3[0] = 0x23 651 | buf3[1] = 0x42 652 | 653 | bl.append(buf1) 654 | bl.append(buf2) 655 | bl.append(buf3) 656 | 657 | t.throws(function () { 658 | bl.readUInt16BE(2) // 0x0304 659 | bl.readUInt16LE(2) // 0x0403 660 | bl.readInt16BE(2) // 0x0304 661 | bl.readInt16LE(2) // 0x0403 662 | bl.readUInt16BE(3) // 0x0423 663 | bl.readUInt16LE(3) // 0x2304 664 | bl.readInt16BE(3) // 0x0423 665 | bl.readInt16LE(3) // 0x2304 666 | bl.readUInt16BE(4) // 0x2342 667 | bl.readUInt16LE(4) // 0x4223 668 | bl.readInt16BE(4) // 0x2342 669 | bl.readInt16LE(4) // 0x4223 670 | }) 671 | t.end() 672 | }) 673 | 674 | 675 | t('basic copy', function (t) { 676 | var buf = util.noise(util.create(1024)) 677 | , buf2 = util.create(1024) 678 | , b = new AudioBufferList(buf) 679 | b.copy(buf2) 680 | t.deepEqual(getChannelData(b, 0), getChannelData(buf2, 0), 'same buffer') 681 | t.end() 682 | }) 683 | 684 | t('copy after many appends', function (t) { 685 | var buf = util.noise(util.create(512)) 686 | , buf2 = util.create(1024) 687 | , b = new AudioBufferList(buf) 688 | 689 | b.append(buf) 690 | b.copy(buf2) 691 | t.deepEqual(getChannelData(b, 0), getChannelData(buf2, 0), 'same buffer') 692 | t.end() 693 | }) 694 | 695 | t('copy at a precise position', function (t) { 696 | var buf = util.noise(util.create(1004)) 697 | , buf2 = util.create(1024) 698 | , b = new AudioBufferList(buf) 699 | 700 | b.copy(buf2, 20) 701 | t.deepEqual(getChannelData(b, 0), util.slice(buf2, 20).getChannelData(0), 'same buffer') 702 | t.end() 703 | }) 704 | 705 | t('copy starting from a precise location', function (t) { 706 | var buf = util.noise(util.create(10)) 707 | , buf2 = util.create(5) 708 | , b = new AudioBufferList(buf) 709 | 710 | b.copy(buf2, 0, 5) 711 | t.deepEqual(getChannelData(b.slice(0, 5), 0), buf2.getChannelData(0), 'same buffer') 712 | t.end() 713 | }) 714 | 715 | t('copy in an interval', function (t) { 716 | var rnd = util.noise(util.create(10)) 717 | , b = new AudioBufferList(rnd) // put the random bytes there 718 | , actual = util.create(3) 719 | , expected = util.create(3) 720 | 721 | util.copy(util.subbuffer(rnd, 5,8), expected, 0) 722 | b.copy(actual, 0, 5, 8) 723 | 724 | t.deepEqual(actual.getChannelData(0), expected.getChannelData(0), 'same buffer') 725 | t.end() 726 | }) 727 | 728 | t('copy an interval between two buffers', function (t) { 729 | var buf = util.noise(util.create(10)) 730 | , buf2 = util.create(10) 731 | , b = new AudioBufferList(buf) 732 | 733 | b.append(buf) 734 | b.copy(buf2, 0, 5, 15) 735 | 736 | t.deepEqual(getChannelData(b.slice(5, 15), 0), buf2.getChannelData(0), 'same buffer') 737 | t.end() 738 | }) 739 | 740 | t('shallow slice across buffer boundaries', function (t) { 741 | var bl = new AudioBufferList([util.create([0,0,0,0,0]), util.create([1,1,1,1,1,1]), util.create([2,2,2,2,2])]) 742 | 743 | t.deepEqual(getChannelData(bl.slice(3, 13), 0), [0,0,1,1,1,1,1,1,2,2]) 744 | t.end() 745 | }) 746 | 747 | t('shallow slice within single buffer', function (t) { 748 | var bl = new AudioBufferList(util.create([0,1,2,3,4,5,6,7,8])) 749 | 750 | t.deepEqual(getChannelData(bl.slice(3, 6), 0), [3,4,5]) 751 | t.end() 752 | }) 753 | 754 | t('shallow slice single buffer', function (t) { 755 | t.plan(3) 756 | var bl = new AudioBufferList([util.create([0,0,0,0,0]), util.create([1,1,1,1,1,1]), util.create([2,2,2,2,2])]) 757 | 758 | t.deepEqual(getChannelData(bl.slice(0, 5), 0), util.create([0,0,0,0,0]).getChannelData(0)) 759 | t.deepEqual(getChannelData(bl.slice(5, 11), 0), util.create([1,1,1,1,1,1]).getChannelData(0)) 760 | t.deepEqual(getChannelData(bl.slice(11, 16), 0), util.create([2,2,2,2,2]).getChannelData(0)) 761 | }) 762 | 763 | t('shallow slice with negative or omitted indices', function (t) { 764 | t.plan(4) 765 | var bl = new AudioBufferList([util.create([0,0,0,0,0]), util.create([1,1,1,1,1,1]), util.create([2,2,2,2,2])]) 766 | 767 | t.deepEqual(getChannelData(bl.slice(), 0), '0000011111122222'.split('').map(v => parseFloat(v))) 768 | t.deepEqual(getChannelData(bl.slice(5), 0), '11111122222'.split('').map(v => parseFloat(v))) 769 | t.deepEqual(getChannelData(bl.slice(5, -3), 0), '11111122'.split('').map(v => parseFloat(v))) 770 | t.deepEqual(getChannelData(bl.slice(-8), 0), '11122222'.split('').map(v => parseFloat(v))) 771 | }) 772 | 773 | t('shallow slice does not make a copy', function (t) { 774 | t.plan(1) 775 | var buffers = [util.create(util.create([0,0,0,0,0])), util.create(util.create([1,1,1,1,1,1])), util.create(util.create([2,2,2,2,2]))] 776 | var bl = (new AudioBufferList(buffers)).slice(5, -3) 777 | 778 | util.fill(buffers[1],0) 779 | util.fill(buffers[2],0) 780 | 781 | t.deepEqual(getChannelData(bl, 0), [0,0,0,0,0,0,0,0]) 782 | }) 783 | 784 | t('clone', function (t) { 785 | t.plan(2) 786 | 787 | var bl = new AudioBufferList(util.create([0,1,2,3,4,5,6,7,8,9])) 788 | , dup = bl.copy() 789 | 790 | t.equal(bl.prototype, dup.prototype) 791 | t.deepEqual(getChannelData(bl, 0), getChannelData(dup, 0)) 792 | }) 793 | 794 | t('destroy no pipe', function (t) { 795 | t.plan(2) 796 | 797 | var bl = new AudioBufferList(util.create([0,1,0,1,0,1,0,1])) 798 | bl.destroy() 799 | 800 | t.equal(bl.buffers, null) 801 | t.equal(bl.length, 0) 802 | }) 803 | 804 | t('slice', function (t) { 805 | var l = new AudioBufferList(10, 2) 806 | 807 | t.equal(l.numberOfChannels, 2) 808 | 809 | l.remove(10) 810 | 811 | t.equal(l.numberOfChannels, 2) 812 | 813 | let m = l.slice() 814 | 815 | t.equal(m.numberOfChannels, 2) 816 | 817 | t.end() 818 | }) 819 | 820 | t('zero buffers', function (t) { 821 | let a = new AudioBufferList(0, 2) 822 | t.equal(a.buffers.length, 0) 823 | 824 | let b = new AudioBufferList(10, 2) 825 | let c = b.slice(0,0) 826 | t.equal(c.length, 0) 827 | t.equal(c.buffers.length, 0) 828 | 829 | t.end() 830 | }) 831 | 832 | t('update number of channels', function (t) { 833 | let a = new AudioBufferList(3, 3) 834 | 835 | t.equal(a.numberOfChannels, 3) 836 | 837 | let b = new AudioBufferList(0, 2) 838 | 839 | t.equal(b.numberOfChannels, 2) 840 | t.equal(b.length, 0) 841 | t.equal(b.buffers.length, 0) 842 | 843 | b.append(util.create(1)) 844 | 845 | t.equal(b.length, 1) 846 | t.equal(b.numberOfChannels, 1) 847 | 848 | t.end() 849 | }) 850 | 851 | t('remove 0-len should return null', function (t) { 852 | let a = new AudioBufferList(10) 853 | t.ok(a.remove(10)) 854 | t.notOk(a.remove(10)) 855 | t.end() 856 | }) 857 | 858 | t('copy(from, to)', function (t) { 859 | let a = new AudioBufferList([0, 1, 2, 3, 4, 5]) 860 | 861 | t.equal(a.length, 6) 862 | 863 | let b = a.copy(1,4) 864 | t.deepEqual(b.getChannelData(0), [1,2,3]) 865 | 866 | t.end() 867 | }) 868 | -------------------------------------------------------------------------------- /todo.md: -------------------------------------------------------------------------------- 1 | * [ ] 2.0 2 | * [ ] no redundant dependencies --------------------------------------------------------------------------------