diff options
author | Piotr Dziwiński <piotrdz@gmail.com> | 2012-08-12 10:15:19 -0700 |
---|---|---|
committer | Piotr Dziwiński <piotrdz@gmail.com> | 2012-08-12 10:15:19 -0700 |
commit | 50deedb6cbc927f6c7d6c3c5e9134d11c20782ae (patch) | |
tree | 8eb3fbd914cfea11660534b296bfddcffcc5f7b4 /src/sound/plugins/oalsound/test/plugin_test.cpp | |
parent | bc24b9f9e516e657fcc0034808e010287fc2e393 (diff) | |
parent | 62b545128f37746c343760e464872655b5523c6f (diff) | |
download | colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.tar.gz colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.tar.bz2 colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.zip |
Merge pull request #36 from Erihel/dev
Merge of new features: plugins and INI profile, changes from dev-graphics
Diffstat (limited to 'src/sound/plugins/oalsound/test/plugin_test.cpp')
-rw-r--r-- | src/sound/plugins/oalsound/test/plugin_test.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
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 <string> +#include <cstdio> +#include <unistd.h> + +#include <common/logger.h> +#include <common/iman.h> +#include <sound/sound.h> +#include <plugins/pluginloader.h> + + +int main() { + new CLogger(); + new CInstanceManager(); + + lt_dlinit(); + + CPluginLoader *plugin = new CPluginLoader("libopenalsound"); + if (plugin->LoadPlugin()) { + CSoundInterface *sound = static_cast<CSoundInterface*>(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; +} |