@@ -916,28 +916,31 @@ void ProcessorGraph::updateConnections()
916916 if (processor->isSplitter ())
917917 continue ;
918918
919- if (processor->isSource ())
920- connectProcessorToMessageCenter (processor);
919+ if (processor->isReady ())
920+ connectProcessorToAudioNode (processor);
921921
922- ConnectionInfo conn;
923- conn.source = processor;
924- conn.connectContinuous = true ;
925- conn.connectEvents = true ;
922+ if (processor->isRecordNode ())
923+ connectProcessorToMessageCenter (processor);
926924
927- Array<GenericProcessor*> nodesToConnect;
925+ ConnectionInfo conn;
926+ conn.source = processor;
927+ conn.connectContinuous = true ;
928+ conn.connectEvents = true ;
928929
929- GenericProcessor* destNode = processor-> getDestNode () ;
930+ Array< GenericProcessor*> nodesToConnect ;
930931
931- if (destNode == nullptr )
932+ GenericProcessor* destNode = processor->getDestNode ();
933+
934+ if (destNode == nullptr )
932935 continue ;
933936
934- Array<Splitter*> splitters;
935- GenericProcessor* lastProcessor = processor;
937+ Array<Splitter*> splitters;
938+ GenericProcessor* lastProcessor = processor;
936939
937- // if the next node is a Merger, we actually need to
938- // connect to the next non-Merger node
939- while (destNode->isMerger ())
940- {
940+ // if the next node is a Merger, we actually need to
941+ // connect to the next non-Merger node
942+ while (destNode->isMerger ())
943+ {
941944 LOGDD (" Found Merger: " , destNode->getNodeId ());
942945
943946 Merger* merger = (Merger*) destNode;
@@ -963,22 +966,22 @@ void ProcessorGraph::updateConnections()
963966 LOGDD (" Adding node to connect: " , destNode->getNodeId ());
964967 }
965968
966- }
969+ }
967970
968- // if there's nothing after the Merger, skip
969- if (destNode == nullptr )
971+ // if there's nothing after the Merger, skip
972+ if (destNode == nullptr )
970973 continue ;
971974
972- // if the next node is a Splitter, we need to connect to both paths
973- if (destNode->isSplitter ())
974- {
975+ // if the next node is a Splitter, we need to connect to both paths
976+ if (destNode->isSplitter ())
977+ {
975978 splitters.add ((Splitter*) destNode);
976979 LOGDD (" Adding Splitter: " , destNode->getNodeId ());
977- }
980+ }
978981
979- // keep connecting until we've found all possible paths
980- while (splitters.size () > 0 )
981- {
982+ // keep connecting until we've found all possible paths
983+ while (splitters.size () > 0 )
984+ {
982985 Splitter* thisSplitter = splitters.getLast ();
983986 splitters.removeLast ();
984987
@@ -999,17 +1002,17 @@ void ProcessorGraph::updateConnections()
9991002 }
10001003 }
10011004 }
1002- }
1005+ }
10031006
1004- // if it's not a Splitter or Merger, simply connect
1005- if (nodesToConnect.size () == 0 )
1007+ // if it's not a Splitter or Merger, simply connect
1008+ if (nodesToConnect.size () == 0 )
10061009 nodesToConnect.add (destNode);
10071010
1008- // Add all the connections we found
1009- for (auto node : nodesToConnect)
1010- {
1011+ // Add all the connections we found
1012+ for (auto node : nodesToConnect)
1013+ {
10111014 sourceMap[node].add (conn);
1012- }
1015+ }
10131016
10141017 // Finally, actually connect sources to each dest processor,
10151018 // in correct order by merger topography
@@ -1024,6 +1027,8 @@ void ProcessorGraph::updateConnections()
10241027 }
10251028 }
10261029
1030+ getAudioNode ()->updatePlaybackBuffer ();
1031+
10271032} // end method
10281033
10291034void ProcessorGraph::connectProcessors (GenericProcessor* source, GenericProcessor* dest,
0 commit comments