Order the modules so that they always read the most recent sample from their inputs */
| 409 | /** Order the modules so that they always read the most recent sample from their inputs |
| 410 | */ |
| 411 | static void Engine_orderModules(Engine* that) { |
| 412 | Engine::Internal* internal = that->internal; |
| 413 | |
| 414 | IdentityDictionary<int64_t> terminalModulesIDs; |
| 415 | Engine_storeTerminalModulesIDs(internal->terminalModules, terminalModulesIDs); |
| 416 | |
| 417 | IdentityDictionary<Module*> touchedModules; |
| 418 | std::vector<Module*> orderedModules; |
| 419 | orderedModules.reserve(internal->modules.size()); |
| 420 | for (Module* module : internal->modules) |
| 421 | Engine_orderModule(module, touchedModules, orderedModules, terminalModulesIDs); |
| 422 | |
| 423 | Engine_assignOrderedModules(internal->modules, orderedModules); |
| 424 | |
| 425 | #if DEBUG_ORDERED_MODULES |
| 426 | Engine_debugOrderedModules(internal->modules); |
| 427 | #endif |
| 428 | } |
| 429 | |
| 430 | |
| 431 | static void Engine_updateConnected(Engine* that) { |
no test coverage detected