class library: Spawner - don't access PriorityQueue-array
[supercollider.git] / testsuite / supernova / sc_plugin_loader_test.cpp
blob27edf59f60031d1df43ba8cfcf794ea1d8d97f5d
1 #include <boost/test/unit_test.hpp>
3 #include <iostream>
5 #include <boost/filesystem.hpp>
7 #include "sc/sc_ugen_factory.hpp"
8 #include "server/memory_pool.hpp"
9 #include "server/server_args.hpp"
11 using namespace nova;
12 using namespace std;
14 boost::filesystem::path base_path ("/home/tim/workspace/nova-server/debug_plugins/");
16 BOOST_AUTO_TEST_CASE( ugen_factory_test_1 )
18 server_arguments::initialize(0, 0);
19 rt_pool.init(1024*1024);
20 sc_factory.initialize();
22 sc_factory.load_plugin(base_path / "BinaryOpUGens.so");
23 sc_factory.load_plugin(base_path / "ChaosUGens.so");
24 sc_factory.load_plugin(base_path / "DelayUGens.so");
25 sc_factory.load_plugin(base_path / "DemandUGens.so");
26 sc_factory.load_plugin(base_path / "DiskIO_UGens.so");
27 sc_factory.load_plugin(base_path / "DynNoiseUGens.so");
28 sc_factory.load_plugin(base_path / "FFT_UGens.so");
29 sc_factory.load_plugin(base_path / "FilterUGens.so");
30 sc_factory.load_plugin(base_path / "GendynUGens.so");
31 sc_factory.load_plugin(base_path / "GrainUGens.so");
32 sc_factory.load_plugin(base_path / "IOUGens.so");
33 sc_factory.load_plugin(base_path / "KeyboardUGens.so");
34 sc_factory.load_plugin(base_path / "LFUGens.so");
35 sc_factory.load_plugin(base_path / "ML_UGens.so");
36 sc_factory.load_plugin(base_path / "MouseUGens.so");
37 sc_factory.load_plugin(base_path / "MulAddUGens.so");
38 sc_factory.load_plugin(base_path / "NoiseUGens.so");
39 sc_factory.load_plugin(base_path / "OscUGens.so");
40 sc_factory.load_plugin(base_path / "PanUGens.so");
41 sc_factory.load_plugin(base_path / "PhysicalModelingUGens.so");
42 sc_factory.load_plugin(base_path / "PV_ThirdParty.so");
43 sc_factory.load_plugin(base_path / "ReverbUGens.so");
44 sc_factory.load_plugin(base_path / "TestUGens.so");
45 sc_factory.load_plugin(base_path / "TriggerUGens.so");
46 sc_factory.load_plugin(base_path / "UnaryOpUGens.so");
47 sc_factory.load_plugin(base_path / "UnpackFFTUGens.so");
49 rt_pool.init(1024*1024*16, true);
53 const char * test_synthdefs[] =
55 "default.scsyndef",
56 "help-In.scsyndef",
57 "help_out.scsyndef",
58 "help_out2.scsyndef",
59 "help_InFeedback.scsyndef",
60 "help_LocalIn.scsyndef",
61 "help_PlayBuf.scsyndef",
62 "help_RecordBuf.scsyndef",
63 "help_RecordBuf_overdub.scsyndef",
64 "help_LocalBuf.scsyndef",
65 "help_Demand.scsyndef",
69 #if 0 /* doesn't work anymore because of increased sanity checks */
70 BOOST_AUTO_TEST_CASE( ugen_construct_test_1 )
72 for (int i = 0; i != sizeof(test_synthdefs)/sizeof(const char*); ++i) {
73 const char * synthdef = test_synthdefs[i];
75 try {
76 std::vector<nova::sc_synthdef> defs =
77 nova::read_synthdef_file(base_path / ".." / "testsuite" / synthdef);
78 sc_synth_prototype_ptr prtype(new sc_synth_prototype(defs[0]));
80 sc_synth * s = new sc_synth(1000, prtype);
82 dsp_context context(44100, 64, 0);
83 for (int i = 0; i != 1000; ++i)
84 s->run(context);
85 delete s;
87 catch(std::runtime_error const & e)
89 std::cerr << e.what() << std::endl;
93 #endif