midi.update() included in mutex
This commit is contained in:
@@ -73,7 +73,7 @@ class SignalManager{
|
||||
while(loop){
|
||||
std::chrono::duration<double, std::micro> diff = std::chrono::steady_clock::now() - last;
|
||||
if(diff.count() > 500){
|
||||
//mutex->lock();
|
||||
mutex->lock();
|
||||
if(play){
|
||||
for(auto& s : signals){
|
||||
s.direction = (s.next->position - s.position).norm();
|
||||
@@ -91,9 +91,9 @@ class SignalManager{
|
||||
}
|
||||
}
|
||||
}
|
||||
//mutex->unlock();
|
||||
last = std::chrono::steady_clock::now();
|
||||
midi.update();
|
||||
mutex->unlock();
|
||||
last = std::chrono::steady_clock::now();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user