Photon Voice  v2.8
English | 日本語 | 한국
Classes | Static Public Member Functions | List of all members
AudioUtil Class Reference

Collection of Audio Utility functions and classes. More...

Classes

interface  ILevelMeter
 Audio Level Metering interface. More...
 
interface  IVoiceDetector
 Voice Activity Detector interface. More...
 
class  LevelMeter
 Audio Level Meter. More...
 
class  LevelMeterDummy
 Dummy Audio Level Meter that doesn't actually do anything. More...
 
class  LevelMeterFloat
 LevelMeter specialization for float audio. More...
 
class  LevelMeterShort
 LevelMeter specialization for short audio. More...
 
class  Resampler
 Sample-rate conversion Audio Processor. More...
 
class  ToneAudioPusher
 IAudioPusher that provides a constant tone signal. More...
 
class  ToneAudioReader
 IAudioReader that provides a constant tone signal. More...
 
class  VoiceDetector
 Simple voice activity detector triggered by signal level. More...
 
class  VoiceDetectorCalibration
 Calibration Utility for Voice Detector More...
 
class  VoiceDetectorDummy
 Dummy VoiceDetector that doesn't actually do anything. More...
 
class  VoiceDetectorFloat
 VoiceDetector specialization for float audio. More...
 
class  VoiceDetectorShort
 VoiceDetector specialization for float audio. More...
 
class  VoiceLevelDetectCalibrate
 Utility Audio Processor Voice Detection Calibration. More...
 

Static Public Member Functions

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...
 

Detailed Description

Collection of Audio Utility functions and classes.

Member Function Documentation

static void Convert ( float[]  src,
short[]  dst,
int  dstCount 
)
static

Convert audio buffer from float to short samples.

Parameters
srcSource buffer.
dstDestination buffer.
dstCountSize 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
srcSource buffer.
dstDestination buffer.
dstCountSize 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
srcSource buffer.
dstDestination buffer.
srcChannelsNumber 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
srcSource buffer.
dstDestination buffer.
dstCountTarget size of destination buffer (in samples per channel).
channelsNumber 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
srcSource buffer.
dstDestination buffer.
dstCountTarget size of destination buffer (in samples per channel).
channelsNumber 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
srcSource buffer.
dstDestination buffer.
dstCountTarget size of destination buffer (in samples per channel).
channelsNumber of channels in the signal (1=mono, 2=stereo). Must be > 0.