MediaStream.AudioResample
public virtual bool AudioResample(float[] input, uint outputSampleRate, out float[] output, out int capacity)
public virtual uint AudioResample(float[] input, uint outputSampleRate, float[] output, int capacity)
Set a resampler and resamples a chunk of audio.
Info
This is intended for situations where the audio output pipeline doesn't support 48kHz.
Parameters
Name | Type | Description |
---|---|---|
input | Single[] | current buffer |
outputSampleRate | UInt32 | resample samplerate |
output | Single[] | resampled buffer |
capacity | Int32 | size of resampled buffer |
Returns
Type | Description |
---|---|
Boolean | true on success or false if missmatch of capacity i.e. errorcode |
UInt32 | sample count on success or errorcode on failure |
Variants
AudioResample(input, outputSampleRate, output, capacity)
public virtual bool AudioResample(float[] input, uint outputSampleRate, out float[] output, out int capacity)
Set a resampler and resamples a chunk of audio.
Warning
This is intended for situations where the audio output pipeline doesn't support 48kHz.
Parameters
Name | Type | Description |
---|---|---|
input | Single[] | current buffer |
outputSampleRate | UInt32 | resample samplerate |
output | Single[] | resampled buffer |
capacity | Int32 | size of resampled buffer |
Returns
Type | Description |
---|---|
Boolean | true on success or false if missmatch of capacity i.e. errorcode |
AudioResample(input, outputSampleRate, output, capacity)
public virtual uint AudioResample(float[] input, uint outputSampleRate, float[] output, int capacity)
Set a resampler and resamples a chunk of audio.
Warning
This is intended for situations where the audio output pipeline doesn't support 48kHz.
Parameters
Name | Type | Description |
---|---|---|
input | Single[] | source buffer |
outputSampleRate | UInt32 | to samplerate |
output | Single[] | target buffer |
capacity | Int32 | target capacity |
Returns
Type | Description |
---|---|
UInt32 | sample count on success or errorcode on failure |