Collection of Audio Utility functions and classes.
More...
|
static void | Resample< T > (T[] src, T[] dst, int dstCount, int channels) |
| Resample audio data so that the complete src buffer fits into dstCount samples in the dst buffer. More...
|
|
static void | ResampleAndConvert (short[] src, float[] dst, int dstCount, int channels) |
| Resample audio data so that the complete src buffer fits into dstCount samples in the dst buffer, and convert short to float samples along the way. More...
|
|
static void | ResampleAndConvert (float[] src, short[] dst, int dstCount, int channels) |
| Resample audio data so that the complete src buffer fits into dstCount samples in the dst buffer, and convert float to short samples along the way. More...
|
|
static void | Convert (float[] src, short[] dst, int dstCount) |
| Convert audio buffer from float to short samples. More...
|
|
static void | Convert (short[] src, float[] dst, int dstCount) |
| Convert audio buffer from short to float samples. More...
|
|
static void | ForceToStereo< T > (T[] src, T[] dst, int srcChannels) |
| Convert audio buffer with arbitrary number of channels to stereo. More...
|
|
Collection of Audio Utility functions and classes.
static void Convert |
( |
float[] |
src, |
|
|
short[] |
dst, |
|
|
int |
dstCount |
|
) |
| |
|
static |
Convert audio buffer from float to short samples.
- Parameters
-
src | Source buffer. |
dst | Destination buffer. |
dstCount | Size of destination buffer (in total samples), source buffer must be of same length or longer. |
static void Convert |
( |
short[] |
src, |
|
|
float[] |
dst, |
|
|
int |
dstCount |
|
) |
| |
|
static |
Convert audio buffer from short to float samples.
- Parameters
-
src | Source buffer. |
dst | Destination buffer. |
dstCount | Size of destination buffer (in total samples), source buffer must be of same length or longer. |
static void ForceToStereo< T > |
( |
T[] |
src, |
|
|
T[] |
dst, |
|
|
int |
srcChannels |
|
) |
| |
|
static |
Convert audio buffer with arbitrary number of channels to stereo.
For mono sources (srcChannels==1), the signal will be copied to both Left and Right stereo channels. For all others, the first two available channels will be used, any other channels will be discarded.
- Parameters
-
src | Source buffer. |
dst | Destination buffer. |
srcChannels | Number of (interleaved) channels in src. |
static void Resample< T > |
( |
T[] |
src, |
|
|
T[] |
dst, |
|
|
int |
dstCount, |
|
|
int |
channels |
|
) |
| |
|
static |
Resample audio data so that the complete src buffer fits into dstCount samples in the dst buffer.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
- Parameters
-
src | Source buffer. |
dst | Destination buffer. |
dstCount | Target size of destination buffer (in samples per channel). |
channels | Number of channels in the signal (1=mono, 2=stereo). Must be > 0. |
static void ResampleAndConvert |
( |
short[] |
src, |
|
|
float[] |
dst, |
|
|
int |
dstCount, |
|
|
int |
channels |
|
) |
| |
|
static |
Resample audio data so that the complete src buffer fits into dstCount samples in the dst buffer, and convert short to float samples along the way.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
- Parameters
-
src | Source buffer. |
dst | Destination buffer. |
dstCount | Target size of destination buffer (in samples per channel). |
channels | Number of channels in the signal (1=mono, 2=stereo). Must be > 0. |
static void ResampleAndConvert |
( |
float[] |
src, |
|
|
short[] |
dst, |
|
|
int |
dstCount, |
|
|
int |
channels |
|
) |
| |
|
static |
Resample audio data so that the complete src buffer fits into dstCount samples in the dst buffer, and convert float to short samples along the way.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
- Parameters
-
src | Source buffer. |
dst | Destination buffer. |
dstCount | Target size of destination buffer (in samples per channel). |
channels | Number of channels in the signal (1=mono, 2=stereo). Must be > 0. |