/[svn]/linuxsampler/trunk/src/engines/EngineBase.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/EngineBase.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3207 by schoenebeck, Thu May 25 10:53:45 2017 UTC revision 3246 by schoenebeck, Sun May 28 22:22:56 2017 UTC
# Line 1304  namespace LinuxSampler { Line 1304  namespace LinuxSampler {
1304                              itScriptEvent->ignoreAllWaitCalls = false;                              itScriptEvent->ignoreAllWaitCalls = false;
1305                              itScriptEvent->handlerType = VM_EVENT_HANDLER_INIT;                              itScriptEvent->handlerType = VM_EVENT_HANDLER_INIT;
1306    
1307                              /*VMExecStatus_t res = */ pScriptVM->exec(                              VMExecStatus_t res;
1308                                  pEngineChannel->pScript->parserContext, &*itScriptEvent                              size_t instructionsCount = 0;
1309                              );                              const size_t maxInstructions = 200000; // aiming approx. 1 second max. (based on very roughly 5us / instruction)
1310                                bool bWarningShown = false;
1311                                do {
1312                                    res = pScriptVM->exec(
1313                                        pEngineChannel->pScript->parserContext, &*itScriptEvent
1314                                    );
1315                                    instructionsCount += itScriptEvent->execCtx->instructionsPerformed();
1316                                    if (instructionsCount > maxInstructions && !bWarningShown) {
1317                                        bWarningShown = true;
1318                                        dmsg(0,("[ScriptVM] WARNING: \"init\" event handler of instrument script executing for long time!\n"));
1319                                    }
1320                                } while (res & VM_EXEC_SUSPENDED && !(res & VM_EXEC_ERROR));
1321    
1322                              pEngineChannel->pScript->pEvents->free(itScriptEvent);                              pEngineChannel->pScript->pEvents->free(itScriptEvent);
1323                          }                          }
# Line 1994  namespace LinuxSampler { Line 2005  namespace LinuxSampler {
2005                      case Event::synth_param_volume_time:                      case Event::synth_param_volume_time:
2006                          pNote->Override.VolumeTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;                          pNote->Override.VolumeTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2007                          break;                          break;
2008                        case Event::synth_param_volume_curve:
2009                            itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2010                            pNote->Override.VolumeCurve = (fade_curve_t) itEvent->Param.NoteSynthParam.AbsValue;
2011                            break;
2012                      case Event::synth_param_pitch:                      case Event::synth_param_pitch:
2013                          if (relative)                          if (relative)
2014                              pNote->Override.Pitch *= itEvent->Param.NoteSynthParam.Delta;                              pNote->Override.Pitch *= itEvent->Param.NoteSynthParam.Delta;
# Line 2004  namespace LinuxSampler { Line 2019  namespace LinuxSampler {
2019                      case Event::synth_param_pitch_time:                      case Event::synth_param_pitch_time:
2020                          pNote->Override.PitchTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;                          pNote->Override.PitchTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2021                          break;                          break;
2022                        case Event::synth_param_pitch_curve:
2023                            itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2024                            pNote->Override.PitchCurve = (fade_curve_t) itEvent->Param.NoteSynthParam.AbsValue;
2025                            break;
2026                      case Event::synth_param_pan:                      case Event::synth_param_pan:
2027                          if (relative) {                          if (relative) {
2028                              pNote->Override.Pan = RTMath::RelativeSummedAvg(pNote->Override.Pan, itEvent->Param.NoteSynthParam.Delta, ++pNote->Override.PanSources);                              pNote->Override.Pan = RTMath::RelativeSummedAvg(pNote->Override.Pan, itEvent->Param.NoteSynthParam.Delta, ++pNote->Override.PanSources);

Legend:
Removed from v.3207  
changed lines
  Added in v.3246

  ViewVC Help
Powered by ViewVC