-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
43 lines (31 loc) · 1007 Bytes
/
main.cpp
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
32
33
34
35
36
37
38
39
40
41
42
43
#include "core.h"
#include "nodegroup.h"
#include "mixernode.h"
#include "hostthread.h"
#include "mainwindow.h"
#include <QtGui>
void testMidi();
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
app.setApplicationName("Evilnote");
En::Core core;
core.scanVstDirs();
En::NodeGroup* rootGroup = new En::NodeGroup();
En::MixerNode* mixerNode = new En::MixerNode();
mixerNode->setPosition(QPointF(0, 0));
rootGroup->addNode(mixerNode);
rootGroup->setOutputNode(mixerNode);
En::HostThread* hostThread = new En::HostThread(rootGroup);
hostThread->start(QThread::TimeCriticalPriority);
En::MainWindow main(rootGroup);
hostThread->connect(hostThread, SIGNAL(utilisation(float)), &main, SLOT(utilisation(float)));
main.show();
app.exec();
hostThread->quit();
//qDebug() << "Waiting for host thread to finish up...";
hostThread->wait();
//qDebug() << "Host thread finished";
delete rootGroup;
return 0;
}