// VolumeLimiter.h: interface for the VolumeLimiter class.
|
//
|
//////////////////////////////////////////////////////////////////////
|
|
#ifndef AFX_VOLUMELIMITER_H__AE04AB3F_5913_436C_8FEB_E78F7E31D0C3__INCLUDED_
|
#define AFX_VOLUMELIMITER_H__AE04AB3F_5913_436C_8FEB_E78F7E31D0C3__INCLUDED_
|
|
class VolumeLimiter
|
{
|
public:
|
VolumeLimiter(double threshold, double lossIncrement, double lossDecrement);
|
virtual ~VolumeLimiter();
|
int LimitVolume(short *packet, int numSamples);
|
private:
|
double threshold;
|
double loss;
|
double lossTarget;
|
double lossStep;
|
double lossIncrement;
|
double lossDecrement;
|
const double smallNumber;
|
};
|
|
#endif // !defined(AFX_VOLUMELIMITER_H__AE04AB3F_5913_436C_8FEB_E78F7E31D0C3__INCLUDED_)
|