2013-04-20 11:37:36 +01:00
|
|
|
|
2013-09-11 12:57:31 +01:00
|
|
|
#include "config.hxx"
|
2013-04-20 11:37:36 +01:00
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include <jack/ringbuffer.h>
|
|
|
|
|
2013-04-20 11:50:30 +01:00
|
|
|
#include "gui.hxx"
|
2013-04-20 11:37:36 +01:00
|
|
|
#include "jack.hxx"
|
2013-04-20 11:54:16 +01:00
|
|
|
#include "event.hxx"
|
2013-04-20 12:20:46 +01:00
|
|
|
#include "denormals.hxx"
|
2013-04-20 11:37:36 +01:00
|
|
|
|
|
|
|
char* processDspMem = 0;
|
2013-05-16 13:38:46 +01:00
|
|
|
char* processGuiMem = 0;
|
2013-04-20 11:37:36 +01:00
|
|
|
|
|
|
|
jack_ringbuffer_t* rbToDsp = 0;
|
|
|
|
jack_ringbuffer_t* rbToGui = 0;
|
|
|
|
|
2013-05-16 13:38:46 +01:00
|
|
|
// global static pointers, for access from EventHandlerGui and EventHandlerDsp
|
|
|
|
Gui * gui = 0;
|
2013-04-20 11:37:36 +01:00
|
|
|
Jack* jack = 0;
|
|
|
|
|
2013-09-11 12:57:31 +01:00
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
2013-04-20 11:37:36 +01:00
|
|
|
{
|
2013-04-20 12:20:46 +01:00
|
|
|
// setup the environment
|
|
|
|
AVOIDDENORMALS();
|
|
|
|
|
2013-04-20 11:54:16 +01:00
|
|
|
// allocate data to read from
|
|
|
|
processDspMem = (char*)malloc( sizeof(EventBase) );
|
2013-05-16 13:38:46 +01:00
|
|
|
processGuiMem = (char*)malloc( sizeof(EventBase) );
|
2013-04-20 11:54:16 +01:00
|
|
|
|
2013-05-16 13:38:46 +01:00
|
|
|
rbToDsp = jack_ringbuffer_create( 5000 * sizeof(EventBase));
|
|
|
|
rbToGui = jack_ringbuffer_create( 5000 * sizeof(EventBase));
|
2013-04-20 11:54:16 +01:00
|
|
|
|
2013-05-16 13:38:46 +01:00
|
|
|
gui = new Gui();
|
2013-07-30 22:02:14 +01:00
|
|
|
jack = new Jack();
|
|
|
|
|
2013-09-11 12:57:31 +01:00
|
|
|
#ifdef BUILD_TESTS
|
|
|
|
cout << "New GUI, JACK() made" << endl;
|
|
|
|
jack->getGridLogic()->runTests();
|
|
|
|
cout << "Done testing." << endl;
|
|
|
|
#endif
|
2013-07-31 01:05:14 +01:00
|
|
|
jack->activate();
|
2013-05-16 13:38:46 +01:00
|
|
|
gui->show();
|
2013-04-20 11:37:36 +01:00
|
|
|
}
|
2013-09-11 12:57:31 +01:00
|
|
|
|