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(); }
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) }