Photon C++ Client API  5.0.7.3
Public Member Functions | List of all members
VoiceLevelDetectCalibrate< T > Class Template Reference

Utility Audio Processor Voice Detection Calibration. More...

Inheritance diagram for VoiceLevelDetectCalibrate< T >:
Inheritance graph
[legend]
Collaboration diagram for VoiceLevelDetectCalibrate< T >:
Collaboration graph
[legend]

Public Member Functions

 VoiceLevelDetectCalibrate (int samplingRate, int channels)
 Create new VoiceLevelDetectCalibrate instance More...
 
void calibrate (int durationMs)
 Start calibration More...
 
ILevelMetergetLevelMeter (void) const
 The LevelMeter in use. More...
 
IVoiceDetectorgetDetector (void) const
 The VoiceDetector in use More...
 
virtual Buffer< T > process (Buffer< T > buf)
 Process a frame of audio data. More...
 
- Public Member Functions inherited from ToStringDefaultImplementation
virtual JStringtoString (JString &retStr, bool withTypes=false) const
 
virtual JStringtoString (JString &retStr, bool withTypes=false) const=0
 
JString toString (bool withTypes=false) const
 
- Public Member Functions inherited from ToString
virtual ~ToString (void)
 
virtual JString typeToString (void) const
 
JString toString (bool withTypes=false) const
 

Detailed Description

template<typename T>
class ExitGames::Voice::AudioUtil::VoiceLevelDetectCalibrate< T >

Utility Audio Processor Voice Detection Calibration.

Encapsulates level meter, voice detector and voice detector calibrator in single instance.

Constructor & Destructor Documentation

◆ VoiceLevelDetectCalibrate()

VoiceLevelDetectCalibrate ( int  samplingRate,
int  channels 
)

Create new VoiceLevelDetectCalibrate instance

Parameters
samplingRateSampling rate of the audio signal (in Hz).
channelsNumber of channels in the audio signal.

Member Function Documentation

◆ calibrate()

void calibrate ( int  durationMs)

Start calibration

Parameters
durationMsDuration of the calibration procedure (in milliseconds).

This activates the Calibration process. It will reset the given LevelMeter's AccumAvgPeakAmp (accumulated average peak amplitude), and when the duration has passed, use it for the VoiceDetector's detection threshold.

◆ getLevelMeter()

ILevelMeter * getLevelMeter ( void  ) const

The LevelMeter in use.

◆ getDetector()

IVoiceDetector * getDetector ( void  ) const

The VoiceDetector in use

◆ process()

Buffer< T > process ( Buffer< T >  buf)
virtual

Process a frame of audio data.

Parameters
bufBuffer containing input audio data
Returns
Buffer containing output audio data

Implements IProcessor< T >.