/[svn]/linuxsampler/trunk/src/engines/AbstractEngine.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/AbstractEngine.cpp

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

revision 2593 by schoenebeck, Sun May 18 17:38:25 2014 UTC revision 2594 by schoenebeck, Thu Jun 5 00:16:25 2014 UTC
# Line 35  namespace LinuxSampler { Line 35  namespace LinuxSampler {
35    
36      std::map<AbstractEngine::Format, std::map<AudioOutputDevice*,AbstractEngine*> > AbstractEngine::engines;      std::map<AbstractEngine::Format, std::map<AudioOutputDevice*,AbstractEngine*> > AbstractEngine::engines;
37    
38        VMParserContext* AbstractEngine::ScriptResourceManager::Create(String Key, ScriptConsumer* pConsumer, void*& pArg) {
39            return parent->pScriptVM->loadScript(Key);
40        }
41    
42        void AbstractEngine::ScriptResourceManager::Destroy(VMParserContext* pResource, void* pArg) {
43            delete pResource;
44        }
45    
46      /**      /**
47       * Get an AbstractEngine object for the given AbstractEngineChannel and the       * Get an AbstractEngine object for the given AbstractEngineChannel and the
48       * given AudioOutputDevice. All engine channels which are connected to       * given AudioOutputDevice. All engine channels which are connected to
# Line 72  namespace LinuxSampler { Line 80  namespace LinuxSampler {
80          return pEngine;          return pEngine;
81      }      }
82    
83      AbstractEngine::AbstractEngine() {      AbstractEngine::AbstractEngine() : scripts(this) {
84          pAudioOutputDevice = NULL;          pAudioOutputDevice = NULL;
85          pEventGenerator    = NULL;          pEventGenerator    = NULL;
86          pSysexBuffer       = new RingBuffer<uint8_t,false>(CONFIG_SYSEX_BUFFER_SIZE, 0);          pSysexBuffer       = new RingBuffer<uint8_t,false>(CONFIG_SYSEX_BUFFER_SIZE, 0);
# Line 82  namespace LinuxSampler { Line 90  namespace LinuxSampler {
90          FrameTime          = 0;          FrameTime          = 0;
91          RandomSeed         = 0;          RandomSeed         = 0;
92          pDedicatedVoiceChannelLeft = pDedicatedVoiceChannelRight = NULL;          pDedicatedVoiceChannelLeft = pDedicatedVoiceChannelRight = NULL;
93            pScriptVM          = new InstrumentScriptVM;
94      }      }
95    
96      AbstractEngine::~AbstractEngine() {      AbstractEngine::~AbstractEngine() {
# Line 92  namespace LinuxSampler { Line 101  namespace LinuxSampler {
101          if (pSysexBuffer) delete pSysexBuffer;          if (pSysexBuffer) delete pSysexBuffer;
102          if (pDedicatedVoiceChannelLeft) delete pDedicatedVoiceChannelLeft;          if (pDedicatedVoiceChannelLeft) delete pDedicatedVoiceChannelLeft;
103          if (pDedicatedVoiceChannelRight) delete pDedicatedVoiceChannelRight;          if (pDedicatedVoiceChannelRight) delete pDedicatedVoiceChannelRight;
104            if (pScriptVM) delete pScriptVM;
105          Unregister();          Unregister();
106      }      }
107    

Legend:
Removed from v.2593  
changed lines
  Added in v.2594

  ViewVC Help
Powered by ViewVC