@pexip/media-processor 20.3.4 → 21.0.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/CHANGELOG.md +47 -0
- package/api-docs/README.mdx +438 -0
- package/api-docs/enumerations/AbortReason.mdx +5 -0
- package/api-docs/functions/avg.mdx +15 -0
- package/api-docs/functions/calculateDistance.mdx +18 -0
- package/api-docs/functions/closedCurve.mdx +27 -0
- package/api-docs/functions/copyByteBufferToFloatBuffer.mdx +16 -0
- package/api-docs/functions/createAnalyzerGraphNode.mdx +19 -0
- package/api-docs/functions/createAnalyzerSubscribableGraphNode.mdx +15 -0
- package/api-docs/functions/createAsyncCallbackLoop.mdx +35 -0
- package/api-docs/functions/createAudioContext.mdx +22 -0
- package/api-docs/functions/createAudioDestinationGraphNode.mdx +9 -0
- package/api-docs/functions/createAudioGraph.mdx +28 -0
- package/api-docs/functions/createAudioGraphProxy.mdx +14 -0
- package/api-docs/functions/createAudioSignalDetector.mdx +51 -0
- package/api-docs/functions/createAudioStats.mdx +19 -0
- package/api-docs/functions/createBenchmark.mdx +26 -0
- package/api-docs/functions/createCanvas.mdx +16 -0
- package/api-docs/functions/createCanvasTransform.mdx +14 -0
- package/api-docs/functions/createChannelMergerGraphNode.mdx +19 -0
- package/api-docs/functions/createChannelSplitterGraphNode.mdx +19 -0
- package/api-docs/functions/createDelayGraphNode.mdx +19 -0
- package/api-docs/functions/createDenoiseWorkletGraphNode.mdx +16 -0
- package/api-docs/functions/createFrameCallbackRequest.mdx +29 -0
- package/api-docs/functions/createGainGraphNode.mdx +15 -0
- package/api-docs/functions/createMediaElementSourceGraphNode.mdx +15 -0
- package/api-docs/functions/createSegmenter.mdx +14 -0
- package/api-docs/functions/createStreamDestinationGraphNode.mdx +15 -0
- package/api-docs/functions/createStreamSourceGraphNode.mdx +16 -0
- package/api-docs/functions/createVADetector.mdx +54 -0
- package/api-docs/functions/createVideoProcessor.mdx +14 -0
- package/api-docs/functions/createVideoTrackProcessor.mdx +9 -0
- package/api-docs/functions/createVideoTrackProcessorWithFallback.mdx +15 -0
- package/api-docs/functions/createVoiceDetectorFromProbability.mdx +15 -0
- package/api-docs/functions/createVoiceDetectorFromTimeData.mdx +19 -0
- package/api-docs/functions/createWindowedStats.mdx +23 -0
- package/api-docs/functions/curve.mdx +15 -0
- package/api-docs/functions/fromByteToFloat.mdx +27 -0
- package/api-docs/functions/fromFloatToByte.mdx +27 -0
- package/api-docs/functions/getAudioStats.mdx +19 -0
- package/api-docs/functions/getBezierCurveControlPoints.mdx +26 -0
- package/api-docs/functions/iou.mdx +19 -0
- package/api-docs/functions/isAnalyzerNodeInit.mdx +13 -0
- package/api-docs/functions/isAudioNode.mdx +13 -0
- package/api-docs/functions/isAudioNodeInit.mdx +13 -0
- package/api-docs/functions/isAudioParam.mdx +13 -0
- package/api-docs/functions/isClipping.mdx +18 -0
- package/api-docs/functions/isEqualSize.mdx +22 -0
- package/api-docs/functions/isLowVolume.mdx +19 -0
- package/api-docs/functions/isMono.mdx +22 -0
- package/api-docs/functions/isRenderEffects.mdx +13 -0
- package/api-docs/functions/isSilent.mdx +22 -0
- package/api-docs/functions/isVoiceActivity.mdx +29 -0
- package/api-docs/functions/labelComponents.mdx +20 -0
- package/api-docs/functions/line.mdx +15 -0
- package/api-docs/functions/loadScript.mdx +14 -0
- package/api-docs/functions/loadWasms.mdx +13 -0
- package/api-docs/functions/nearestPowerOfTwo.mdx +21 -0
- package/api-docs/functions/playVideo.mdx +16 -0
- package/api-docs/functions/pow.mdx +29 -0
- package/api-docs/functions/processAverageVolume.mdx +15 -0
- package/api-docs/functions/resumeAudioOnInterruption.mdx +23 -0
- package/api-docs/functions/resumeAudioOnUnmute.mdx +27 -0
- package/api-docs/functions/rms.mdx +15 -0
- package/api-docs/functions/round.mdx +23 -0
- package/api-docs/functions/scoreComponent.mdx +22 -0
- package/api-docs/functions/setVideoElementSrc.mdx +14 -0
- package/api-docs/functions/subscribeTimeoutAnalyzerNode.mdx +22 -0
- package/api-docs/functions/subscribeWorkletNode.mdx +28 -0
- package/api-docs/functions/sum.mdx +15 -0
- package/api-docs/functions/toDecibel.mdx +18 -0
- package/api-docs/interfaces/Analyzer.mdx +368 -0
- package/api-docs/interfaces/AnalyzerSubscribableOptions.mdx +11 -0
- package/api-docs/interfaces/AsyncAssets.mdx +7 -0
- package/api-docs/interfaces/AudioGraph.mdx +92 -0
- package/api-docs/interfaces/AudioGraphOptions.mdx +6 -0
- package/api-docs/interfaces/AudioNodeInit.mdx +127 -0
- package/api-docs/interfaces/AudioNodeProps.mdx +15 -0
- package/api-docs/interfaces/AudioStats.mdx +16 -0
- package/api-docs/interfaces/BackgroundImage.mdx +6 -0
- package/api-docs/interfaces/Benchmark.mdx +47 -0
- package/api-docs/interfaces/Clock.mdx +11 -0
- package/api-docs/interfaces/Denoise.mdx +50 -0
- package/api-docs/interfaces/Detector.mdx +81 -0
- package/api-docs/interfaces/Frame.mdx +11 -0
- package/api-docs/interfaces/Gain.mdx +227 -0
- package/api-docs/interfaces/ImageRecord.mdx +6 -0
- package/api-docs/interfaces/ImageSegmenterOptions.mdx +8 -0
- package/api-docs/interfaces/MPMask.mdx +145 -0
- package/api-docs/interfaces/Point.mdx +10 -0
- package/api-docs/interfaces/Process.mdx +46 -0
- package/api-docs/interfaces/ProcessEventClose.mdx +7 -0
- package/api-docs/interfaces/ProcessEventDebug.mdx +14 -0
- package/api-docs/interfaces/ProcessEventDestroy.mdx +7 -0
- package/api-docs/interfaces/ProcessEventOpen.mdx +14 -0
- package/api-docs/interfaces/ProcessEventProcess.mdx +14 -0
- package/api-docs/interfaces/ProcessEventUpdate.mdx +14 -0
- package/api-docs/interfaces/ProcessWorkerDebugMessage.mdx +6 -0
- package/api-docs/interfaces/ProcessWorkerEvent.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventDebug.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventOpened.mdx +5 -0
- package/api-docs/interfaces/ProcessWorkerEventProcessed.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventUpdated.mdx +5 -0
- package/api-docs/interfaces/ProcessorEvent.mdx +7 -0
- package/api-docs/interfaces/ProcessorOptions.mdx +16 -0
- package/api-docs/interfaces/ProcessorProcessOptions.mdx +6 -0
- package/api-docs/interfaces/Rect.mdx +8 -0
- package/api-docs/interfaces/RenderEventHandlers.mdx +7 -0
- package/api-docs/interfaces/Renderer.mdx +64 -0
- package/api-docs/interfaces/RendererOptions.mdx +32 -0
- package/api-docs/interfaces/Runner.mdx +41 -0
- package/api-docs/interfaces/Segmentation.mdx +5 -0
- package/api-docs/interfaces/SegmentationModelAsset.mdx +8 -0
- package/api-docs/interfaces/SegmentationParams.mdx +35 -0
- package/api-docs/interfaces/SegmentationSmoothingConfig.mdx +5 -0
- package/api-docs/interfaces/Segmenter.mdx +121 -0
- package/api-docs/interfaces/SegmenterOptions.mdx +13 -0
- package/api-docs/interfaces/SelectionOptions.mdx +15 -0
- package/api-docs/interfaces/Size.mdx +10 -0
- package/api-docs/interfaces/Stats.mdx +11 -0
- package/api-docs/interfaces/StatsOptions.mdx +10 -0
- package/api-docs/interfaces/SubscribableOptions.mdx +9 -0
- package/api-docs/interfaces/ThrottleOptions.mdx +8 -0
- package/api-docs/interfaces/Transform.mdx +62 -0
- package/api-docs/interfaces/VideoFrameLike.mdx +8 -0
- package/api-docs/interfaces/VideoProcessor.mdx +38 -0
- package/api-docs/interfaces/Weights.mdx +12 -0
- package/api-docs/interfaces/WorkletMessagePortOptions.mdx +16 -0
- package/api-docs/interfaces/WorkletModule.mdx +6 -0
- package/api-docs/type-aliases/AnalyzerNodeInit.mdx +3 -0
- package/api-docs/type-aliases/AsyncCallback.mdx +7 -0
- package/api-docs/type-aliases/AudioBufferBytes.mdx +5 -0
- package/api-docs/type-aliases/AudioBufferFloats.mdx +6 -0
- package/api-docs/type-aliases/AudioDestinationNodeInit.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeConnectParam.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnectParam.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnection.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnections.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeParam.mdx +3 -0
- package/api-docs/type-aliases/AudioSamples.mdx +17 -0
- package/api-docs/type-aliases/BaseAudioNode.mdx +3 -0
- package/api-docs/type-aliases/Callback.mdx +20 -0
- package/api-docs/type-aliases/Canvas.mdx +3 -0
- package/api-docs/type-aliases/CanvasContext.mdx +3 -0
- package/api-docs/type-aliases/ChannelSplitterNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Color.mdx +12 -0
- package/api-docs/type-aliases/ConnectInitParamBaseType.mdx +3 -0
- package/api-docs/type-aliases/ConnectInitParamType.mdx +3 -0
- package/api-docs/type-aliases/ConnectParamBase.mdx +11 -0
- package/api-docs/type-aliases/ConnectParamBaseType.mdx +3 -0
- package/api-docs/type-aliases/ConnectParamType.mdx +3 -0
- package/api-docs/type-aliases/DelayNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Delegate.mdx +3 -0
- package/api-docs/type-aliases/DenoiseWorkletNodeInit.mdx +3 -0
- package/api-docs/type-aliases/ExtractMessageEventType.mdx +9 -0
- package/api-docs/type-aliases/GainNodeInit.mdx +3 -0
- package/api-docs/type-aliases/ImageMapIterable.mdx +3 -0
- package/api-docs/type-aliases/ImageType.mdx +6 -0
- package/api-docs/type-aliases/IncludeMessageEventDataType.mdx +10 -0
- package/api-docs/type-aliases/InputFrame.mdx +3 -0
- package/api-docs/type-aliases/IsVoice.mdx +19 -0
- package/api-docs/type-aliases/MediaElementAudioSourceNodeInit.mdx +3 -0
- package/api-docs/type-aliases/MediaStreamAudioDestinationNodeInit.mdx +3 -0
- package/api-docs/type-aliases/MediaStreamAudioSourceNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Node.mdx +3 -0
- package/api-docs/type-aliases/NodeConnectionAction.mdx +3 -0
- package/api-docs/type-aliases/Nodes.mdx +3 -0
- package/api-docs/type-aliases/OptionalKeys.mdx +10 -0
- package/api-docs/type-aliases/ProcessEvents.mdx +17 -0
- package/api-docs/type-aliases/ProcessInputType.mdx +3 -0
- package/api-docs/type-aliases/ProcessStatus.mdx +3 -0
- package/api-docs/type-aliases/ProcessVideoTrack.mdx +15 -0
- package/api-docs/type-aliases/ProcessWorkerEvents.mdx +18 -0
- package/api-docs/type-aliases/ProcessorEvents.mdx +3 -0
- package/api-docs/type-aliases/ProcessorWorkerEvents.mdx +3 -0
- package/api-docs/type-aliases/RenderBackend.mdx +3 -0
- package/api-docs/type-aliases/RenderEffects.mdx +3 -0
- package/api-docs/type-aliases/RenderingEvents.mdx +3 -0
- package/api-docs/type-aliases/RunnerCreator.mdx +21 -0
- package/api-docs/type-aliases/SegmentationModel.mdx +3 -0
- package/api-docs/type-aliases/SegmentationTransform.mdx +3 -0
- package/api-docs/type-aliases/TupleOf.mdx +12 -0
- package/api-docs/type-aliases/UniversalAudioContextState.mdx +6 -0
- package/api-docs/type-aliases/Unsubscribe.mdx +9 -0
- package/api-docs/type-aliases/WasmPaths.mdx +3 -0
- package/api-docs/variables/BACKGROUND_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/BACKGROUND_THRESHOLD.mdx +3 -0
- package/api-docs/variables/CLIP_COUNT_THRESHOLD.mdx +6 -0
- package/api-docs/variables/CLIP_THRESHOLD.mdx +5 -0
- package/api-docs/variables/DOWN_SAMPLE_FACTOR.mdx +3 -0
- package/api-docs/variables/EDGE_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/EXCLUDE_BYSTANDERS.mdx +3 -0
- package/api-docs/variables/FOREGROUND_THRESHOLD.mdx +3 -0
- package/api-docs/variables/FRAME_RATE.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_EDGE_BAND.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_INTENSITY.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_TIGHTNESS.mdx +3 -0
- package/api-docs/variables/LOW_VOLUME_THRESHOLD.mdx +5 -0
- package/api-docs/variables/MASK_COMBINE_RATIO.mdx +3 -0
- package/api-docs/variables/MONO_THRESHOLD.mdx +6 -0
- package/api-docs/variables/MORPH_DILATE_RADIUS_PX.mdx +3 -0
- package/api-docs/variables/MORPH_ERODE_RADIUS_PX.mdx +3 -0
- package/api-docs/variables/MORPH_PASS.mdx +3 -0
- package/api-docs/variables/PERSON_CENTER.mdx +3 -0
- package/api-docs/variables/PLAY_VIDEO_TIMEOUT.mdx +3 -0
- package/api-docs/variables/PROCESSING_HEIGHT.mdx +3 -0
- package/api-docs/variables/PROCESSING_WIDTH.mdx +3 -0
- package/api-docs/variables/PROCESS_STATUS.mdx +22 -0
- package/api-docs/variables/RENDERING_EVENTS.mdx +14 -0
- package/api-docs/variables/RENDER_BACKEND.mdx +10 -0
- package/api-docs/variables/RENDER_EFFECT.mdx +11 -0
- package/api-docs/variables/SEGMENTATION_MODELS.mdx +10 -0
- package/api-docs/variables/SIGMA_RANGE.mdx +3 -0
- package/api-docs/variables/SIGMA_SPACE.mdx +3 -0
- package/api-docs/variables/SILENT_THRESHOLD.mdx +6 -0
- package/api-docs/variables/STRONG_EDGE_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/VOICE_PROBABILITY_THRESHOLD.mdx +5 -0
- package/api-docs/variables/calculateMaxBlurPass.mdx +13 -0
- package/api-docs/variables/clamping.mdx +26 -0
- package/api-docs/variables/createLazyProps.mdx +19 -0
- package/api-docs/variables/createObjectUpdater.mdx +31 -0
- package/api-docs/variables/createRemoteImageBitmap.mdx +21 -0
- package/api-docs/variables/getCanvasRenderingContext2D.mdx +14 -0
- package/api-docs/variables/getErrorMessage.mdx +13 -0
- package/api-docs/variables/getImageSize.mdx +13 -0
- package/api-docs/variables/handleWebGLContextLoss.mdx +21 -0
- package/api-docs/variables/isRenderingEvents.mdx +13 -0
- package/api-docs/variables/isSegmentationModel.mdx +13 -0
- package/api-docs/variables/resize.mdx +30 -0
- package/api-docs/variables/toRenderingEvents.mdx +13 -0
- package/api-docs/variables/urls.mdx +10 -0
- package/dist/common/backends/webgl/binaryMask.d.ts +8 -0
- package/dist/common/backends/webgl/binaryMask.js +95 -0
- package/dist/common/backends/webgl/blender.d.ts +2 -1
- package/dist/common/backends/webgl/blender.js +18 -15
- package/dist/common/backends/webgl/blur.d.ts +1 -1
- package/dist/common/backends/webgl/blur.js +23 -16
- package/dist/common/backends/webgl/canvas.js +9 -4
- package/dist/common/backends/webgl/diffAbsMask.d.ts +10 -0
- package/dist/common/backends/webgl/diffAbsMask.js +103 -0
- package/dist/common/backends/webgl/geodesicReconstruction.d.ts +13 -0
- package/dist/common/backends/webgl/geodesicReconstruction.js +176 -0
- package/dist/common/backends/webgl/jointBilateralFilter.d.ts +12 -0
- package/dist/common/backends/webgl/jointBilateralFilter.js +108 -0
- package/dist/common/backends/webgl/morphErode.d.ts +13 -0
- package/dist/common/backends/webgl/morphErode.js +121 -0
- package/dist/common/backends/webgl/renderer.js +194 -34
- package/dist/common/backends/webgl/replace.d.ts +17 -0
- package/dist/common/backends/webgl/replace.js +126 -0
- package/dist/common/backends/webgl/selectComponent.d.ts +15 -0
- package/dist/common/backends/webgl/selectComponent.js +102 -0
- package/dist/common/backends/webgl/smoothingMask.d.ts +3 -3
- package/dist/common/backends/webgl/smoothingMask.js +22 -21
- package/dist/common/backends/webgl/tentBlur.d.ts +9 -0
- package/dist/common/backends/webgl/tentBlur.js +118 -0
- package/dist/common/backends/webgl/texture.d.ts +1 -1
- package/dist/common/backends/webgl/texture.js +19 -17
- package/dist/common/backends/webgl/textureToTexture.d.ts +1 -1
- package/dist/common/backends/webgl/textureToTexture.js +19 -16
- package/dist/common/backends/webgl/webglUtils.d.ts +7 -1
- package/dist/common/backends/webgl/webglUtils.js +64 -6
- package/dist/common/backends/webgpu/blender.d.ts +6 -1
- package/dist/common/backends/webgpu/blender.js +96 -51
- package/dist/common/backends/webgpu/constants.js +1 -1
- package/dist/common/backends/webgpu/dualFilterBlur.d.ts +2 -3
- package/dist/common/backends/webgpu/dualFilterBlur.js +146 -140
- package/dist/common/backends/webgpu/jointBilateralFilter.d.ts +7 -0
- package/dist/common/backends/webgpu/jointBilateralFilter.js +162 -0
- package/dist/common/backends/webgpu/renderer.js +211 -39
- package/dist/common/backends/webgpu/replace.d.ts +11 -0
- package/dist/common/backends/webgpu/replace.js +175 -0
- package/dist/common/backends/webgpu/resize.d.ts +4 -0
- package/dist/common/backends/webgpu/resize.js +76 -0
- package/dist/common/backends/webgpu/smoothingMask.d.ts +2 -2
- package/dist/common/backends/webgpu/smoothingMask.js +74 -40
- package/dist/common/backends/webgpu/tentBlur.d.ts +5 -0
- package/dist/common/backends/webgpu/tentBlur.js +131 -0
- package/dist/common/backends/webgpu/texture.d.ts +2 -2
- package/dist/common/backends/webgpu/texture.js +24 -19
- package/dist/common/backends/webgpu/textureToTexture.d.ts +1 -1
- package/dist/common/backends/webgpu/textureToTexture.js +28 -15
- package/dist/common/backends/webgpu/types.d.ts +2 -0
- package/dist/common/backends/webgpu/webgpuUtils.d.ts +24 -4
- package/dist/common/backends/webgpu/webgpuUtils.js +60 -11
- package/dist/common/constants.d.ts +19 -5
- package/dist/common/constants.js +19 -5
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/tsconfig.tsbuildinfo +1 -1
- package/dist/common/types/render.d.ts +142 -13
- package/dist/common/types/utils.d.ts +21 -0
- package/dist/common/utils.d.ts +16 -0
- package/dist/common/utils.js +152 -0
- package/dist/main/benchUtils.d.ts +33 -1
- package/dist/main/benchUtils.js +145 -11
- package/dist/main/tsconfig.tsbuildinfo +1 -1
- package/dist/main/video/canvasTransform.d.ts +1 -1
- package/dist/main/video/canvasTransform.js +135 -47
- package/dist/main/video/index.d.ts +1 -1
- package/dist/main/video/index.js +1 -1
- package/dist/workers/mediaWorker.js +35 -162
- package/dist/workers/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -10
- package/dist/common/backends/webgl/shaders/blendFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/blendFragmentShader.js +0 -21
- package/dist/common/backends/webgl/shaders/dualFilterBlurFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/dualFilterBlurFragmentShader.js +0 -45
- package/dist/common/backends/webgl/shaders/smoothingMaskFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/smoothingMaskFragmentShader.js +0 -57
- package/dist/common/backends/webgl/shaders/textureFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/textureFragmentShader.js +0 -16
- package/dist/common/backends/webgl/shaders/vertexShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/vertexShader.js +0 -19
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Modifier | Type |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="node"></a> `node` | `readonly` | `AnalyserNode` |
|
|
10
|
+
| <a id="frequencybincount"></a> `frequencyBinCount` | `readonly` | `number` |
|
|
11
|
+
| <a id="fftsize"></a> `fftSize` | `public` | `number` |
|
|
12
|
+
| <a id="mindecibels"></a> `minDecibels` | `public` | `number` |
|
|
13
|
+
| <a id="maxdecibels"></a> `maxDecibels` | `public` | `number` |
|
|
14
|
+
| <a id="smoothingtimeconstant"></a> `smoothingTimeConstant` | `public` | `number` |
|
|
15
|
+
|
|
16
|
+
## Methods
|
|
17
|
+
|
|
18
|
+
### getByteTimeDomainData()
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
getByteTimeDomainData(buffer): void;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Copies the current waveform, or time-domain, data into a Uint8Array
|
|
25
|
+
(unsigned byte array) passed into it.
|
|
26
|
+
|
|
27
|
+
If the array has fewer elements than the `AnalyserNode.fftSize`, excess
|
|
28
|
+
elements are dropped.
|
|
29
|
+
If it has more elements than needed, excess elements are ignored.
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Description |
|
|
34
|
+
| ------ | ------ | ------ |
|
|
35
|
+
| `buffer` | `Uint8Array` | Use provided buffer instead of creating a new one |
|
|
36
|
+
|
|
37
|
+
#### Returns
|
|
38
|
+
|
|
39
|
+
`void`
|
|
40
|
+
|
|
41
|
+
#### Remarks
|
|
42
|
+
|
|
43
|
+
The bytes versions are not cheaper than the float version but provided
|
|
44
|
+
for convenient: the byte version are computed from the float version,
|
|
45
|
+
using simple quantization to 2^8 values
|
|
46
|
+
ref. https://padenot.github.io/web-audio-perf/#analysernode
|
|
47
|
+
|
|
48
|
+
***
|
|
49
|
+
|
|
50
|
+
### getByteFrequencyData()
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
getByteFrequencyData(buffer): void;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Copies the current frequency data into a Uint8Array (unsigned byte array)
|
|
57
|
+
passed into it.
|
|
58
|
+
|
|
59
|
+
The frequency data is composed of integers on a scale from 0 to 255.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
| Parameter | Type | Description |
|
|
64
|
+
| ------ | ------ | ------ |
|
|
65
|
+
| `buffer` | `Uint8Array` | Use provided buffer instead of creating a new one |
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
`void`
|
|
70
|
+
|
|
71
|
+
#### Remarks
|
|
72
|
+
|
|
73
|
+
The bytes versions are not cheaper than the float version but provided
|
|
74
|
+
for convenient: the byte version are computed from the float version,
|
|
75
|
+
using simple quantization to 2^8 values
|
|
76
|
+
ref. https://padenot.github.io/web-audio-perf/#analysernode
|
|
77
|
+
|
|
78
|
+
***
|
|
79
|
+
|
|
80
|
+
### getFloatTimeDomainData()
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
getFloatTimeDomainData(buffer): void;
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Copies the current waveform, or time-domain, data into Float32Array
|
|
87
|
+
passed into it
|
|
88
|
+
|
|
89
|
+
#### Parameters
|
|
90
|
+
|
|
91
|
+
| Parameter | Type | Description |
|
|
92
|
+
| ------ | ------ | ------ |
|
|
93
|
+
| `buffer` | `Float32Array` | Use provided buffer instead of creating a new one |
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`void`
|
|
98
|
+
|
|
99
|
+
#### Remarks
|
|
100
|
+
|
|
101
|
+
The buffer size should be the same as `AnalyserNode.fftSize`
|
|
102
|
+
|
|
103
|
+
***
|
|
104
|
+
|
|
105
|
+
### getFloatFrequencyData()
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
getFloatFrequencyData(buffer): void;
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Copies the current waveform, or time-domain, data into Float32Array
|
|
112
|
+
passed into it
|
|
113
|
+
|
|
114
|
+
#### Parameters
|
|
115
|
+
|
|
116
|
+
| Parameter | Type | Description |
|
|
117
|
+
| ------ | ------ | ------ |
|
|
118
|
+
| `buffer` | `Float32Array` | Use provided buffer instead of creating a new one |
|
|
119
|
+
|
|
120
|
+
#### Returns
|
|
121
|
+
|
|
122
|
+
`void`
|
|
123
|
+
|
|
124
|
+
#### Remarks
|
|
125
|
+
|
|
126
|
+
The buffer size should be the same as `AnalyserNode.frequencyBinCount`
|
|
127
|
+
|
|
128
|
+
***
|
|
129
|
+
|
|
130
|
+
### getAverageVolume()
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
getAverageVolume(buffer): number;
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Utility function to get the average volume from `getByteFrequencyData`
|
|
137
|
+
|
|
138
|
+
#### Parameters
|
|
139
|
+
|
|
140
|
+
| Parameter | Type |
|
|
141
|
+
| ------ | ------ |
|
|
142
|
+
| `buffer` | `Float32Array` |
|
|
143
|
+
|
|
144
|
+
#### Returns
|
|
145
|
+
|
|
146
|
+
`number`
|
|
147
|
+
|
|
148
|
+
#### Remarks
|
|
149
|
+
|
|
150
|
+
This is a better option when you only need to get the volume in terms of
|
|
151
|
+
performance and complexity.
|
|
152
|
+
|
|
153
|
+
***
|
|
154
|
+
|
|
155
|
+
### connect()
|
|
156
|
+
|
|
157
|
+
#### Call Signature
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
connect(
|
|
161
|
+
destinationNode,
|
|
162
|
+
output?,
|
|
163
|
+
input?): AudioNode;
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
|
|
167
|
+
|
|
168
|
+
##### Parameters
|
|
169
|
+
|
|
170
|
+
| Parameter | Type |
|
|
171
|
+
| ------ | ------ |
|
|
172
|
+
| `destinationNode` | `AudioNode` |
|
|
173
|
+
| `output?` | `number` |
|
|
174
|
+
| `input?` | `number` |
|
|
175
|
+
|
|
176
|
+
##### Returns
|
|
177
|
+
|
|
178
|
+
`AudioNode`
|
|
179
|
+
|
|
180
|
+
##### Inherited from
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
BaseAudioNode.connect
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Call Signature
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
connect(destinationParam, output?): void;
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
##### Parameters
|
|
193
|
+
|
|
194
|
+
| Parameter | Type |
|
|
195
|
+
| ------ | ------ |
|
|
196
|
+
| `destinationParam` | `AudioParam` |
|
|
197
|
+
| `output?` | `number` |
|
|
198
|
+
|
|
199
|
+
##### Returns
|
|
200
|
+
|
|
201
|
+
`void`
|
|
202
|
+
|
|
203
|
+
##### Inherited from
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
BaseAudioNode.connect
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
***
|
|
210
|
+
|
|
211
|
+
### disconnect()
|
|
212
|
+
|
|
213
|
+
#### Call Signature
|
|
214
|
+
|
|
215
|
+
```ts
|
|
216
|
+
disconnect(): void;
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
|
|
220
|
+
|
|
221
|
+
##### Returns
|
|
222
|
+
|
|
223
|
+
`void`
|
|
224
|
+
|
|
225
|
+
##### Inherited from
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
BaseAudioNode.disconnect
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
#### Call Signature
|
|
232
|
+
|
|
233
|
+
```ts
|
|
234
|
+
disconnect(output): void;
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
##### Parameters
|
|
238
|
+
|
|
239
|
+
| Parameter | Type |
|
|
240
|
+
| ------ | ------ |
|
|
241
|
+
| `output` | `number` |
|
|
242
|
+
|
|
243
|
+
##### Returns
|
|
244
|
+
|
|
245
|
+
`void`
|
|
246
|
+
|
|
247
|
+
##### Inherited from
|
|
248
|
+
|
|
249
|
+
```ts
|
|
250
|
+
BaseAudioNode.disconnect
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
#### Call Signature
|
|
254
|
+
|
|
255
|
+
```ts
|
|
256
|
+
disconnect(destinationNode): void;
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
##### Parameters
|
|
260
|
+
|
|
261
|
+
| Parameter | Type |
|
|
262
|
+
| ------ | ------ |
|
|
263
|
+
| `destinationNode` | `AudioNode` |
|
|
264
|
+
|
|
265
|
+
##### Returns
|
|
266
|
+
|
|
267
|
+
`void`
|
|
268
|
+
|
|
269
|
+
##### Inherited from
|
|
270
|
+
|
|
271
|
+
```ts
|
|
272
|
+
BaseAudioNode.disconnect
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
#### Call Signature
|
|
276
|
+
|
|
277
|
+
```ts
|
|
278
|
+
disconnect(destinationNode, output): void;
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
##### Parameters
|
|
282
|
+
|
|
283
|
+
| Parameter | Type |
|
|
284
|
+
| ------ | ------ |
|
|
285
|
+
| `destinationNode` | `AudioNode` |
|
|
286
|
+
| `output` | `number` |
|
|
287
|
+
|
|
288
|
+
##### Returns
|
|
289
|
+
|
|
290
|
+
`void`
|
|
291
|
+
|
|
292
|
+
##### Inherited from
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
BaseAudioNode.disconnect
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### Call Signature
|
|
299
|
+
|
|
300
|
+
```ts
|
|
301
|
+
disconnect(
|
|
302
|
+
destinationNode,
|
|
303
|
+
output,
|
|
304
|
+
input): void;
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
##### Parameters
|
|
308
|
+
|
|
309
|
+
| Parameter | Type |
|
|
310
|
+
| ------ | ------ |
|
|
311
|
+
| `destinationNode` | `AudioNode` |
|
|
312
|
+
| `output` | `number` |
|
|
313
|
+
| `input` | `number` |
|
|
314
|
+
|
|
315
|
+
##### Returns
|
|
316
|
+
|
|
317
|
+
`void`
|
|
318
|
+
|
|
319
|
+
##### Inherited from
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
BaseAudioNode.disconnect
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
#### Call Signature
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
disconnect(destinationParam): void;
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
##### Parameters
|
|
332
|
+
|
|
333
|
+
| Parameter | Type |
|
|
334
|
+
| ------ | ------ |
|
|
335
|
+
| `destinationParam` | `AudioParam` |
|
|
336
|
+
|
|
337
|
+
##### Returns
|
|
338
|
+
|
|
339
|
+
`void`
|
|
340
|
+
|
|
341
|
+
##### Inherited from
|
|
342
|
+
|
|
343
|
+
```ts
|
|
344
|
+
BaseAudioNode.disconnect
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
#### Call Signature
|
|
348
|
+
|
|
349
|
+
```ts
|
|
350
|
+
disconnect(destinationParam, output): void;
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
##### Parameters
|
|
354
|
+
|
|
355
|
+
| Parameter | Type |
|
|
356
|
+
| ------ | ------ |
|
|
357
|
+
| `destinationParam` | `AudioParam` |
|
|
358
|
+
| `output` | `number` |
|
|
359
|
+
|
|
360
|
+
##### Returns
|
|
361
|
+
|
|
362
|
+
`void`
|
|
363
|
+
|
|
364
|
+
##### Inherited from
|
|
365
|
+
|
|
366
|
+
```ts
|
|
367
|
+
BaseAudioNode.disconnect
|
|
368
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`SubscribableOptions`](SubscribableOptions.mdx).[`WorkletMessagePortOptions`](WorkletMessagePortOptions.mdx)\<[`Analyzer`](Analyzer.mdx)\>
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type | Inherited from |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="updatefrequency"></a> `updateFrequency?` | `number` | [`SubscribableOptions`](SubscribableOptions.mdx).[`updateFrequency`](SubscribableOptions.mdx#updatefrequency) |
|
|
10
|
+
| <a id="messagehandler"></a> `messageHandler` | (`message`) => `void` | [`WorkletMessagePortOptions`](WorkletMessagePortOptions.mdx).[`messageHandler`](WorkletMessagePortOptions.mdx#messagehandler) |
|
|
11
|
+
| <a id="errorhandler"></a> `errorHandler?` | (`event`) => `void` | [`WorkletMessagePortOptions`](WorkletMessagePortOptions.mdx).[`errorHandler`](WorkletMessagePortOptions.mdx#errorhandler) |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
## Properties
|
|
2
|
+
|
|
3
|
+
| Property | Modifier | Type |
|
|
4
|
+
| ------ | ------ | ------ |
|
|
5
|
+
| <a id="context"></a> `context` | `readonly` | `AudioContext` |
|
|
6
|
+
| <a id="inits"></a> `inits` | `readonly` | [`AudioNodeInit`](AudioNodeInit.mdx)\<`AudioNode`, [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx)\>[] |
|
|
7
|
+
| <a id="state"></a> `state` | `readonly` | `AudioGraphState` |
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### connect()
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
connect(sequence): void;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type |
|
|
20
|
+
| ------ | ------ |
|
|
21
|
+
| `sequence` | [`AudioNodeInitConnection`](../type-aliases/AudioNodeInitConnection.mdx) |
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
`void`
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### disconnect()
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
disconnect(sequence): void;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type |
|
|
38
|
+
| ------ | ------ |
|
|
39
|
+
| `sequence` | [`AudioNodeInitConnection`](../type-aliases/AudioNodeInitConnection.mdx) |
|
|
40
|
+
|
|
41
|
+
#### Returns
|
|
42
|
+
|
|
43
|
+
`void`
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### addWorklet()
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
addWorklet(moduleURL, options?): Promise<void>;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
#### Parameters
|
|
54
|
+
|
|
55
|
+
| Parameter | Type |
|
|
56
|
+
| ------ | ------ |
|
|
57
|
+
| `moduleURL` | `string` |
|
|
58
|
+
| `options?` | `WorkletOptions` |
|
|
59
|
+
|
|
60
|
+
#### Returns
|
|
61
|
+
|
|
62
|
+
`Promise`\<`void`\>
|
|
63
|
+
|
|
64
|
+
***
|
|
65
|
+
|
|
66
|
+
### releaseInit()
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
releaseInit(init): void;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Parameters
|
|
73
|
+
|
|
74
|
+
| Parameter | Type |
|
|
75
|
+
| ------ | ------ |
|
|
76
|
+
| `init` | [`AudioNodeInit`](AudioNodeInit.mdx) |
|
|
77
|
+
|
|
78
|
+
#### Returns
|
|
79
|
+
|
|
80
|
+
`void`
|
|
81
|
+
|
|
82
|
+
***
|
|
83
|
+
|
|
84
|
+
### release()
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
release(): Promise<void>;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Returns
|
|
91
|
+
|
|
92
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- `Readonly`\<[`AudioNodeProps`](AudioNodeProps.mdx)\<`T`, `R`\>\>
|
|
4
|
+
|
|
5
|
+
## Type Parameters
|
|
6
|
+
|
|
7
|
+
| Type Parameter | Default type |
|
|
8
|
+
| ------ | ------ |
|
|
9
|
+
| `T` *extends* `AudioNode` | `AudioNode` |
|
|
10
|
+
| `R` *extends* [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx) | [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx) |
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
| Property | Modifier | Type | Inherited from |
|
|
15
|
+
| ------ | ------ | ------ | ------ |
|
|
16
|
+
| <a id="name"></a> `name` | `readonly` | `string` | `Readonly.name` |
|
|
17
|
+
| <a id="node"></a> `node` | `readonly` | `R` \| `undefined` | `Readonly.node` |
|
|
18
|
+
| <a id="audionode"></a> `audioNode` | `readonly` | `T` \| `undefined` | `Readonly.audioNode` |
|
|
19
|
+
| <a id="outputs"></a> `outputs` | `readonly` | `WeakSet`\< \| `AudioNodeInit`\<`AudioNode`, [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx)\> \| `AudioParam`\> | `Readonly.outputs` |
|
|
20
|
+
| <a id="tojson"></a> `toJSON?` | `public` | () => `unknown` | - |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
### create()
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
create(context, prevNode?): [T, R];
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**`Internal`**
|
|
31
|
+
|
|
32
|
+
Internal function to create the actual AudioNode.
|
|
33
|
+
Should ONLY be CALLED inside an AudioGraph
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| ------ | ------ | ------ |
|
|
39
|
+
| `context` | `AudioContext` | Audio Context to use |
|
|
40
|
+
| `prevNode?` | `AudioNode` | The input AudioNode for connection |
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
\[`T`, `R`\]
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### connect()
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
connect(param): void;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**`Internal`**
|
|
55
|
+
|
|
56
|
+
Internal function to connect a signal output
|
|
57
|
+
Should ONLY be CALLED inside an AudioGraph
|
|
58
|
+
|
|
59
|
+
#### Parameters
|
|
60
|
+
|
|
61
|
+
| Parameter | Type | Description |
|
|
62
|
+
| ------ | ------ | ------ |
|
|
63
|
+
| `param` | [`AudioNodeInitConnectParam`](../type-aliases/AudioNodeInitConnectParam.mdx) | The init to connect |
|
|
64
|
+
|
|
65
|
+
#### Returns
|
|
66
|
+
|
|
67
|
+
`void`
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### disconnect()
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
disconnect(param): void;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**`Internal`**
|
|
78
|
+
|
|
79
|
+
Internal function to disconnect a signal output
|
|
80
|
+
Should ONLY be CALLED inside an AudioGraph
|
|
81
|
+
|
|
82
|
+
#### Parameters
|
|
83
|
+
|
|
84
|
+
| Parameter | Type | Description |
|
|
85
|
+
| ------ | ------ | ------ |
|
|
86
|
+
| `param` | [`AudioNodeInitConnectParam`](../type-aliases/AudioNodeInitConnectParam.mdx) | The init to disconnect |
|
|
87
|
+
|
|
88
|
+
#### Returns
|
|
89
|
+
|
|
90
|
+
`void`
|
|
91
|
+
|
|
92
|
+
***
|
|
93
|
+
|
|
94
|
+
### hasConnectedTo()
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
hasConnectedTo(init): boolean;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Check if there is a connection to the provided init
|
|
101
|
+
|
|
102
|
+
#### Parameters
|
|
103
|
+
|
|
104
|
+
| Parameter | Type | Description |
|
|
105
|
+
| ------ | ------ | ------ |
|
|
106
|
+
| `init` | \| `AudioNodeInit`\<`AudioNode`, [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx)\> \| `AudioParam` | AudioNodeInit |
|
|
107
|
+
|
|
108
|
+
#### Returns
|
|
109
|
+
|
|
110
|
+
`boolean`
|
|
111
|
+
|
|
112
|
+
***
|
|
113
|
+
|
|
114
|
+
### release()
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
release(): void;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**`Internal`**
|
|
121
|
+
|
|
122
|
+
Internal function to release the node init resources
|
|
123
|
+
Should ONLY be CALLED inside an AudioGraph
|
|
124
|
+
|
|
125
|
+
#### Returns
|
|
126
|
+
|
|
127
|
+
`void`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## Type Parameters
|
|
2
|
+
|
|
3
|
+
| Type Parameter |
|
|
4
|
+
| ------ |
|
|
5
|
+
| `T` *extends* `AudioNode` |
|
|
6
|
+
| `R` *extends* [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx) |
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
| Property | Type |
|
|
11
|
+
| ------ | ------ |
|
|
12
|
+
| <a id="name"></a> `name` | `string` |
|
|
13
|
+
| <a id="node"></a> `node` | `R` \| `undefined` |
|
|
14
|
+
| <a id="audionode"></a> `audioNode` | `T` \| `undefined` |
|
|
15
|
+
| <a id="outputs"></a> `outputs` | `WeakSet`\< \| [`AudioNodeInit`](AudioNodeInit.mdx)\<`AudioNode`, [`BaseAudioNode`](../type-aliases/BaseAudioNode.mdx)\> \| `AudioParam`\> |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Data structure for the audio statistics while processing
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Property | Type | Description |
|
|
6
|
+
| ------ | ------ | ------ |
|
|
7
|
+
| <a id="silent"></a> `silent` | `boolean` | Indicating the audio is silent when it is set to `true` |
|
|
8
|
+
| <a id="mono"></a> `mono?` | `boolean` | Indicating the audio is mono when it is set to `true` `undefined` means cannot-not-tell. |
|
|
9
|
+
| <a id="lowvolume"></a> `lowVolume` | `boolean` | Indicating the audio is low volume when it is set to `true` |
|
|
10
|
+
| <a id="clipping"></a> `clipping` | `boolean` | Indicating the audio is clipping when it is set to `true` |
|
|
11
|
+
| <a id="peak"></a> `peak` | `number` | Peak gain value |
|
|
12
|
+
| <a id="rms"></a> `rms` | `number` | Global rms |
|
|
13
|
+
| <a id="maxrms"></a> `maxRms` | `number` | Maximum running RMS value |
|
|
14
|
+
| <a id="maxclipcount"></a> `maxClipCount` | `number` | Maximum Clip count |
|
|
15
|
+
| <a id="sumsquare"></a> `sumSquare` | `number` | Value of sum squared sample used for RMS calculation |
|
|
16
|
+
| <a id="sumlength"></a> `sumLength` | `number` | Value of sum number of sample used for RMS calculation |
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
## Methods
|
|
2
|
+
|
|
3
|
+
### begin()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
begin(): void;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
#### Returns
|
|
10
|
+
|
|
11
|
+
`void`
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### end()
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
end(): void;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
#### Returns
|
|
22
|
+
|
|
23
|
+
`void`
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### reset()
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
reset(): void;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### Returns
|
|
34
|
+
|
|
35
|
+
`void`
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### calculateFps()
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
calculateFps(): [number, number];
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
\[`number`, `number`\]
|