/[svn]/linuxsampler/branches/release2_1_1/src/scriptvm/ScriptVMFactory.cpp
ViewVC logotype

Contents of /linuxsampler/branches/release2_1_1/src/scriptvm/ScriptVMFactory.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3538 - (show annotations) (download)
Sat Jul 27 11:23:38 2019 UTC (4 years, 10 months ago) by schoenebeck
File size: 1059 byte(s)
Created linuxsampler branch 'release2_1_1'.

1 /*
2 * Copyright (c) 2016 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 "ScriptVMFactory.h"
11 #include <algorithm>
12 #include "../engines/common/InstrumentScriptVM.h"
13 #include "../engines/gig/InstrumentScriptVM.h"
14
15 namespace LinuxSampler {
16
17 ScriptVM* ScriptVMFactory::Create(String EngineName) {
18 std::transform(EngineName.begin(), EngineName.end(), EngineName.begin(), ::tolower);
19 if (EngineName == "core")
20 return new ScriptVM;
21 else if (EngineName == "gig")
22 return new gig::InstrumentScriptVM;
23 else if (EngineName == "sf2")
24 return new InstrumentScriptVM;
25 else if (EngineName == "sfz")
26 return new InstrumentScriptVM;
27 else
28 return NULL;
29 }
30
31 std::vector<String> ScriptVMFactory::AvailableEngines() {
32 std::vector<String> v;
33 v.push_back("core");
34 v.push_back("gig");
35 v.push_back("sf2");
36 v.push_back("sfz");
37 return v;
38 }
39
40 } // namespace LinuxSampler

  ViewVC Help
Powered by ViewVC