summaryrefslogtreecommitdiffstats
path: root/src/plugins/test/manager_test.cpp
blob: d921c1d32a459d2526548bf62c6b753d64fb4392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <common/logger.h>
#include <common/profile.h>
#include <common/iman.h>
#include <plugins/pluginmanager.h>
#include <sound/sound.h>


int main() {
    new CLogger();
    new CProfile();
    new CInstanceManager();
    CPluginManager *mgr = new CPluginManager();

    if (!GetProfile()->InitCurrentDirectory()) {
        GetLogger()->Error("Config not found!\n");
        return 1;
    }

    mgr->LoadFromProfile();
    CSoundInterface *sound = static_cast<CSoundInterface*>(CInstanceManager::GetInstancePointer()->SearchInstance(CLASS_SOUND));

    if (!sound) {
        GetLogger()->Error("Sound not loaded!\n");
        return 2;
    }

    sound->Create(true);
    mgr->UnloadAllPlugins();

    return 0;
}