react-audio-wavekit 0.1.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -4
- package/dist/_virtual/_commonjsHelpers.cjs +6 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/browser.cjs +7 -0
- package/dist/_virtual/browser.js +7 -0
- package/dist/index.d.ts +14 -6
- package/dist/node_modules/@eshaz/web-worker/cjs/browser.cjs +11 -0
- package/dist/node_modules/@eshaz/web-worker/cjs/browser.js +11 -0
- package/dist/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderCommon.cjs +168 -0
- package/dist/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderCommon.js +168 -0
- package/dist/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderWorker.cjs +90 -0
- package/dist/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderWorker.js +90 -0
- package/dist/node_modules/@wasm-audio-decoders/common/src/utilities.cjs +6 -0
- package/dist/node_modules/@wasm-audio-decoders/common/src/utilities.js +6 -0
- package/dist/node_modules/mpg123-decoder/index.cjs +9 -0
- package/dist/node_modules/mpg123-decoder/index.js +9 -0
- package/dist/node_modules/mpg123-decoder/src/EmscriptenWasm.cjs +0 -0
- package/dist/node_modules/mpg123-decoder/src/EmscriptenWasm.js +0 -0
- package/dist/node_modules/mpg123-decoder/src/MPEGDecoder.cjs +147 -0
- package/dist/node_modules/mpg123-decoder/src/MPEGDecoder.js +147 -0
- package/dist/node_modules/mpg123-decoder/src/MPEGDecoderWebWorker.cjs +20 -0
- package/dist/node_modules/mpg123-decoder/src/MPEGDecoderWebWorker.js +20 -0
- package/dist/node_modules/simple-yenc/dist/esm.cjs +41 -0
- package/dist/node_modules/simple-yenc/dist/esm.js +41 -0
- package/dist/recorder/live-streaming/recorder/recorder-compound.cjs +1 -1
- package/dist/recorder/live-streaming/recorder/recorder-compound.js +1 -1
- package/dist/waveform/index.cjs +28 -11
- package/dist/waveform/index.js +28 -11
- package/dist/waveform/util-audio-decoder.cjs +36 -15
- package/dist/waveform/util-audio-decoder.js +36 -15
- package/dist/waveform/waveform-renderer.cjs +61 -14
- package/dist/waveform/waveform-renderer.js +61 -14
- package/package.json +3 -3
- package/dist/node_modules/automation-events/build/es2019/classes/automation-event-list.cjs +0 -137
- package/dist/node_modules/automation-events/build/es2019/classes/automation-event-list.js +0 -137
- package/dist/node_modules/automation-events/build/es2019/functions/create-cancel-and-hold-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-cancel-and-hold-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-cancel-scheduled-values-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-cancel-scheduled-values-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-exponential-ramp-to-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-exponential-ramp-to-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-extended-exponential-ramp-to-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-extended-exponential-ramp-to-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-extended-linear-ramp-to-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-extended-linear-ramp-to-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-linear-ramp-to-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-linear-ramp-to-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-set-target-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-set-target-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-set-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-set-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-set-value-curve-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/create-set-value-curve-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/get-end-time-and-value-of-previous-automation-event.cjs +0 -16
- package/dist/node_modules/automation-events/build/es2019/functions/get-end-time-and-value-of-previous-automation-event.js +0 -16
- package/dist/node_modules/automation-events/build/es2019/functions/get-event-time.cjs +0 -16
- package/dist/node_modules/automation-events/build/es2019/functions/get-event-time.js +0 -16
- package/dist/node_modules/automation-events/build/es2019/functions/get-exponential-ramp-value-at-time.cjs +0 -12
- package/dist/node_modules/automation-events/build/es2019/functions/get-exponential-ramp-value-at-time.js +0 -12
- package/dist/node_modules/automation-events/build/es2019/functions/get-linear-ramp-value-at-time.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/get-linear-ramp-value-at-time.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/get-target-value-at-time.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/get-target-value-at-time.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/functions/get-value-curve-value-at-time.cjs +0 -8
- package/dist/node_modules/automation-events/build/es2019/functions/get-value-curve-value-at-time.js +0 -8
- package/dist/node_modules/automation-events/build/es2019/functions/get-value-of-automation-event-at-index-at-time.cjs +0 -11
- package/dist/node_modules/automation-events/build/es2019/functions/get-value-of-automation-event-at-index-at-time.js +0 -11
- package/dist/node_modules/automation-events/build/es2019/functions/interpolate-value.cjs +0 -11
- package/dist/node_modules/automation-events/build/es2019/functions/interpolate-value.js +0 -11
- package/dist/node_modules/automation-events/build/es2019/guards/any-ramp-to-value-automation-event.cjs +0 -8
- package/dist/node_modules/automation-events/build/es2019/guards/any-ramp-to-value-automation-event.js +0 -8
- package/dist/node_modules/automation-events/build/es2019/guards/cancel-and-hold-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/cancel-and-hold-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/cancel-scheduled-values-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/cancel-scheduled-values-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/exponential-ramp-to-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/exponential-ramp-to-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/linear-ramp-to-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/linear-ramp-to-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/set-target-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/set-target-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/set-value-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/set-value-automation-event.js +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/set-value-curve-automation-event.cjs +0 -6
- package/dist/node_modules/automation-events/build/es2019/guards/set-value-curve-automation-event.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/constants.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/constants.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/abort-error.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/abort-error.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-active-input-connection-to-audio-node.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-active-input-connection-to-audio-node.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-audio-node-connections.cjs +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-audio-node-connections.js +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-audio-param-connections.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-audio-param-connections.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-audio-worklet-module.cjs +0 -115
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-audio-worklet-module.js +0 -115
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-connection-to-audio-node.cjs +0 -60
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-connection-to-audio-node.js +0 -60
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-passive-input-connection-to-audio-node.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-passive-input-connection-to-audio-node.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-silent-connection.cjs +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/add-silent-connection.js +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/analyser-node-constructor.cjs +0 -73
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/analyser-node-constructor.js +0 -73
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/analyser-node-renderer-factory.cjs +0 -37
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/analyser-node-renderer-factory.js +0 -37
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-buffer-constructor.cjs +0 -37
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-buffer-constructor.js +0 -37
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-buffer-source-node-constructor.cjs +0 -103
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-buffer-source-node-constructor.js +0 -103
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-buffer-source-node-renderer-factory.cjs +0 -58
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-buffer-source-node-renderer-factory.js +0 -58
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-destination-node-constructor.cjs +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-destination-node-constructor.js +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-destination-node-renderer-factory.cjs +0 -21
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-destination-node-renderer-factory.js +0 -21
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-listener-factory.cjs +0 -220
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-listener-factory.js +0 -220
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-node-constructor.cjs +0 -274
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-node-constructor.js +0 -274
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-param-factory.cjs +0 -152
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-param-factory.js +0 -152
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-param-renderer.cjs +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/audio-param-renderer.js +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/base-audio-context-constructor.cjs +0 -83
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/base-audio-context-constructor.js +0 -83
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/biquad-filter-node-constructor.cjs +0 -63
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/biquad-filter-node-constructor.js +0 -63
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/biquad-filter-node-renderer-factory.cjs +0 -49
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/biquad-filter-node-renderer-factory.js +0 -49
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/cache-test-result.cjs +0 -31
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/cache-test-result.js +0 -31
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-merger-node-constructor.cjs +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-merger-node-constructor.js +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-merger-node-renderer-factory.cjs +0 -34
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-merger-node-renderer-factory.js +0 -34
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-splitter-node-constructor.cjs +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-splitter-node-constructor.js +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-splitter-node-renderer-factory.cjs +0 -34
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/channel-splitter-node-renderer-factory.js +0 -34
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/connect-audio-param.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/connect-audio-param.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/connected-native-audio-buffer-source-node-factory.cjs +0 -26
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/connected-native-audio-buffer-source-node-factory.js +0 -26
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/constant-source-node-constructor.cjs +0 -63
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/constant-source-node-constructor.js +0 -63
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/constant-source-node-renderer-factory.cjs +0 -53
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/constant-source-node-renderer-factory.js +0 -53
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/convert-number-to-unsigned-long.cjs +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/convert-number-to-unsigned-long.js +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/convolver-node-constructor.cjs +0 -51
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/convolver-node-constructor.js +0 -51
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/convolver-node-renderer-factory.cjs +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/convolver-node-renderer-factory.js +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/create-native-offline-audio-context.cjs +0 -18
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/create-native-offline-audio-context.js +0 -18
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/data-clone-error.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/data-clone-error.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/decode-audio-data.cjs +0 -59
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/decode-audio-data.js +0 -59
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/decrement-cycle-counter.cjs +0 -32
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/decrement-cycle-counter.js +0 -32
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/delay-node-constructor.cjs +0 -27
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/delay-node-constructor.js +0 -27
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/delay-node-renderer-factory.cjs +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/delay-node-renderer-factory.js +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/delete-active-input-connection-to-audio-node.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/delete-active-input-connection-to-audio-node.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/detect-cycles.cjs +0 -21
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/detect-cycles.js +0 -21
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/dynamics-compressor-node-constructor.cjs +0 -80
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/dynamics-compressor-node-constructor.js +0 -80
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/dynamics-compressor-node-renderer-factory.cjs +0 -51
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/dynamics-compressor-node-renderer-factory.js +0 -51
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/encoding-error.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/encoding-error.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/evaluate-source.cjs +0 -45
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/evaluate-source.js +0 -45
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/event-target-constructor.cjs +0 -30
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/event-target-constructor.js +0 -30
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/expose-current-frame-and-current-time.cjs +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/expose-current-frame-and-current-time.js +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/fetch-source.cjs +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/fetch-source.js +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/gain-node-constructor.cjs +0 -26
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/gain-node-constructor.js +0 -26
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/gain-node-renderer-factory.cjs +0 -39
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/gain-node-renderer-factory.js +0 -39
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-audio-node-renderer.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-audio-node-renderer.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-audio-node-tail-time.cjs +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-audio-node-tail-time.js +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-audio-param-renderer.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-audio-param-renderer.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-native-context.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-native-context.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-or-create-backup-offline-audio-context.cjs +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-or-create-backup-offline-audio-context.js +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-unrendered-audio-worklet-nodes.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/get-unrendered-audio-worklet-nodes.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/iir-filter-node-constructor.cjs +0 -27
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/iir-filter-node-constructor.js +0 -27
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/iir-filter-node-renderer-factory.cjs +0 -93
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/iir-filter-node-renderer-factory.js +0 -93
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/increment-cycle-counter-factory.cjs +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/increment-cycle-counter-factory.js +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/index-size-error.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/index-size-error.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/invalid-access-error.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/invalid-access-error.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/invalid-state-error.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/invalid-state-error.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-audio-context.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-audio-context.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-audio-node.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-audio-node.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-audio-param.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-audio-param.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-context.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-context.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-offline-audio-context.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-native-offline-audio-context.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-secure-context.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/is-secure-context.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/minimal-base-audio-context-constructor.cjs +0 -43
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/minimal-base-audio-context-constructor.js +0 -43
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/monitor-connections.cjs +0 -59
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/monitor-connections.js +0 -59
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-analyser-node-factory.cjs +0 -24
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-analyser-node-factory.js +0 -24
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-buffer-constructor.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-buffer-constructor.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-buffer-source-node-factory.cjs +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-buffer-source-node-factory.js +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-context-constructor.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-context-constructor.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-destination-node.cjs +0 -51
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-destination-node.js +0 -51
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-worklet-node-constructor.cjs +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-audio-worklet-node-constructor.js +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-biquad-filter-node.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-biquad-filter-node.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-channel-merger-node-factory.cjs +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-channel-merger-node-factory.js +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-channel-splitter-node.cjs +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-channel-splitter-node.js +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-constant-source-node-factory.cjs +0 -25
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-constant-source-node-factory.js +0 -25
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-constant-source-node-faker-factory.cjs +0 -88
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-constant-source-node-faker-factory.js +0 -88
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-convolver-node-factory.cjs +0 -34
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-convolver-node-factory.js +0 -34
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-delay-node.cjs +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-delay-node.js +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-dynamics-compressor-node-factory.cjs +0 -23
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-dynamics-compressor-node-factory.js +0 -23
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-gain-node.cjs +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-gain-node.js +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-iir-filter-node-factory.cjs +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-iir-filter-node-factory.js +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-iir-filter-node-faker-factory.cjs +0 -139
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-iir-filter-node-faker-factory.js +0 -139
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-offline-audio-context-constructor.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-offline-audio-context-constructor.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-oscillator-node-factory.cjs +0 -32
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-oscillator-node-factory.js +0 -32
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-panner-node-factory.cjs +0 -30
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-panner-node-factory.js +0 -30
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-panner-node-faker-factory.cjs +0 -277
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-panner-node-faker-factory.js +0 -277
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-periodic-wave-factory.cjs +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-periodic-wave-factory.js +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-script-processor-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-script-processor-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-stereo-panner-node-factory.cjs +0 -28
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-stereo-panner-node-factory.js +0 -28
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-stereo-panner-node-faker-factory.cjs +0 -244
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-stereo-panner-node-faker-factory.js +0 -244
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-wave-shaper-node-factory.cjs +0 -48
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-wave-shaper-node-factory.js +0 -48
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-wave-shaper-node-faker-factory.cjs +0 -153
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/native-wave-shaper-node-faker-factory.js +0 -153
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/not-supported-error.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/not-supported-error.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/offline-audio-context-constructor.cjs +0 -71
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/offline-audio-context-constructor.js +0 -71
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/oscillator-node-constructor.cjs +0 -90
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/oscillator-node-constructor.js +0 -90
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/oscillator-node-renderer-factory.cjs +0 -62
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/oscillator-node-renderer-factory.js +0 -62
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/panner-node-constructor.cjs +0 -109
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/panner-node-constructor.js +0 -109
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/panner-node-renderer-factory.cjs +0 -166
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/panner-node-renderer-factory.js +0 -166
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/periodic-wave-constructor.cjs +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/periodic-wave-constructor.js +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-automation.cjs +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-automation.js +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-inputs-of-audio-node.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-inputs-of-audio-node.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-inputs-of-audio-param.cjs +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-inputs-of-audio-param.js +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-native-offline-audio-context.cjs +0 -36
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/render-native-offline-audio-context.js +0 -36
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/set-audio-node-tail-time.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/set-audio-node-tail-time.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/start-rendering.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/start-rendering.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/stereo-panner-node-constructor.cjs +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/stereo-panner-node-constructor.js +0 -29
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/stereo-panner-node-renderer-factory.cjs +0 -44
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/stereo-panner-node-renderer-factory.js +0 -44
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/test-audio-buffer-constructor-support.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/test-audio-buffer-constructor-support.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/test-audio-worklet-processor-post-message-support.cjs +0 -35
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/test-audio-worklet-processor-post-message-support.js +0 -35
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/test-offline-audio-context-current-time-support.cjs +0 -24
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/test-offline-audio-context-current-time-support.js +0 -24
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wave-shaper-node-constructor.cjs +0 -49
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wave-shaper-node-constructor.js +0 -49
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wave-shaper-node-renderer-factory.cjs +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wave-shaper-node-renderer-factory.js +0 -40
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/window.cjs +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/window.js +0 -4
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-audio-buffer-copy-channel-methods-out-of-bounds.cjs +0 -25
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-audio-buffer-copy-channel-methods-out-of-bounds.js +0 -25
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-audio-buffer-copy-channel-methods.cjs +0 -33
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-audio-buffer-copy-channel-methods.js +0 -33
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-audio-buffer-source-node-stop-method-nullified-buffer.cjs +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-audio-buffer-source-node-stop-method-nullified-buffer.js +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-channel-merger-node.cjs +0 -30
- package/dist/node_modules/standardized-audio-context/build/es2019/factories/wrap-channel-merger-node.js +0 -30
- package/dist/node_modules/standardized-audio-context/build/es2019/globals.cjs +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/globals.js +0 -20
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-buffer-source-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-buffer-source-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-node-output-connection.cjs +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-node-output-connection.js +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-worklet-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/audio-worklet-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/biquad-filter-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/biquad-filter-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/constant-source-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/constant-source-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/delay-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/delay-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/gain-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/gain-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/native-audio-node-faker.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/native-audio-node-faker.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/native-audio-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/native-audio-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/oscillator-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/oscillator-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/stereo-panner-node.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/guards/stereo-panner-node.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/add-active-input-connection-to-audio-param.cjs +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/add-active-input-connection-to-audio-param.js +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/add-passive-input-connection-to-audio-param.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/add-passive-input-connection-to-audio-param.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/assign-native-audio-node-audio-param-value.cjs +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/assign-native-audio-node-audio-param-value.js +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/assign-native-audio-node-option.cjs +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/assign-native-audio-node-option.js +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/assign-native-audio-node-options.cjs +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/assign-native-audio-node-options.js +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/compute-buffer-size.cjs +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/compute-buffer-size.js +0 -9
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/connect-native-audio-node-to-native-audio-node.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/connect-native-audio-node-to-native-audio-node.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/deactivate-active-audio-node-input-connections.cjs +0 -35
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/deactivate-active-audio-node-input-connections.js +0 -35
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/deactivate-audio-graph.cjs +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/deactivate-audio-graph.js +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-active-input-connection-to-audio-param.cjs +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-active-input-connection-to-audio-param.js +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-active-input-connection.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-active-input-connection.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-event-listeners-of-audio-node.cjs +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-event-listeners-of-audio-node.js +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-passive-input-connection-to-audio-node.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-passive-input-connection-to-audio-node.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-passive-input-connection-to-audio-param.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/delete-passive-input-connection-to-audio-param.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/detach-array-buffer.cjs +0 -21
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/detach-array-buffer.js +0 -21
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/disconnect-native-audio-node-from-native-audio-node.cjs +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/disconnect-native-audio-node-from-native-audio-node.js +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/filter-buffer.cjs +0 -26
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/filter-buffer.js +0 -26
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-audio-node-connections.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-audio-node-connections.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-audio-param-connections.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-audio-param-connections.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-event-listeners-of-audio-node.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-event-listeners-of-audio-node.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-first-sample.cjs +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-first-sample.js +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-native-audio-node.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-native-audio-node.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-native-audio-param.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-native-audio-param.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-value-for-key.cjs +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/get-value-for-key.js +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/insert-element-in-set.cjs +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/insert-element-in-set.js +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/intercept-connections.cjs +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/intercept-connections.js +0 -8
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-active-audio-node.cjs +0 -5
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-active-audio-node.js +0 -5
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-constructible.cjs +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-constructible.js +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-dc-curve.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-dc-curve.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-owned-by-context.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-owned-by-context.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-part-of-a-cycle.cjs +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-part-of-a-cycle.js +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-passive-audio-node.cjs +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/is-passive-audio-node.js +0 -7
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/overwrite-accessors.cjs +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/overwrite-accessors.js +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/pick-element-from-set.cjs +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/pick-element-from-set.js +0 -15
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/sanitize-channel-splitter-options.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/sanitize-channel-splitter-options.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/sanitize-periodic-wave-options.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/sanitize-periodic-wave-options.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-internal-state-to-active.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-internal-state-to-active.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-internal-state-to-passive-when-necessary.cjs +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-internal-state-to-passive-when-necessary.js +0 -10
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-internal-state-to-passive.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-internal-state-to-passive.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-value-at-time-until-possible.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/set-value-at-time-until-possible.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/split-import-statements.cjs +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/split-import-statements.js +0 -17
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-analyser-node-get-float-time-domain-data-method-support.cjs +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-analyser-node-get-float-time-domain-data-method-support.js +0 -6
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-copy-channel-methods-out-of-bounds-support.cjs +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-copy-channel-methods-out-of-bounds-support.js +0 -11
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-source-node-start-method-consecutive-calls-support.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-source-node-start-method-consecutive-calls-support.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-source-node-start-method-offset-clamping-support.cjs +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-source-node-start-method-offset-clamping-support.js +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-source-node-stop-method-nullified-buffer-support.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-buffer-source-node-stop-method-nullified-buffer-support.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-node-disconnect-method-support.cjs +0 -36
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-node-disconnect-method-support.js +0 -36
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-scheduled-source-node-start-method-negative-parameters-support.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-scheduled-source-node-start-method-negative-parameters-support.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-scheduled-source-node-stop-method-consecutive-calls-support.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-scheduled-source-node-stop-method-consecutive-calls-support.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-scheduled-source-node-stop-method-negative-parameters-support.cjs +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-audio-scheduled-source-node-stop-method-negative-parameters-support.js +0 -12
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-promise-support.cjs +0 -18
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/test-promise-support.js +0 -18
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/visit-each-audio-node-once.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/visit-each-audio-node-once.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-analyser-node-get-float-time-domain-data-method.cjs +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-analyser-node-get-float-time-domain-data-method.js +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-buffer-get-channel-data-method.cjs +0 -18
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-buffer-get-channel-data-method.js +0 -18
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-buffer-source-node-start-method-consecutive-calls.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-buffer-source-node-start-method-consecutive-calls.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-buffer-source-node-start-method-offset-clamping.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-buffer-source-node-start-method-offset-clamping.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-node-disconnect-method.cjs +0 -61
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-node-disconnect-method.js +0 -61
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-scheduled-source-node-start-method-negative-parameters.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-scheduled-source-node-start-method-negative-parameters.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-scheduled-source-node-stop-method-consecutive-calls.cjs +0 -31
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-scheduled-source-node-stop-method-consecutive-calls.js +0 -31
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-scheduled-source-node-stop-method-negative-parameters.cjs +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-audio-scheduled-source-node-stop-method-negative-parameters.js +0 -13
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-channel-splitter-node.cjs +0 -31
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-channel-splitter-node.js +0 -31
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-event-listener.cjs +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-event-listener.js +0 -16
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-iir-filter-node-get-frequency-response-method.cjs +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/helpers/wrap-iir-filter-node-get-frequency-response-method.js +0 -14
- package/dist/node_modules/standardized-audio-context/build/es2019/module.cjs +0 -298
- package/dist/node_modules/standardized-audio-context/build/es2019/module.js +0 -298
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ React components for audio waveform visualization and live recording.
|
|
|
6
6
|
|
|
7
7
|
- **Full TypeScript** - Complete type safety with detailed type definitions
|
|
8
8
|
- **Easy to Use** - Simple API with sensible defaults, works out of the box
|
|
9
|
+
- **Mobile Compatible** - WASM fallback decoder for reliable mobile browser support
|
|
9
10
|
- **Headless Hooks** - Full control with raw audio data for custom implementations
|
|
10
11
|
- **SSR Safe** - Compatible with Next.js and other SSR frameworks
|
|
11
12
|
|
|
@@ -31,7 +32,7 @@ Visualize existing audio files (mp3, wav, etc.) with playhead and seek support.
|
|
|
31
32
|
|
|
32
33
|

|
|
33
34
|
|
|
34
|
-
Static waveform visualization with playhead and
|
|
35
|
+
Static waveform visualization with playhead and drag-to-seek.
|
|
35
36
|
|
|
36
37
|
[▶ Demo](https://react-audio-wavekit.netlify.app/?path=/story/waveform-audiowaveform--default)
|
|
37
38
|
|
|
@@ -40,16 +41,25 @@ Static waveform visualization with playhead and click-to-seek.
|
|
|
40
41
|
blob={audioBlob}
|
|
41
42
|
currentTime={currentTime}
|
|
42
43
|
duration={duration}
|
|
43
|
-
|
|
44
|
+
onSeekStart={() => audio.pause()}
|
|
45
|
+
onSeekDrag={(time) => setCurrentTime(time)}
|
|
46
|
+
onSeekEnd={(time) => {
|
|
47
|
+
audio.currentTime = time;
|
|
48
|
+
audio.play();
|
|
49
|
+
}}
|
|
44
50
|
/>
|
|
45
51
|
```
|
|
46
52
|
|
|
47
53
|
| Prop | Type | Default | Description |
|
|
48
54
|
|------|------|---------|-------------|
|
|
49
|
-
| `blob` | `Blob \| null` | - | Audio blob to visualize
|
|
55
|
+
| `blob` | `Blob \| null` | - | Audio blob to visualize |
|
|
56
|
+
| `peaks` | `number[]` | - | Pre-computed peaks (0-1 range, skips decoding) |
|
|
50
57
|
| `currentTime` | `number` | - | Current playback time in seconds |
|
|
51
58
|
| `duration` | `number` | - | Total audio duration in seconds |
|
|
52
|
-
| `onSeek` | `(time: number) => void` | - | Callback
|
|
59
|
+
| `onSeek` | `(time: number) => void` | - | Callback for simple click-to-seek |
|
|
60
|
+
| `onSeekStart` | `() => void` | - | Callback when drag starts (pause playback) |
|
|
61
|
+
| `onSeekDrag` | `(time: number) => void` | - | Callback during drag (real-time updates) |
|
|
62
|
+
| `onSeekEnd` | `(time: number) => void` | - | Callback when drag ends (resume playback) |
|
|
53
63
|
| `suspense` | `boolean` | `false` | Enable React Suspense mode |
|
|
54
64
|
| `appearance` | `AudioWaveformAppearance` | - | See [Appearance Options](#appearance-options) |
|
|
55
65
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function getDefaultExportFromCjs(x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
+
}
|
|
6
|
+
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
|
4
|
+
const browser = require("../node_modules/@eshaz/web-worker/cjs/browser.cjs");
|
|
5
|
+
var browserExports = browser.__require();
|
|
6
|
+
const NodeWorker = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(browserExports);
|
|
7
|
+
exports.default = NodeWorker;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as requireBrowser } from "../node_modules/@eshaz/web-worker/cjs/browser.js";
|
|
3
|
+
var browserExports = requireBrowser();
|
|
4
|
+
const NodeWorker = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
5
|
+
export {
|
|
6
|
+
NodeWorker as default
|
|
7
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -17,8 +17,10 @@ export declare interface AudioWaveformAppearance extends WaveformAppearance {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
declare interface AudioWaveformProps extends React.CanvasHTMLAttributes<HTMLCanvasElement> {
|
|
20
|
-
/** Audio blob to visualize */
|
|
21
|
-
blob
|
|
20
|
+
/** Audio blob to visualize (provide either blob or peaks) */
|
|
21
|
+
blob?: Blob | null;
|
|
22
|
+
/** Pre-computed peaks data (normalized 0-1 range, skips decoding when provided) */
|
|
23
|
+
peaks?: number[];
|
|
22
24
|
/** Waveform appearance configuration (barColor, barWidth, playheadColor, etc.) */
|
|
23
25
|
appearance?: AudioWaveformAppearance;
|
|
24
26
|
/** Enable Suspense mode (requires Suspense boundary in parent) */
|
|
@@ -27,8 +29,14 @@ declare interface AudioWaveformProps extends React.CanvasHTMLAttributes<HTMLCanv
|
|
|
27
29
|
currentTime?: number;
|
|
28
30
|
/** Total audio duration in seconds (required for playhead positioning) */
|
|
29
31
|
duration?: number;
|
|
30
|
-
/** Callback when user clicks/seeks on waveform */
|
|
32
|
+
/** Callback when user clicks/seeks on waveform (simple seek) */
|
|
31
33
|
onSeek?: (time: number) => void;
|
|
34
|
+
/** Callback when drag-to-seek starts (use to pause playback) */
|
|
35
|
+
onSeekStart?: () => void;
|
|
36
|
+
/** Callback during drag-to-seek with current time (real-time updates) */
|
|
37
|
+
onSeekDrag?: (time: number) => void;
|
|
38
|
+
/** Callback when drag-to-seek ends (use to resume playback) */
|
|
39
|
+
onSeekEnd?: (time: number) => void;
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
declare interface AudioWaveformRef {
|
|
@@ -36,8 +44,8 @@ declare interface AudioWaveformRef {
|
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
47
|
+
* 실시간 오디오 주파수 시각화 컴포넌트
|
|
48
|
+
* MediaRecorder의 오디오를 Web Audio API로 분석하여 바 형태로 렌더링
|
|
41
49
|
*/
|
|
42
50
|
export declare const LiveRecorder: ForwardRefExoticComponent<LiveRecorderProps & RefAttributes<LiveRecorderRef>>;
|
|
43
51
|
|
|
@@ -100,7 +108,7 @@ declare interface LiveStreamingRecorderCanvasProps extends HTMLAttributes<HTMLCa
|
|
|
100
108
|
className?: string;
|
|
101
109
|
/** Inline styles for canvas element */
|
|
102
110
|
style?: React.CSSProperties;
|
|
103
|
-
/** Waveform appearance configuration (barColor, barWidth, etc.) - scrollbar
|
|
111
|
+
/** Waveform appearance configuration (barColor, barWidth, etc.) - scrollbar 설정은 Root에서만 유효 */
|
|
104
112
|
appearance?: LiveStreamingRecorderAppearance;
|
|
105
113
|
}
|
|
106
114
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var browser;
|
|
4
|
+
var hasRequiredBrowser;
|
|
5
|
+
function requireBrowser() {
|
|
6
|
+
if (hasRequiredBrowser) return browser;
|
|
7
|
+
hasRequiredBrowser = 1;
|
|
8
|
+
browser = Worker;
|
|
9
|
+
return browser;
|
|
10
|
+
}
|
|
11
|
+
exports.__require = requireBrowser;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const esm = require("../../../simple-yenc/dist/esm.cjs");
|
|
4
|
+
function WASMAudioDecoderCommon() {
|
|
5
|
+
const uint8Array = Uint8Array;
|
|
6
|
+
const float32Array = Float32Array;
|
|
7
|
+
if (!WASMAudioDecoderCommon.modules) {
|
|
8
|
+
Object.defineProperties(WASMAudioDecoderCommon, {
|
|
9
|
+
modules: {
|
|
10
|
+
value: /* @__PURE__ */ new WeakMap()
|
|
11
|
+
},
|
|
12
|
+
setModule: {
|
|
13
|
+
value(Ref, module2) {
|
|
14
|
+
WASMAudioDecoderCommon.modules.set(Ref, Promise.resolve(module2));
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
getModule: {
|
|
18
|
+
value(Ref, wasmString) {
|
|
19
|
+
let module2 = WASMAudioDecoderCommon.modules.get(Ref);
|
|
20
|
+
if (!module2) {
|
|
21
|
+
if (!wasmString) {
|
|
22
|
+
wasmString = Ref.wasm;
|
|
23
|
+
module2 = WASMAudioDecoderCommon.inflateDynEncodeString(
|
|
24
|
+
wasmString
|
|
25
|
+
).then((data) => WebAssembly.compile(data));
|
|
26
|
+
} else {
|
|
27
|
+
module2 = WebAssembly.compile(esm.decode(wasmString));
|
|
28
|
+
}
|
|
29
|
+
WASMAudioDecoderCommon.modules.set(Ref, module2);
|
|
30
|
+
}
|
|
31
|
+
return module2;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
concatFloat32: {
|
|
35
|
+
value(buffers, length) {
|
|
36
|
+
let ret = new float32Array(length), i = 0, offset = 0;
|
|
37
|
+
while (i < buffers.length) {
|
|
38
|
+
ret.set(buffers[i], offset);
|
|
39
|
+
offset += buffers[i++].length;
|
|
40
|
+
}
|
|
41
|
+
return ret;
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
getDecodedAudio: {
|
|
45
|
+
value: (errors, channelData, samplesDecoded, sampleRate, bitDepth) => ({
|
|
46
|
+
errors,
|
|
47
|
+
channelData,
|
|
48
|
+
samplesDecoded,
|
|
49
|
+
sampleRate,
|
|
50
|
+
bitDepth
|
|
51
|
+
})
|
|
52
|
+
},
|
|
53
|
+
getDecodedAudioMultiChannel: {
|
|
54
|
+
value(errors, input, channelsDecoded, samplesDecoded, sampleRate, bitDepth) {
|
|
55
|
+
let channelData = [], i, j;
|
|
56
|
+
for (i = 0; i < channelsDecoded; i++) {
|
|
57
|
+
const channel = [];
|
|
58
|
+
for (j = 0; j < input.length; ) channel.push(input[j++][i] || []);
|
|
59
|
+
channelData.push(
|
|
60
|
+
WASMAudioDecoderCommon.concatFloat32(channel, samplesDecoded)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return WASMAudioDecoderCommon.getDecodedAudio(
|
|
64
|
+
errors,
|
|
65
|
+
channelData,
|
|
66
|
+
samplesDecoded,
|
|
67
|
+
sampleRate,
|
|
68
|
+
bitDepth
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
/*
|
|
73
|
+
******************
|
|
74
|
+
* Compression Code
|
|
75
|
+
******************
|
|
76
|
+
*/
|
|
77
|
+
inflateDynEncodeString: {
|
|
78
|
+
value(source) {
|
|
79
|
+
source = esm.decode(source);
|
|
80
|
+
return new Promise((resolve) => {
|
|
81
|
+
const puffString = String.raw`dynEncode012804c7886d()((()>+*§§)§,§§§§)§+§§§)§+.-()(*)-+)(.7*§)i¸¸,3§(i¸¸,3/G+.¡*(,(,3+)2å:-),§H(P*DI*H(P*@I++hH)H*r,hH(H(P*<J,i)^*<H,H(P*4U((I-H(H*i0J,^*DH+H-H*I+H,I*4)33H(H*H)^*DH(H+H)^*@H+i§H)i§3æ*).§K(iHI/+§H,iHn,§H+i(H+i(rCJ0I,H*I-+hH,,hH(H-V)(i)J.H.W)(i)c)(H,i)I,H-i*I-4)33i(I.*hH(V)(H+n5(H(i*I-i(I,i)I.+hH,i*J+iHn,hi(I-i*I,+hH,H/H-c)(H,iFn,hi(I,+hH,H0n5-H*V)(J(,hH/H(i)J(H(V)(J(i)c)(H)H(i)H,c)(3H*i*I*H,i)I,4(3(-H(H,W)(H-I-H,i*I,4)3(3(3H,H-I1H+I,H.i)H1V)(J.i(v5(33H.-H(H,i(c)(H,i*I,4)333)-§i*I*+§H*iHn,hi73H,H(i)8(H+J+H)P*(H*V)(J-r,§H)P*,H.i)H+H,i)V)(-H*i*I*H+i)I+H-H.I.H,H-i)I,4)333Ã+)-§iø7i(^*(iü7I,*h+hH+iDn,h*hilI+i)I,+hH+,hH+iô7H,c)(i)H+i´8W)(H,I,H+i*I+4)-+hH(H)8*J-i(p5.*h*h*hH-i')u,hH(P*(J+,hH(P*0J,H(P*,n50H+H,H-b((3H(P*0i)I.4)3H-i¨*n5*H-iÅ*s,hi73H-i)J+V)&+I,H(H+V)æ,8(I.H(H*8*J-i(p51H-i)J+i¸7V)(H(H+iø7V)(8(J/H(P*0J+s,hi73H+H,H.J,I.H(P*(m5(H.H(P*,s5.+hH,m5*H(P*(J.H+H.H+H/U((b((H(H(P*0i)J+^*0H,i)I,4(3(3H(H.^*03H-i¨*o5)33i(73(3(3-H,H+i)c)(H,i*I,H+i)I+4)33i)I-3H-3!2)0§K(i2J,L(H,H(^*(H,H*^*4H,i(^*0H,i(^*DH,j(_*<H,H)P*(^*,H,H+P*(^*8*h*h+hH,i)8(I3i§I**h*h*h*h*h*h*hH,i*8(6+(),03H,j(_*@i*I-H,P*<J.i,J(H,P*8J/s50H,H.i+J0^*<i¦I*H.H,P*4J1J.U(*H.U((J2i')o5/H.U()I.H,H(^*<H0H1U((H.i0J.i§i0i')o5/H/H.H2J*H(J.q50H,P*0J/H*I-H,P*(J0,hH,P*,H-q,hi)I-423+hH*m5+H/H0H(H1U((b((H/i)I/H(i)I(H*i)I*4(3(3H,H.^*<H,H-^*04*3iØ1U((5+i(I(i¨7i1^*(i$6iè1^*(i°7iè6^*(i¬7iÈ6^*(+hH(iÈ*n,hiÈ*I(+hH(i¨,n,hi¨,I(+hH(iØ,n,hiØ,I(+hH(iè,o,hH,i-H(i0c)(H(i*I(4)33iè1i1H,i-iÈ*8)Bi(I(+hH(ido,hH,i-H(i-c)(H(i*I(4)33iÈ6iè6H,i-iF8)BiØ1i)b((41-H,i-H(i/c)(H(i*I(4)3(3(-H,i-H(i1c)(H(i*I(4)3(3(-H,i-H(i0c)(H(i*I(4)3(3(3H,H/^*0H,H(^*<3i(I*4*3H,H,i¸)^*TH,H,iø-^*PH,H,iX^*LH,H,i(^*HH,i-8(I(H,i-8(I-i¥I*H,i,8(I.H(iErH-iEr5)H(i©*I1H-i)I0i(i;H.i,J(i(H(i(rCJ(J*H*i;sCI*i¨1I-H(I/+hH/,hH,i-H-V)(i)H,i+8(c)(H/i)I/H-i*I-H*i)I*4)-H(i)i¨1I/+hH(H*o,hH,i-H/V)(i)i(c)(H/i*I/H(i)I(4)33i¤I*H,iø-H,i¸)H,i-i;8)5+H0H1I2i(I-+hH-H2p,hH,H,iP8*J*i(p5-H*i7u,hH,i-H-i)H*c)(H-i)I-4*3i(I/i+I.i+I(*h*h*hH*i86*(*)3H-m,hi£I*403H-i)H,W)-I/i*I(4)3i3I.i/I(3H2H,H(8(H.J(H-J.p,hi¢I*4.3H,i-H-i)I*+hH(,hH*H/c)(H*i*I*H(i)I(4)-H.I-4+3(3(33H,W)1m,hiI*4,3H,iø-H,i¸)H,i-H18)J(,hi¡I*H(i(p5,H1H,V)ú-H,V)ø-o5,3H,i(H,iXH,i-H1i)H08)J(,hi I*H(i(p5,H0H,V)H,V)o5,3H,H,iPH,iH8+I*4+3(3(3H,i$6i¬78+I*3H*H3m5(3i)I-H*i(r5)3H)H,P*0^*(H+H,P*<^*(H*I-3H,i2L(H-33Á)+(i¨03b+(,(-(.(/(0(1(2(3(5(7(9(;(?(C(G(K(S([(c(k({(((«(Ë(ë((*)(iø03O)()()()(*(*(*(*(+(+(+(+(,(,(,(,(-(-(-(-(i¨13M8(9(:(((0(/(1(.(2(-(3(,(4(+(5(*(6()(7(T7*S7US0U `;
|
|
82
|
+
WASMAudioDecoderCommon.getModule(WASMAudioDecoderCommon, puffString).then((wasm) => WebAssembly.instantiate(wasm, {})).then(({ exports: exports$1 }) => {
|
|
83
|
+
const instanceExports = new Map(Object.entries(exports$1));
|
|
84
|
+
const puff = instanceExports.get("puff");
|
|
85
|
+
const memory = instanceExports.get("memory")["buffer"];
|
|
86
|
+
const dataArray = new uint8Array(memory);
|
|
87
|
+
const heapView = new DataView(memory);
|
|
88
|
+
let heapPos = instanceExports.get("__heap_base");
|
|
89
|
+
const sourceLength = source.length;
|
|
90
|
+
const sourceLengthPtr = heapPos;
|
|
91
|
+
heapPos += 4;
|
|
92
|
+
heapView.setInt32(sourceLengthPtr, sourceLength, true);
|
|
93
|
+
const sourcePtr = heapPos;
|
|
94
|
+
heapPos += sourceLength;
|
|
95
|
+
dataArray.set(source, sourcePtr);
|
|
96
|
+
const destLengthPtr = heapPos;
|
|
97
|
+
heapPos += 4;
|
|
98
|
+
heapView.setInt32(
|
|
99
|
+
destLengthPtr,
|
|
100
|
+
dataArray.byteLength - heapPos,
|
|
101
|
+
true
|
|
102
|
+
);
|
|
103
|
+
puff(heapPos, destLengthPtr, sourcePtr, sourceLengthPtr);
|
|
104
|
+
resolve(
|
|
105
|
+
dataArray.slice(
|
|
106
|
+
heapPos,
|
|
107
|
+
heapPos + heapView.getInt32(destLengthPtr, true)
|
|
108
|
+
)
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
Object.defineProperty(this, "wasm", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: () => this._wasm
|
|
119
|
+
});
|
|
120
|
+
this.getOutputChannels = (outputData, channelsDecoded, samplesDecoded) => {
|
|
121
|
+
let output = [], i = 0;
|
|
122
|
+
while (i < channelsDecoded)
|
|
123
|
+
output.push(
|
|
124
|
+
outputData.slice(
|
|
125
|
+
i * samplesDecoded,
|
|
126
|
+
i++ * samplesDecoded + samplesDecoded
|
|
127
|
+
)
|
|
128
|
+
);
|
|
129
|
+
return output;
|
|
130
|
+
};
|
|
131
|
+
this.allocateTypedArray = (len, TypedArray, setPointer = true) => {
|
|
132
|
+
const ptr = this._wasm.malloc(TypedArray.BYTES_PER_ELEMENT * len);
|
|
133
|
+
if (setPointer) this._pointers.add(ptr);
|
|
134
|
+
return {
|
|
135
|
+
ptr,
|
|
136
|
+
len,
|
|
137
|
+
buf: new TypedArray(this._wasm.HEAP, ptr, len)
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
this.free = () => {
|
|
141
|
+
this._pointers.forEach((ptr) => {
|
|
142
|
+
this._wasm.free(ptr);
|
|
143
|
+
});
|
|
144
|
+
this._pointers.clear();
|
|
145
|
+
};
|
|
146
|
+
this.codeToString = (ptr) => {
|
|
147
|
+
const characters = [], heap = new Uint8Array(this._wasm.HEAP);
|
|
148
|
+
for (let character = heap[ptr]; character !== 0; character = heap[++ptr])
|
|
149
|
+
characters.push(character);
|
|
150
|
+
return String.fromCharCode.apply(null, characters);
|
|
151
|
+
};
|
|
152
|
+
this.addError = (errors, message, frameLength, frameNumber, inputBytes, outputSamples) => {
|
|
153
|
+
errors.push({
|
|
154
|
+
message,
|
|
155
|
+
frameLength,
|
|
156
|
+
frameNumber,
|
|
157
|
+
inputBytes,
|
|
158
|
+
outputSamples
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
this.instantiate = (_EmscriptenWASM, _module) => {
|
|
162
|
+
if (_module) WASMAudioDecoderCommon.setModule(_EmscriptenWASM, _module);
|
|
163
|
+
this._wasm = new _EmscriptenWASM(WASMAudioDecoderCommon).instantiate();
|
|
164
|
+
this._pointers = /* @__PURE__ */ new Set();
|
|
165
|
+
return this._wasm.ready.then(() => this);
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
exports.default = WASMAudioDecoderCommon;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { decode as e } from "../../../simple-yenc/dist/esm.js";
|
|
2
|
+
function WASMAudioDecoderCommon() {
|
|
3
|
+
const uint8Array = Uint8Array;
|
|
4
|
+
const float32Array = Float32Array;
|
|
5
|
+
if (!WASMAudioDecoderCommon.modules) {
|
|
6
|
+
Object.defineProperties(WASMAudioDecoderCommon, {
|
|
7
|
+
modules: {
|
|
8
|
+
value: /* @__PURE__ */ new WeakMap()
|
|
9
|
+
},
|
|
10
|
+
setModule: {
|
|
11
|
+
value(Ref, module) {
|
|
12
|
+
WASMAudioDecoderCommon.modules.set(Ref, Promise.resolve(module));
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
getModule: {
|
|
16
|
+
value(Ref, wasmString) {
|
|
17
|
+
let module = WASMAudioDecoderCommon.modules.get(Ref);
|
|
18
|
+
if (!module) {
|
|
19
|
+
if (!wasmString) {
|
|
20
|
+
wasmString = Ref.wasm;
|
|
21
|
+
module = WASMAudioDecoderCommon.inflateDynEncodeString(
|
|
22
|
+
wasmString
|
|
23
|
+
).then((data) => WebAssembly.compile(data));
|
|
24
|
+
} else {
|
|
25
|
+
module = WebAssembly.compile(e(wasmString));
|
|
26
|
+
}
|
|
27
|
+
WASMAudioDecoderCommon.modules.set(Ref, module);
|
|
28
|
+
}
|
|
29
|
+
return module;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
concatFloat32: {
|
|
33
|
+
value(buffers, length) {
|
|
34
|
+
let ret = new float32Array(length), i = 0, offset = 0;
|
|
35
|
+
while (i < buffers.length) {
|
|
36
|
+
ret.set(buffers[i], offset);
|
|
37
|
+
offset += buffers[i++].length;
|
|
38
|
+
}
|
|
39
|
+
return ret;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
getDecodedAudio: {
|
|
43
|
+
value: (errors, channelData, samplesDecoded, sampleRate, bitDepth) => ({
|
|
44
|
+
errors,
|
|
45
|
+
channelData,
|
|
46
|
+
samplesDecoded,
|
|
47
|
+
sampleRate,
|
|
48
|
+
bitDepth
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
getDecodedAudioMultiChannel: {
|
|
52
|
+
value(errors, input, channelsDecoded, samplesDecoded, sampleRate, bitDepth) {
|
|
53
|
+
let channelData = [], i, j;
|
|
54
|
+
for (i = 0; i < channelsDecoded; i++) {
|
|
55
|
+
const channel = [];
|
|
56
|
+
for (j = 0; j < input.length; ) channel.push(input[j++][i] || []);
|
|
57
|
+
channelData.push(
|
|
58
|
+
WASMAudioDecoderCommon.concatFloat32(channel, samplesDecoded)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return WASMAudioDecoderCommon.getDecodedAudio(
|
|
62
|
+
errors,
|
|
63
|
+
channelData,
|
|
64
|
+
samplesDecoded,
|
|
65
|
+
sampleRate,
|
|
66
|
+
bitDepth
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
/*
|
|
71
|
+
******************
|
|
72
|
+
* Compression Code
|
|
73
|
+
******************
|
|
74
|
+
*/
|
|
75
|
+
inflateDynEncodeString: {
|
|
76
|
+
value(source) {
|
|
77
|
+
source = e(source);
|
|
78
|
+
return new Promise((resolve) => {
|
|
79
|
+
const puffString = String.raw`dynEncode012804c7886d()((()>+*§§)§,§§§§)§+§§§)§+.-()(*)-+)(.7*§)i¸¸,3§(i¸¸,3/G+.¡*(,(,3+)2å:-),§H(P*DI*H(P*@I++hH)H*r,hH(H(P*<J,i)^*<H,H(P*4U((I-H(H*i0J,^*DH+H-H*I+H,I*4)33H(H*H)^*DH(H+H)^*@H+i§H)i§3æ*).§K(iHI/+§H,iHn,§H+i(H+i(rCJ0I,H*I-+hH,,hH(H-V)(i)J.H.W)(i)c)(H,i)I,H-i*I-4)33i(I.*hH(V)(H+n5(H(i*I-i(I,i)I.+hH,i*J+iHn,hi(I-i*I,+hH,H/H-c)(H,iFn,hi(I,+hH,H0n5-H*V)(J(,hH/H(i)J(H(V)(J(i)c)(H)H(i)H,c)(3H*i*I*H,i)I,4(3(-H(H,W)(H-I-H,i*I,4)3(3(3H,H-I1H+I,H.i)H1V)(J.i(v5(33H.-H(H,i(c)(H,i*I,4)333)-§i*I*+§H*iHn,hi73H,H(i)8(H+J+H)P*(H*V)(J-r,§H)P*,H.i)H+H,i)V)(-H*i*I*H+i)I+H-H.I.H,H-i)I,4)333Ã+)-§iø7i(^*(iü7I,*h+hH+iDn,h*hilI+i)I,+hH+,hH+iô7H,c)(i)H+i´8W)(H,I,H+i*I+4)-+hH(H)8*J-i(p5.*h*h*hH-i')u,hH(P*(J+,hH(P*0J,H(P*,n50H+H,H-b((3H(P*0i)I.4)3H-i¨*n5*H-iÅ*s,hi73H-i)J+V)&+I,H(H+V)æ,8(I.H(H*8*J-i(p51H-i)J+i¸7V)(H(H+iø7V)(8(J/H(P*0J+s,hi73H+H,H.J,I.H(P*(m5(H.H(P*,s5.+hH,m5*H(P*(J.H+H.H+H/U((b((H(H(P*0i)J+^*0H,i)I,4(3(3H(H.^*03H-i¨*o5)33i(73(3(3-H,H+i)c)(H,i*I,H+i)I+4)33i)I-3H-3!2)0§K(i2J,L(H,H(^*(H,H*^*4H,i(^*0H,i(^*DH,j(_*<H,H)P*(^*,H,H+P*(^*8*h*h+hH,i)8(I3i§I**h*h*h*h*h*h*hH,i*8(6+(),03H,j(_*@i*I-H,P*<J.i,J(H,P*8J/s50H,H.i+J0^*<i¦I*H.H,P*4J1J.U(*H.U((J2i')o5/H.U()I.H,H(^*<H0H1U((H.i0J.i§i0i')o5/H/H.H2J*H(J.q50H,P*0J/H*I-H,P*(J0,hH,P*,H-q,hi)I-423+hH*m5+H/H0H(H1U((b((H/i)I/H(i)I(H*i)I*4(3(3H,H.^*<H,H-^*04*3iØ1U((5+i(I(i¨7i1^*(i$6iè1^*(i°7iè6^*(i¬7iÈ6^*(+hH(iÈ*n,hiÈ*I(+hH(i¨,n,hi¨,I(+hH(iØ,n,hiØ,I(+hH(iè,o,hH,i-H(i0c)(H(i*I(4)33iè1i1H,i-iÈ*8)Bi(I(+hH(ido,hH,i-H(i-c)(H(i*I(4)33iÈ6iè6H,i-iF8)BiØ1i)b((41-H,i-H(i/c)(H(i*I(4)3(3(-H,i-H(i1c)(H(i*I(4)3(3(-H,i-H(i0c)(H(i*I(4)3(3(3H,H/^*0H,H(^*<3i(I*4*3H,H,i¸)^*TH,H,iø-^*PH,H,iX^*LH,H,i(^*HH,i-8(I(H,i-8(I-i¥I*H,i,8(I.H(iErH-iEr5)H(i©*I1H-i)I0i(i;H.i,J(i(H(i(rCJ(J*H*i;sCI*i¨1I-H(I/+hH/,hH,i-H-V)(i)H,i+8(c)(H/i)I/H-i*I-H*i)I*4)-H(i)i¨1I/+hH(H*o,hH,i-H/V)(i)i(c)(H/i*I/H(i)I(4)33i¤I*H,iø-H,i¸)H,i-i;8)5+H0H1I2i(I-+hH-H2p,hH,H,iP8*J*i(p5-H*i7u,hH,i-H-i)H*c)(H-i)I-4*3i(I/i+I.i+I(*h*h*hH*i86*(*)3H-m,hi£I*403H-i)H,W)-I/i*I(4)3i3I.i/I(3H2H,H(8(H.J(H-J.p,hi¢I*4.3H,i-H-i)I*+hH(,hH*H/c)(H*i*I*H(i)I(4)-H.I-4+3(3(33H,W)1m,hiI*4,3H,iø-H,i¸)H,i-H18)J(,hi¡I*H(i(p5,H1H,V)ú-H,V)ø-o5,3H,i(H,iXH,i-H1i)H08)J(,hi I*H(i(p5,H0H,V)H,V)o5,3H,H,iPH,iH8+I*4+3(3(3H,i$6i¬78+I*3H*H3m5(3i)I-H*i(r5)3H)H,P*0^*(H+H,P*<^*(H*I-3H,i2L(H-33Á)+(i¨03b+(,(-(.(/(0(1(2(3(5(7(9(;(?(C(G(K(S([(c(k({(((«(Ë(ë((*)(iø03O)()()()(*(*(*(*(+(+(+(+(,(,(,(,(-(-(-(-(i¨13M8(9(:(((0(/(1(.(2(-(3(,(4(+(5(*(6()(7(T7*S7US0U `;
|
|
80
|
+
WASMAudioDecoderCommon.getModule(WASMAudioDecoderCommon, puffString).then((wasm) => WebAssembly.instantiate(wasm, {})).then(({ exports: exports$1 }) => {
|
|
81
|
+
const instanceExports = new Map(Object.entries(exports$1));
|
|
82
|
+
const puff = instanceExports.get("puff");
|
|
83
|
+
const memory = instanceExports.get("memory")["buffer"];
|
|
84
|
+
const dataArray = new uint8Array(memory);
|
|
85
|
+
const heapView = new DataView(memory);
|
|
86
|
+
let heapPos = instanceExports.get("__heap_base");
|
|
87
|
+
const sourceLength = source.length;
|
|
88
|
+
const sourceLengthPtr = heapPos;
|
|
89
|
+
heapPos += 4;
|
|
90
|
+
heapView.setInt32(sourceLengthPtr, sourceLength, true);
|
|
91
|
+
const sourcePtr = heapPos;
|
|
92
|
+
heapPos += sourceLength;
|
|
93
|
+
dataArray.set(source, sourcePtr);
|
|
94
|
+
const destLengthPtr = heapPos;
|
|
95
|
+
heapPos += 4;
|
|
96
|
+
heapView.setInt32(
|
|
97
|
+
destLengthPtr,
|
|
98
|
+
dataArray.byteLength - heapPos,
|
|
99
|
+
true
|
|
100
|
+
);
|
|
101
|
+
puff(heapPos, destLengthPtr, sourcePtr, sourceLengthPtr);
|
|
102
|
+
resolve(
|
|
103
|
+
dataArray.slice(
|
|
104
|
+
heapPos,
|
|
105
|
+
heapPos + heapView.getInt32(destLengthPtr, true)
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
Object.defineProperty(this, "wasm", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: () => this._wasm
|
|
117
|
+
});
|
|
118
|
+
this.getOutputChannels = (outputData, channelsDecoded, samplesDecoded) => {
|
|
119
|
+
let output = [], i = 0;
|
|
120
|
+
while (i < channelsDecoded)
|
|
121
|
+
output.push(
|
|
122
|
+
outputData.slice(
|
|
123
|
+
i * samplesDecoded,
|
|
124
|
+
i++ * samplesDecoded + samplesDecoded
|
|
125
|
+
)
|
|
126
|
+
);
|
|
127
|
+
return output;
|
|
128
|
+
};
|
|
129
|
+
this.allocateTypedArray = (len, TypedArray, setPointer = true) => {
|
|
130
|
+
const ptr = this._wasm.malloc(TypedArray.BYTES_PER_ELEMENT * len);
|
|
131
|
+
if (setPointer) this._pointers.add(ptr);
|
|
132
|
+
return {
|
|
133
|
+
ptr,
|
|
134
|
+
len,
|
|
135
|
+
buf: new TypedArray(this._wasm.HEAP, ptr, len)
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
this.free = () => {
|
|
139
|
+
this._pointers.forEach((ptr) => {
|
|
140
|
+
this._wasm.free(ptr);
|
|
141
|
+
});
|
|
142
|
+
this._pointers.clear();
|
|
143
|
+
};
|
|
144
|
+
this.codeToString = (ptr) => {
|
|
145
|
+
const characters = [], heap = new Uint8Array(this._wasm.HEAP);
|
|
146
|
+
for (let character = heap[ptr]; character !== 0; character = heap[++ptr])
|
|
147
|
+
characters.push(character);
|
|
148
|
+
return String.fromCharCode.apply(null, characters);
|
|
149
|
+
};
|
|
150
|
+
this.addError = (errors, message, frameLength, frameNumber, inputBytes, outputSamples) => {
|
|
151
|
+
errors.push({
|
|
152
|
+
message,
|
|
153
|
+
frameLength,
|
|
154
|
+
frameNumber,
|
|
155
|
+
inputBytes,
|
|
156
|
+
outputSamples
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
this.instantiate = (_EmscriptenWASM, _module) => {
|
|
160
|
+
if (_module) WASMAudioDecoderCommon.setModule(_EmscriptenWASM, _module);
|
|
161
|
+
this._wasm = new _EmscriptenWASM(WASMAudioDecoderCommon).instantiate();
|
|
162
|
+
this._pointers = /* @__PURE__ */ new Set();
|
|
163
|
+
return this._wasm.ready.then(() => this);
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
export {
|
|
167
|
+
WASMAudioDecoderCommon as default
|
|
168
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const browser = require("../../../../_virtual/browser.cjs");
|
|
4
|
+
const WASMAudioDecoderCommon = require("./WASMAudioDecoderCommon.cjs");
|
|
5
|
+
const getWorker = () => globalThis.Worker || browser.default;
|
|
6
|
+
class WASMAudioDecoderWorker extends getWorker() {
|
|
7
|
+
constructor(options, name, Decoder, EmscriptenWASM) {
|
|
8
|
+
if (!WASMAudioDecoderCommon.default.modules) new WASMAudioDecoderCommon.default();
|
|
9
|
+
let source = WASMAudioDecoderCommon.default.modules.get(Decoder);
|
|
10
|
+
if (!source) {
|
|
11
|
+
let type = "text/javascript", isNode, webworkerSourceCode = `'use strict';(${((_Decoder, _WASMAudioDecoderCommon, _EmscriptenWASM) => {
|
|
12
|
+
let decoder, moduleResolve, modulePromise = new Promise((resolve) => {
|
|
13
|
+
moduleResolve = resolve;
|
|
14
|
+
});
|
|
15
|
+
self.onmessage = ({ data: { id, command, data } }) => {
|
|
16
|
+
let messagePromise = modulePromise, messagePayload = { id }, transferList;
|
|
17
|
+
if (command === "init") {
|
|
18
|
+
Object.defineProperties(_Decoder, {
|
|
19
|
+
WASMAudioDecoderCommon: { value: _WASMAudioDecoderCommon },
|
|
20
|
+
EmscriptenWASM: { value: _EmscriptenWASM },
|
|
21
|
+
module: { value: data.module },
|
|
22
|
+
isWebWorker: { value: true }
|
|
23
|
+
});
|
|
24
|
+
decoder = new _Decoder(data.options);
|
|
25
|
+
moduleResolve();
|
|
26
|
+
} else if (command === "free") {
|
|
27
|
+
decoder.free();
|
|
28
|
+
} else if (command === "ready") {
|
|
29
|
+
messagePromise = messagePromise.then(() => decoder.ready);
|
|
30
|
+
} else if (command === "reset") {
|
|
31
|
+
messagePromise = messagePromise.then(() => decoder.reset());
|
|
32
|
+
} else {
|
|
33
|
+
Object.assign(
|
|
34
|
+
messagePayload,
|
|
35
|
+
decoder[command](
|
|
36
|
+
// detach buffers
|
|
37
|
+
Array.isArray(data) ? data.map((data2) => new Uint8Array(data2)) : new Uint8Array(data)
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
transferList = messagePayload.channelData ? messagePayload.channelData.map((channel) => channel.buffer) : [];
|
|
41
|
+
}
|
|
42
|
+
messagePromise.then(
|
|
43
|
+
() => self.postMessage(messagePayload, transferList)
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
}).toString()})(${Decoder}, ${WASMAudioDecoderCommon.default}, ${EmscriptenWASM})`;
|
|
47
|
+
try {
|
|
48
|
+
isNode = typeof process.versions.node !== "undefined";
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
source = isNode ? `data:${type};base64,${Buffer.from(webworkerSourceCode).toString(
|
|
52
|
+
"base64"
|
|
53
|
+
)}` : URL.createObjectURL(new Blob([webworkerSourceCode], { type }));
|
|
54
|
+
WASMAudioDecoderCommon.default.modules.set(Decoder, source);
|
|
55
|
+
}
|
|
56
|
+
super(source, { name });
|
|
57
|
+
this._id = Number.MIN_SAFE_INTEGER;
|
|
58
|
+
this._enqueuedOperations = /* @__PURE__ */ new Map();
|
|
59
|
+
this.onmessage = ({ data }) => {
|
|
60
|
+
const { id, ...rest } = data;
|
|
61
|
+
this._enqueuedOperations.get(id)(rest);
|
|
62
|
+
this._enqueuedOperations.delete(id);
|
|
63
|
+
};
|
|
64
|
+
new EmscriptenWASM(WASMAudioDecoderCommon.default).getModule().then((module2) => {
|
|
65
|
+
this.postToDecoder("init", { module: module2, options });
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async postToDecoder(command, data) {
|
|
69
|
+
return new Promise((resolve) => {
|
|
70
|
+
this.postMessage({
|
|
71
|
+
command,
|
|
72
|
+
id: this._id,
|
|
73
|
+
data
|
|
74
|
+
});
|
|
75
|
+
this._enqueuedOperations.set(this._id++, resolve);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
get ready() {
|
|
79
|
+
return this.postToDecoder("ready");
|
|
80
|
+
}
|
|
81
|
+
async free() {
|
|
82
|
+
await this.postToDecoder("free").finally(() => {
|
|
83
|
+
this.terminate();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async reset() {
|
|
87
|
+
await this.postToDecoder("reset");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.default = WASMAudioDecoderWorker;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import NodeWorker from "../../../../_virtual/browser.js";
|
|
2
|
+
import WASMAudioDecoderCommon from "./WASMAudioDecoderCommon.js";
|
|
3
|
+
const getWorker = () => globalThis.Worker || NodeWorker;
|
|
4
|
+
class WASMAudioDecoderWorker extends getWorker() {
|
|
5
|
+
constructor(options, name, Decoder, EmscriptenWASM) {
|
|
6
|
+
if (!WASMAudioDecoderCommon.modules) new WASMAudioDecoderCommon();
|
|
7
|
+
let source = WASMAudioDecoderCommon.modules.get(Decoder);
|
|
8
|
+
if (!source) {
|
|
9
|
+
let type = "text/javascript", isNode, webworkerSourceCode = `'use strict';(${((_Decoder, _WASMAudioDecoderCommon, _EmscriptenWASM) => {
|
|
10
|
+
let decoder, moduleResolve, modulePromise = new Promise((resolve) => {
|
|
11
|
+
moduleResolve = resolve;
|
|
12
|
+
});
|
|
13
|
+
self.onmessage = ({ data: { id, command, data } }) => {
|
|
14
|
+
let messagePromise = modulePromise, messagePayload = { id }, transferList;
|
|
15
|
+
if (command === "init") {
|
|
16
|
+
Object.defineProperties(_Decoder, {
|
|
17
|
+
WASMAudioDecoderCommon: { value: _WASMAudioDecoderCommon },
|
|
18
|
+
EmscriptenWASM: { value: _EmscriptenWASM },
|
|
19
|
+
module: { value: data.module },
|
|
20
|
+
isWebWorker: { value: true }
|
|
21
|
+
});
|
|
22
|
+
decoder = new _Decoder(data.options);
|
|
23
|
+
moduleResolve();
|
|
24
|
+
} else if (command === "free") {
|
|
25
|
+
decoder.free();
|
|
26
|
+
} else if (command === "ready") {
|
|
27
|
+
messagePromise = messagePromise.then(() => decoder.ready);
|
|
28
|
+
} else if (command === "reset") {
|
|
29
|
+
messagePromise = messagePromise.then(() => decoder.reset());
|
|
30
|
+
} else {
|
|
31
|
+
Object.assign(
|
|
32
|
+
messagePayload,
|
|
33
|
+
decoder[command](
|
|
34
|
+
// detach buffers
|
|
35
|
+
Array.isArray(data) ? data.map((data2) => new Uint8Array(data2)) : new Uint8Array(data)
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
transferList = messagePayload.channelData ? messagePayload.channelData.map((channel) => channel.buffer) : [];
|
|
39
|
+
}
|
|
40
|
+
messagePromise.then(
|
|
41
|
+
() => self.postMessage(messagePayload, transferList)
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
}).toString()})(${Decoder}, ${WASMAudioDecoderCommon}, ${EmscriptenWASM})`;
|
|
45
|
+
try {
|
|
46
|
+
isNode = typeof process.versions.node !== "undefined";
|
|
47
|
+
} catch {
|
|
48
|
+
}
|
|
49
|
+
source = isNode ? `data:${type};base64,${Buffer.from(webworkerSourceCode).toString(
|
|
50
|
+
"base64"
|
|
51
|
+
)}` : URL.createObjectURL(new Blob([webworkerSourceCode], { type }));
|
|
52
|
+
WASMAudioDecoderCommon.modules.set(Decoder, source);
|
|
53
|
+
}
|
|
54
|
+
super(source, { name });
|
|
55
|
+
this._id = Number.MIN_SAFE_INTEGER;
|
|
56
|
+
this._enqueuedOperations = /* @__PURE__ */ new Map();
|
|
57
|
+
this.onmessage = ({ data }) => {
|
|
58
|
+
const { id, ...rest } = data;
|
|
59
|
+
this._enqueuedOperations.get(id)(rest);
|
|
60
|
+
this._enqueuedOperations.delete(id);
|
|
61
|
+
};
|
|
62
|
+
new EmscriptenWASM(WASMAudioDecoderCommon).getModule().then((module) => {
|
|
63
|
+
this.postToDecoder("init", { module, options });
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async postToDecoder(command, data) {
|
|
67
|
+
return new Promise((resolve) => {
|
|
68
|
+
this.postMessage({
|
|
69
|
+
command,
|
|
70
|
+
id: this._id,
|
|
71
|
+
data
|
|
72
|
+
});
|
|
73
|
+
this._enqueuedOperations.set(this._id++, resolve);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
get ready() {
|
|
77
|
+
return this.postToDecoder("ready");
|
|
78
|
+
}
|
|
79
|
+
async free() {
|
|
80
|
+
await this.postToDecoder("free").finally(() => {
|
|
81
|
+
this.terminate();
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
async reset() {
|
|
85
|
+
await this.postToDecoder("reset");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
WASMAudioDecoderWorker as default
|
|
90
|
+
};
|