24 |
|
|
25 |
#include "gig/Engine.h" |
#include "gig/Engine.h" |
26 |
|
|
27 |
|
#if HAVE_SF2 |
28 |
|
#include "sf2/Engine.h" |
29 |
|
#endif |
30 |
|
|
31 |
|
#include "sfz/Engine.h" |
32 |
|
|
33 |
#include "../common/global.h" |
#include "../common/global.h" |
34 |
|
|
35 |
namespace LinuxSampler { |
namespace LinuxSampler { |
39 |
|
|
40 |
std::vector<String> EngineFactory::AvailableEngineTypes() { |
std::vector<String> EngineFactory::AvailableEngineTypes() { |
41 |
std::vector<String> result; |
std::vector<String> result; |
42 |
result.push_back("GIG"); // we only have one sampler engine implementation ATM |
result.push_back("GIG"); |
43 |
|
#if HAVE_SF2 |
44 |
|
result.push_back("SF2"); |
45 |
|
#endif |
46 |
|
result.push_back("SFZ"); |
47 |
return result; |
return result; |
48 |
} |
} |
49 |
|
|
63 |
Engine* pEngine = new gig::Engine; |
Engine* pEngine = new gig::Engine; |
64 |
engines.insert(pEngine); |
engines.insert(pEngine); |
65 |
return pEngine; |
return pEngine; |
66 |
|
} else if (!strcasecmp(EngineType.c_str(),"sf2")) { |
67 |
|
#if HAVE_SF2 |
68 |
|
Engine* pEngine = new sf2::Engine; |
69 |
|
engines.insert(pEngine); |
70 |
|
return pEngine; |
71 |
|
#else |
72 |
|
throw Exception("LinuxSampler is not compiled with SF2 support"); |
73 |
|
#endif |
74 |
|
} else if (!strcasecmp(EngineType.c_str(),"sfz")) { |
75 |
|
Engine* pEngine = new sfz::Engine; |
76 |
|
engines.insert(pEngine); |
77 |
|
return pEngine; |
78 |
} |
} |
79 |
|
|
80 |
throw Exception("Unknown engine type"); |
throw Exception("Unknown engine type"); |
81 |
} |
} |
82 |
|
|