AudioResampler
()
|
Signature
Meta.WitAi.Data.AudioResampler.AudioResampler() |
OnByteResampled
: Action< byte > |
Event callback for sample individual byte enqueueing
Signature
Action<byte> Meta.WitAi.Data.AudioResampler.OnByteResampled |
OnLevelChanged
: Action< float, float > |
Event callback for min/max level change
Signature
Action<float, float> Meta.WitAi.Data.AudioResampler.OnLevelChanged |
OnResampled
: Action< float > |
Event callback for sample enqueueing
Signature
Action<float> Meta.WitAi.Data.AudioResampler.OnResampled |
Resample
(
fromEncoding
, fromMinLevel
, fromMaxLevel
, toEncoding
, samples
, offset
, length
, enqueueBytes
, variableSampleRate
)
|
Resamples input samples into the desired output encoding
Signature
Vector2 Meta.WitAi.Data.AudioResampler.Resample(AudioEncoding fromEncoding, float fromMinLevel, float fromMaxLevel, AudioEncoding toEncoding, float[] samples, int offset, int length, bool enqueueBytes, IAudioVariableSampleRate variableSampleRate=null) Parameters fromMinLevel: float
Min audio threshold expected, used to normalize level
fromMaxLevel: float
Max audio threshold expected, used to normalize level
samples: float []
Incoming data samples
offset: int
Offset of the sample array
length: int
Length of sample array to be used
enqueueBytes: bool
Whether we need to enqueue each byte
Returns Vector2
Returns the min/max of the sample in Vector2
|