aboutsummaryrefslogtreecommitdiff
path: root/visualization/renderer/main.cpp
blob: ec4dd1daaeb39273d5687fe016fe5a84b391f1e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <QProcess>
#include <QCommandLineParser>

#include "qmpvisrendercore.hpp"

int main(int argc,char **argv)
{
	QCoreApplication::setApplicationName("qmpvisrender");
	QCoreApplication a(argc,argv);
	QCommandLineParser clp;
	clp.setApplicationDescription("Renderer a visualization of a midi file.");
	clp.addHelpOption();
	clp.parse(a.arguments());
	qmpVisRenderCore core;
	core.loadVisualizationLibrary();
	if(clp.positionalArguments().size())
		core.setMIDIFile(clp.positionalArguments().front().toStdString().c_str());
	core.startRender();
	int retval=a.exec();
	core.unloadVisualizationLibrary();
	return retval;
}