From 5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3 Mon Sep 17 00:00:00 2001 From: erihel Date: Sun, 12 Aug 2012 15:00:37 +0200 Subject: * New CPluginManager class for managing plugins based on colobot.ini * Moved sound plugin into sound dir * Minor changes in logger and profile --- src/sound/plugins/oalsound/test/plugin_test.cpp | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/sound/plugins/oalsound/test/plugin_test.cpp (limited to 'src/sound/plugins/oalsound/test/plugin_test.cpp') diff --git a/src/sound/plugins/oalsound/test/plugin_test.cpp b/src/sound/plugins/oalsound/test/plugin_test.cpp new file mode 100644 index 0000000..40c1cd2 --- /dev/null +++ b/src/sound/plugins/oalsound/test/plugin_test.cpp @@ -0,0 +1,40 @@ +#include +#include +#include + +#include +#include +#include +#include + + +int main() { + new CLogger(); + new CInstanceManager(); + + lt_dlinit(); + + CPluginLoader *plugin = new CPluginLoader("libopenalsound"); + if (plugin->LoadPlugin()) { + CSoundInterface *sound = static_cast(CInstanceManager::GetInstancePointer()->SearchInstance(CLASS_SOUND)); + + sound->Create(true); + sound->CacheAll(); + sound->Play((Sound)8); + sound->Play((Sound)18); + + sleep(10); + /* + while (1) + { + // just a test, very slow + plugin->FrameMove(0); + //if ('n' == getchar()) + // break; + }*/ + plugin->UnloadPlugin(); + } + + lt_dlexit(); + return 0; +} -- cgit v1.2.3-1-g7c22