예제 #1
0
 GGH_Decay_KFactor_Setter(const KFactor_Setter_Arguments &args) : GGH_KFactor_Setter(args) { 
   m_decay_map   = GetDecayMap();  
   p_ampl        = GetAmpl();
   m_index_vec   = GetIndexVec();  
   p_ampl        = GetAmpl();
   m_higgs_index = GetHiggsIndex();
   Check();
 }
예제 #2
0
void DspOscillator::_BuildLookup()
{
    float posFrac = _lookupLength <= 0 ? 0 : (float)_lastPos / (float)_lookupLength;
    float angleInc = TWOPI * GetFreq() / GetSampleRate();

    _lookupLength = (int)((float)GetSampleRate() / GetFreq());

    _signal.resize(GetBufferSize());
    _signalLookup.resize(_lookupLength);

    for (int i = 0; i < _lookupLength; i++)
    {
        _signalLookup[i] = sin(angleInc * i) * GetAmpl();
    }

    _lastPos = (int)(posFrac * (float)_lookupLength + 0.5f);  // calculate new position (round up)
}