/[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 3221 by schoenebeck, Fri May 26 18:30:42 2017 UTC revision 3293 by schoenebeck, Tue Jun 27 22:19:19 2017 UTC
# Line 379  namespace LinuxSampler { Line 379  namespace LinuxSampler {
379                  }                  }
380                  pVoicePool->clear();                  pVoicePool->clear();
381    
382                  // (re)create event generator                  // update event generator
383                  if (pEventGenerator) delete pEventGenerator;                  pEventGenerator->SetSampleRate(pAudioOut->SampleRate());
                 pEventGenerator = new EventGenerator(pAudioOut->SampleRate());  
384    
385                  dmsg(1,("Starting disk thread..."));                  dmsg(1,("Starting disk thread..."));
386                  pDiskThread->StartThread();                  pDiskThread->StartThread();
# Line 1025  namespace LinuxSampler { Line 1024  namespace LinuxSampler {
1024                  itScriptEvent->executionSlices = 0;                  itScriptEvent->executionSlices = 0;
1025                  itScriptEvent->ignoreAllWaitCalls = false;                  itScriptEvent->ignoreAllWaitCalls = false;
1026                  itScriptEvent->handlerType = pEventHandler->eventHandlerType();                  itScriptEvent->handlerType = pEventHandler->eventHandlerType();
1027                    itScriptEvent->parentHandlerID = 0;
1028                    itScriptEvent->childHandlerID[0] = 0;
1029                    itScriptEvent->autoAbortByParent = false;
1030                    itScriptEvent->forkIndex = 0;
1031                  // this is the native representation of the $EVENT_ID script variable                  // this is the native representation of the $EVENT_ID script variable
1032                  itScriptEvent->id =                  itScriptEvent->id =
1033                      (itEvent->Type == Event::type_note_on)                      (itEvent->Type == Event::type_note_on)
# Line 1296  namespace LinuxSampler { Line 1299  namespace LinuxSampler {
1299                              RTList<ScriptEvent>::Iterator itScriptEvent =                              RTList<ScriptEvent>::Iterator itScriptEvent =
1300                                  pEngineChannel->pScript->pEvents->allocAppend();                                  pEngineChannel->pScript->pEvents->allocAppend();
1301    
1302                                itScriptEvent->cause = pEventGenerator->CreateEvent(0);
1303                                itScriptEvent->cause.Type = (Event::type_t) -1; // some invalid type to avoid random event processing
1304                              itScriptEvent->cause.pEngineChannel = pEngineChannel;                              itScriptEvent->cause.pEngineChannel = pEngineChannel;
1305                                itScriptEvent->cause.pMidiInputPort = pEngineChannel->GetMidiInputPort();
1306                                itScriptEvent->id = 0;
1307                              itScriptEvent->handlers[0] = pEngineChannel->pScript->handlerInit;                              itScriptEvent->handlers[0] = pEngineChannel->pScript->handlerInit;
1308                              itScriptEvent->handlers[1] = NULL;                              itScriptEvent->handlers[1] = NULL;
1309                              itScriptEvent->currentHandler = 0;                              itScriptEvent->currentHandler = 0;
1310                              itScriptEvent->executionSlices = 0;                              itScriptEvent->executionSlices = 0;
1311                              itScriptEvent->ignoreAllWaitCalls = false;                              itScriptEvent->ignoreAllWaitCalls = false;
1312                              itScriptEvent->handlerType = VM_EVENT_HANDLER_INIT;                              itScriptEvent->handlerType = VM_EVENT_HANDLER_INIT;
1313                                itScriptEvent->parentHandlerID = 0;
1314                                itScriptEvent->childHandlerID[0] = 0;
1315                                itScriptEvent->autoAbortByParent = false;
1316                                itScriptEvent->forkIndex = 0;
1317    
1318                              VMExecStatus_t res;                              VMExecStatus_t res;
1319                              size_t instructionsCount = 0;                              size_t instructionsCount = 0;
# Line 2005  namespace LinuxSampler { Line 2016  namespace LinuxSampler {
2016                      case Event::synth_param_volume_time:                      case Event::synth_param_volume_time:
2017                          pNote->Override.VolumeTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;                          pNote->Override.VolumeTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2018                          break;                          break;
2019                        case Event::synth_param_volume_curve:
2020                            itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2021                            pNote->Override.VolumeCurve = (fade_curve_t) itEvent->Param.NoteSynthParam.AbsValue;
2022                            break;
2023                      case Event::synth_param_pitch:                      case Event::synth_param_pitch:
2024                          if (relative)                          if (relative)
2025                              pNote->Override.Pitch *= itEvent->Param.NoteSynthParam.Delta;                              pNote->Override.Pitch *= itEvent->Param.NoteSynthParam.Delta;
# Line 2015  namespace LinuxSampler { Line 2030  namespace LinuxSampler {
2030                      case Event::synth_param_pitch_time:                      case Event::synth_param_pitch_time:
2031                          pNote->Override.PitchTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;                          pNote->Override.PitchTime = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2032                          break;                          break;
2033                        case Event::synth_param_pitch_curve:
2034                            itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
2035                            pNote->Override.PitchCurve = (fade_curve_t) itEvent->Param.NoteSynthParam.AbsValue;
2036                            break;
2037                      case Event::synth_param_pan:                      case Event::synth_param_pan:
2038                          if (relative) {                          if (relative) {
2039                              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.3221  
changed lines
  Added in v.3293

  ViewVC Help
Powered by ViewVC