File tree Expand file tree Collapse file tree
Processors/ProcessorGraph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,6 +194,22 @@ void ProcessorGraph::restoreParameters()
194194
195195}
196196
197+ bool ProcessorGraph::hasRecordNode ()
198+ {
199+
200+ Array<GenericProcessor*> processors = getListOfProcessors ();
201+
202+ for (auto p : processors)
203+ {
204+ if (p->isRecordNode ())
205+ {
206+ return true ;
207+ }
208+ }
209+ return false ;
210+
211+ }
212+
197213Array<GenericProcessor*> ProcessorGraph::getListOfProcessors ()
198214{
199215
@@ -633,7 +649,7 @@ bool ProcessorGraph::enableProcessors()
633649
634650 bool allClear;
635651
636- if (getNumNodes () < 5 )
652+ if (getNumNodes () < 4 )
637653 {
638654 std::cout << " Not enough processors in signal chain to acquire data" << std::endl;
639655 AccessClass::getUIComponent ()->disableCallbacks ();
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ class ProcessorGraph : public AudioProcessorGraph
6969 Array<RecordNode*> getRecordNodes ();
7070 AudioNode* getAudioNode ();
7171 MessageCenter* getMessageCenter ();
72+
73+ bool hasRecordNode ();
7274
7375 void updateConnections (Array<SignalChainTabButton*, CriticalSection>);
7476
Original file line number Diff line number Diff line change @@ -911,6 +911,14 @@ void ControlPanel::buttonClicked(Button* button)
911911 {
912912 if (recordButton->getToggleState ())
913913 {
914+
915+ if (!graph->hasRecordNode ())
916+ {
917+ CoreServices::sendStatusMessage (" Please insert at least one Record Node to start recording!" );
918+ recordButton->setToggleState (false , dontSendNotification);
919+ return ;
920+ }
921+
914922 if (playButton->getToggleState ())
915923 {
916924 startRecording ();
You can’t perform that action at this time.
0 commit comments