1 /* 2 * Copyright (c) 2014 - 2020 Christian Schoenebeck 3 * 4 * http://www.linuxsampler.org 5 * 6 * This file is part of LinuxSampler and released under the same terms. 7 * See README file for details. 8 */ 9 10 #include "AbstractInstrumentManager.h" 11 #include "../AbstractEngine.h" 12 #include "../AbstractEngineChannel.h" 13 14 namespace LinuxSampler { 15 Create(ScriptKey key,InstrumentScriptConsumer * pConsumer,void * & pArg)16 VMParserContext* AbstractInstrumentManager::ScriptResourceManager::Create(ScriptKey key, InstrumentScriptConsumer* pConsumer, void*& pArg) { 17 AbstractEngineChannel* pEngineChannel = dynamic_cast<AbstractEngineChannel*>(pConsumer); 18 return pEngineChannel->pEngine->pScriptVM->loadScript(key.code, key.patchVars); 19 } 20 Destroy(VMParserContext * pResource,void * pArg)21 void AbstractInstrumentManager::ScriptResourceManager::Destroy(VMParserContext* pResource, void* pArg) { 22 delete pResource; 23 } 24 25 } // namespace LinuxSampler 26