Skip to content

Commit 36a6f7e

Browse files
committed
Start audio callbacks after starting acquisition
1 parent d63ff02 commit 36a6f7e

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

Source/UI/ControlPanel.cpp

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -528,27 +528,26 @@ void ControlPanel::startAcquisition(bool recordingShouldAlsoStart)
528528

529529
graph->updateConnections();
530530

531-
if (audio->beginCallbacks()) // starts acquisition callbacks
531+
graph->startAcquisition(); // inform processors acquisition is starting
532+
533+
if (recordingShouldAlsoStart)
532534
{
533-
if (recordingShouldAlsoStart)
534-
{
535-
startRecording();
536-
playButton->setToggleState(true, dontSendNotification);
537-
}
535+
startRecording();
536+
playButton->setToggleState(true, dontSendNotification);
537+
}
538538

539-
playButton->getNormalImage()->replaceColour(defaultButtonColour, Colours::yellow);
539+
playButton->getNormalImage()->replaceColour(defaultButtonColour, Colours::yellow);
540540

541-
clock->start(); // starts the clock
542-
audioEditor->disable();
541+
clock->start(); // starts the clock
542+
audioEditor->disable();
543543

544-
stopTimer();
545-
startTimer(250); // refresh every 250 ms
544+
stopTimer();
545+
startTimer(250); // refresh every 250 ms
546546

547-
recordSelector->setEnabled(false); // why is this outside the "if" statement?
548-
recordOptionsButton->setEnabled(false);
549-
550-
graph->startAcquisition(); // start data flow
551-
}
547+
recordSelector->setEnabled(false); // why is this outside the "if" statement?
548+
recordOptionsButton->setEnabled(false);
549+
550+
audio->beginCallbacks();
552551
}
553552
}
554553

0 commit comments

Comments
 (0)