Photon C++ Client API
5.0.7.3
|
Collection of Audio Utility functions and classes. More...
Classes | |
class | ILevelMeter |
Audio Level Metering interface. More... | |
class | 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 | Resampler |
class | TempoUp |
class | ToneAudioPusher |
IAudioPusher 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 | VoiceLevelDetectCalibrate |
Utility Audio Processor Voice Detection Calibration. More... | |
Functions | |
template<typename T > | |
void | resample (const Buffer< T > &srcBuf, Buffer< T > &dstBuf, int dstSamples, int channels) |
Resample audio data so that the complete src buffer fits into dstSamples in the dst buffer. The buffers contain audio with the same number of channels. More... | |
template<typename T > | |
void | resample (const Buffer< T > &srcBuf, int srcOffsetSamples, int srcSamples, Buffer< T > &dstBuf, int dstOffsetSamples, int dstSamples, int channels) |
Resample audio data with offsets and sizes specified for both src and dst buffers. The buffers contain audio with the same number of channels. More... | |
template<typename T > | |
void | resample (const Buffer< T > &srcBuf, int srcOffsetSamples, int srcSamples, int srcChannels, Buffer< T > &dstBuf, int dstOffsetSamples, int dstSamples, int dstChannels) |
Resample audio data with offsets and sizes specified for both src and dst buffers. More... | |
void | resampleAndConvert (const Buffer< short > &srcBuf, Buffer< float > &dstBuf, 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... | |
void | resampleAndConvert (const Buffer< float > &srcBuf, Buffer< short > &dstBuf, 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... | |
void | convert (const Buffer< float > &srcBuf, Buffer< short > &dstBuf, int dstCount) |
Convert audio buffer from float to short samples. More... | |
void | convert (const Buffer< short > &srcBuf, Buffer< float > &dstBuf, int dstCount) |
Convert audio buffer from short to float samples. More... | |
template<typename T > | |
void | forceToStereo (const Buffer< T > &srcBuf, Buffer< T > &dstBuf, int srcChannels) |
Convert audio buffer with arbitrary number of channels to stereo. More... | |
template<typename T > | |
static float | toneAmp (void) |
template<> | |
float | toneAmp< float > (void) |
template<> | |
float | toneAmp< short > (void) |
template<typename T > | |
float | defaultThreshold (void) |
template<> | |
float | defaultThreshold< float > (void) |
template<> | |
float | defaultThreshold< short > (void) |
template void | resample (const Buffer< float > &srcBuf, Buffer< float > &dstBuf, int dstSamples, int channels) |
template void | resample (const Buffer< float > &srcBuf, int srcOffsetSamples, int srcSamples, Buffer< float > &dstBuf, int dstOffsetSamples, int dstSamples, int channels) |
template void | resample (const Buffer< float > &srcBuf, int srcOffsetSamples, int srcSamples, int srcChannels, Buffer< float > &dstBuf, int dstOffsetSamples, int dstSamples, int dstChannels) |
template void | resample (const Buffer< short > &srcBuf, Buffer< short > &dstBuf, int dstSamples, int channels) |
template void | resample (const Buffer< short > &srcBuf, int srcOffsetSamples, int srcSamples, Buffer< short > &dstBuf, int dstOffsetSamples, int dstSamples, int channels) |
template void | resample (const Buffer< short > &srcBuf, int srcOffsetSamples, int srcSamples, int srcChannels, Buffer< short > &dstBuf, int dstOffsetSamples, int dstSamples, int dstChannels) |
Collection of Audio Utility functions and classes.
Resample audio data so that the complete src buffer fits into dstSamples in the dst buffer. The buffers contain audio with the same number of channels.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
srcBuf | Source buffer. |
dstBuf | Destination buffer. |
dstSamples | Destination data size in samples. |
channels | Number of audio channels. |
void resample | ( | const Buffer< T > & | srcBuf, |
int | srcOffsetSamples, | ||
int | srcSamples, | ||
Buffer< T > & | dstBuf, | ||
int | dstOffsetSamples, | ||
int | dstSamples, | ||
int | channels | ||
) |
Resample audio data with offsets and sizes specified for both src and dst buffers. The buffers contain audio with the same number of channels.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
srcBuf | Source buffer. |
srcOffsetSamples | Source data offset in samples. |
srcSamples | Source data size in samples. |
dstBuf | Destination buffer. |
dstOffsetSamples | Destination data offset in samples. |
dstSamples | Destination data size in samples. |
channels | Number of audio channels. |
void resample | ( | const Buffer< T > & | srcBuf, |
int | srcOffsetSamples, | ||
int | srcSamples, | ||
int | srcChannels, | ||
Buffer< T > & | dstBuf, | ||
int | dstOffsetSamples, | ||
int | dstSamples, | ||
int | dstChannels | ||
) |
Resample audio data with offsets and sizes specified for both src and dst buffers.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
srcBuf | Source buffer. |
srcOffsetSamples | Source data offset in samples. |
srcSamples | Source data size in samples. |
srcChannels | Number of audio channels in source. |
dstBuf | Destination buffer. |
dstOffsetSamples | Destination data offset in samples. |
dstSamples | Destination data size in samples. |
dstChannels | Number of audio channels in destination. |
void resampleAndConvert | ( | const Buffer< short > & | srcBuf, |
Buffer< float > & | dstBuf, | ||
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.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
srcBuf | Source buffer. |
dstBuf | 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. |
void resampleAndConvert | ( | const Buffer< float > & | srcBuf, |
Buffer< short > & | dstBuf, | ||
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.
This implements a primitive nearest-neighbor resampling algorithm for an arbitrary number of channels.
srcBuf | Source buffer. |
dstBuf | 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. |
Convert audio buffer from float to short samples.
srcBuf | Source buffer. |
dstBuf | Destination buffer. |
dstCount | Size of destination buffer (in total samples), source buffer must be of same length or longer. |
Convert audio buffer from short to float samples.
srcBuf | Source buffer. |
dstBuf | Destination buffer. |
dstCount | Size of destination buffer (in total samples), source buffer must be of same length or longer. |
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.
srcBuf | Source buffer. |
dstBuf | Destination buffer. |
srcChannels | Number of (interleaved) channels in src. |