OSC seperation
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "OscServer.h"
|
||||
#include "RuntimeControlBridge.h"
|
||||
#include "RuntimeHost.h"
|
||||
#include "RuntimeStore.h"
|
||||
#include <windows.h>
|
||||
|
||||
ControlServices::ControlServices() :
|
||||
@@ -34,9 +35,9 @@ bool ControlServices::Start(OpenGLComposite& composite, RuntimeHost& runtimeHost
|
||||
return true;
|
||||
}
|
||||
|
||||
void ControlServices::BeginPolling(RuntimeHost& runtimeHost)
|
||||
void ControlServices::BeginPolling(RuntimeHost& runtimeHost, RuntimeStore& runtimeStore)
|
||||
{
|
||||
StartPolling(runtimeHost);
|
||||
StartPolling(runtimeHost, runtimeStore);
|
||||
}
|
||||
|
||||
void ControlServices::Stop()
|
||||
@@ -174,12 +175,12 @@ RuntimePollEvents ControlServices::ConsumePollEvents()
|
||||
return events;
|
||||
}
|
||||
|
||||
void ControlServices::StartPolling(RuntimeHost& runtimeHost)
|
||||
void ControlServices::StartPolling(RuntimeHost& runtimeHost, RuntimeStore& runtimeStore)
|
||||
{
|
||||
if (mPollRunning.exchange(true))
|
||||
return;
|
||||
|
||||
mPollThread = std::thread([this, &runtimeHost]() { PollLoop(runtimeHost); });
|
||||
mPollThread = std::thread([this, &runtimeHost, &runtimeStore]() { PollLoop(runtimeHost, runtimeStore); });
|
||||
}
|
||||
|
||||
void ControlServices::StopPolling()
|
||||
@@ -191,7 +192,7 @@ void ControlServices::StopPolling()
|
||||
mPollThread.join();
|
||||
}
|
||||
|
||||
void ControlServices::PollLoop(RuntimeHost& runtimeHost)
|
||||
void ControlServices::PollLoop(RuntimeHost& runtimeHost, RuntimeStore& runtimeStore)
|
||||
{
|
||||
while (mPollRunning)
|
||||
{
|
||||
@@ -203,7 +204,7 @@ void ControlServices::PollLoop(RuntimeHost& runtimeHost)
|
||||
for (const auto& entry : pendingCommits)
|
||||
{
|
||||
std::string commitError;
|
||||
if (runtimeHost.UpdateLayerParameterByControlKey(
|
||||
if (runtimeStore.SetStoredParameterValueByControlKey(
|
||||
entry.second.layerKey,
|
||||
entry.second.parameterKey,
|
||||
entry.second.value,
|
||||
|
||||
Reference in New Issue
Block a user