Browse Source

Alternative approach for zero-latency cables

tags/22.02
falkTX 3 years ago
parent
commit
c1f436eea0
2 changed files with 6 additions and 0 deletions
  1. +1
    -0
      include/engine/Port.hpp
  2. +5
    -0
      src/override/Engine.cpp

+ 1
- 0
include/engine/Port.hpp View File

@@ -124,6 +124,7 @@ struct Port {
/** Returns a pointer to the array of voltages beginning with firstChannel.
The pointer can be used for reading and writing.
*/
// TODO convert to const float* for zero-latency cable stuff and fix all plugins after
float* getVoltages(int firstChannel = 0) {
return &cvoltages[firstChannel];
}


+ 5
- 0
src/override/Engine.cpp View File

@@ -203,6 +203,11 @@ static void Engine_stepFrame(Engine* that) {
// Step each module
for (Module* module : internal->modules) {
module->doProcess(processArgs);
// FIXME remove this section below after all modules can use zero-latency cable stuff
for (Output& output : module->outputs) {
for (Cable* cable : output.cables)
Cable_step(cable);
}
}

++internal->frame;


Loading…
Cancel
Save