forked from Mdashdotdashn/LittleGPTracker
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
505 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,42 @@ | ||
#include "Application.h" | ||
#include "Application.h" | ||
|
||
#include <math.h> | ||
#include "Application/AppWindow.h" | ||
#include "Application/AppWindow.h" | ||
#include "Application/Commands/CommandDispatcher.h" | ||
#include "Application/Controllers/ControlRoom.h" | ||
#include "Application/Model/Config.h" | ||
#include "Application/Persistency/PersistencyService.h" | ||
#include "Application/Persistency/PersistencyService.h" | ||
#include "Services/Audio/Audio.h" | ||
#include "Services/Midi/MidiService.h" | ||
#include "UIFramework/Interfaces/I_GUIWindowFactory.h" | ||
#include <math.h> | ||
|
||
Application *Application::instance_ = NULL; | ||
|
||
Application *Application::instance_=NULL ; | ||
|
||
Application::Application() { | ||
} | ||
Application::Application() {} | ||
|
||
void Application::initMidiInput() | ||
{ | ||
const char * preferedDevice=Config::GetInstance()->GetValue("MIDICTRLDEVICE"); | ||
void Application::initMidiInput() { | ||
const char *preferedDevice = | ||
Config::GetInstance()->GetValue("MIDICTRLDEVICE"); | ||
if (preferedDevice) { | ||
MidiService::GetInstance()->SelectDevice(preferedDevice); | ||
} | ||
} | ||
|
||
bool Application::Init(GUICreateWindowParams ¶ms) { | ||
const char* root=Config::GetInstance()->GetValue("ROOTFOLDER") ; | ||
const char *root = Config::GetInstance()->GetValue("ROOTFOLDER"); | ||
if (root) { | ||
Path::SetAlias("root",root) ; | ||
Path::SetAlias("root", root); | ||
} | ||
window_=AppWindow::Create(params) ; | ||
PersistencyService::GetInstance() ; | ||
Audio *audio=Audio::GetInstance() ; | ||
audio->Init() ; | ||
CommandDispatcher::GetInstance()->Init() ; | ||
window_ = AppWindow::Create(params); | ||
PersistencyService::GetInstance(); | ||
Audio *audio = Audio::GetInstance(); | ||
audio->Init(); | ||
CommandDispatcher::GetInstance()->Init(); | ||
initMidiInput(); | ||
ControlRoom::GetInstance()->LoadMapping("bin:mapping.xml") ; | ||
return true ; | ||
ControlRoom::GetInstance()->LoadMapping("bin:mapping.xml"); | ||
return true; | ||
} | ||
|
||
GUIWindow *Application::GetWindow() { | ||
return window_ ; | ||
} | ||
GUIWindow *Application::GetWindow() { return window_; } | ||
|
||
Application::~Application() { | ||
delete window_ ; | ||
} | ||
Application::~Application() { delete window_; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.