API reference
API reference
Select your platform
No SDKs available
No versions available

AudioResampler Class

A script that handles upsampling or downsampling audio input. It also determines samplerate if needed.

Events

Event callback for sample enqueueing
Event callback for sample individual byte enqueueing
Event callback for min/max level change

Properties

static IVLogger _log[Get]

Constructors & Destructors

Resamples input samples into the desired output encoding
Parameters
fromEncoding
Source encoding of incoming audio data
fromMinLevel
Min audio threshold expected, used to normalize level
fromMaxLevel
Max audio threshold expected, used to normalize level
toEncoding
Desired output encoding
samples
Incoming data samples
offset
Offset of the sample array
length
Length of sample array to be used
enqueueBytes
Whether we need to enqueue each byte
variableSampleRate
Used for scripts with custom sample rate
Returns
Returns the min/max of the sample in Vector2
AudioResampler ( )