void CStateMachinen::Process(CObject* obj, eStateEvent evt) { CMonster* const monster = (CMonster*)obj; StateParameter& stateParamter = monster->mStateParamter; if( monster->GetState() == eObjectState_Die || monster->IsShocked() ) { return; } else if(stateParamter.bStateUpdate) { stateParamter.bStateUpdate = FALSE; Update( *monster, eSEVENT_Leave); stateParamter.stateOld = stateParamter.stateCur; stateParamter.stateCur = stateParamter.stateNew; stateParamter.stateNew = eMA_STAND; Update( *monster, eSEVENT_Enter); } Update( *monster, evt); SubProcess( *monster, evt); }
void SRS_Source_Out::CoreProcess(int16_t* pSamples, int frames){ #ifdef _SRSCFG_PERFTRACK int tStartFrames = frames; if (pOwner->PerfType == 0) pOwner->PerfTrack.StartDelta(); #endif // _SRSCFG_PERFTRACK int i; int16_t* pSampsIn = pSamples; int16_t* pSampsOut = pSamples; int tCacheBytes = SRS_Spool_GetCachePageSize(pCacheSpool); if (UseCache){ // Using the ring buffer - _never_ changes once the source is active... while (frames > 0) { int tUse = frames; int tPend = 256-CachePos; if (tUse > tPend) tUse = tPend; SRS_Spool_GetCachePtrs(pCacheSpool, (void**)&pCacheData, (void**)&pCacheTarget); SRSSamp* pCInL = pCacheData+CachePos; SRSSamp* pCInR = pCInL+256; SRSSamp* pCOutL = pCacheTarget+CachePos; SRSSamp* pCOutR = pCOutL+256; for (i=0; i<tUse; i++){ // Shift In and Out at the same time (ARM opt this?) #ifdef _SRSCFG_ARCH_ARM *pCInL++ = *pSampsIn++*ActiveGain; *pCInR++ = *pSampsIn++*ActiveGain; *pSampsOut++ = *pCOutL++>>16; *pSampsOut++ = *pCOutR++>>16; #endif // _SRSCFG_ARCH_ARM #ifdef _SRSCFG_ARCH_X86 *pCInL++ = ((float)*pSampsIn++/32768.0f)*ActiveGain; *pCInR++ = ((float)*pSampsIn++/32768.0f)*ActiveGain; *pSampsOut++ = (int16_t)(*pCOutL++*32767.0f); *pSampsOut++ = (int16_t)(*pCOutR++*32767.0f); #endif // _SRSCFG_ARCH_X86 } frames -= tUse; CachePos += tUse; if (CachePos == 256){ SubProcess(); SRS_Spool_UpdateCachePtrs(pCacheSpool, pCacheTarget, pCacheData); // Final data becomes 'output' next time... CachePos = 0; } } } else { while (frames > 0){
// //double Exhume::TwoSpace::SubProcess(){ //return(AmplitudeSq*TwoParticleLIPS*Amp2CrossSection); //define overall factor in font of Msq + DLIPS factor //} double Exhume::TwoSpace::WeightFunc(const double& _CosTheta){ //arbitrary weighting at low mass //std::cout<<_CosTheta<<std::endl; CosTheta=_CosTheta; //std::cout<<CosTheta<<std::endl; Phi=PhiMax;//arbitrary angle but amp might use it but shouldn' //double wgt_hold=0.0; //for(int ii=0;ii<100;ii++){ //double _SqrtsHat = (MassAtThetaScanHigh - MassAtThetaScanLow)*double(ii)/10 // + MassAtThetaScanLow; //double _SqrtsHat=sqrt(4*PartonMass*PartonMass + // MassAtThetaScan*MassAtThetaScan); double _SqrtsHat; if(PartonMass>2.0){ _SqrtsHat=2*PartonMass+0.001; } else{ _SqrtsHat=sqrt(4*PartonMass*PartonMass + 10.0); } SetKinematics(_SqrtsHat,0.0,0.0,0.0,0.0,0.0); //std::cout<<"here"<<std::endl; LIPS2Amp();// //std::cout<<"here"<<std::endl; double _wgt = SubProcess();//AmplitudeSq(); //if(_wgt > wgt_hold){ //wgt_hold=wgt; //} if(_wgt>MaximumSubProcessValue){ MaximumSubProcessCosTheta=_CosTheta; MaximumSubProcessValue=_wgt; std::cout<< MaximumSubProcessCosTheta<<std::endl; std::cout<< MaximumSubProcessValue<<std::endl; } //std::cout<<_wgt<<"\t"<<CosTheta<<std::endl; return(_wgt); }