Skip to content

Commit

Permalink
Start audio callbacks after starting acquisition
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Aug 29, 2024
1 parent d63ff02 commit 36a6f7e
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions Source/UI/ControlPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,27 +528,26 @@ void ControlPanel::startAcquisition(bool recordingShouldAlsoStart)

graph->updateConnections();

if (audio->beginCallbacks()) // starts acquisition callbacks
graph->startAcquisition(); // inform processors acquisition is starting

if (recordingShouldAlsoStart)
{
if (recordingShouldAlsoStart)
{
startRecording();
playButton->setToggleState(true, dontSendNotification);
}
startRecording();
playButton->setToggleState(true, dontSendNotification);
}

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

clock->start(); // starts the clock
audioEditor->disable();
clock->start(); // starts the clock
audioEditor->disable();

stopTimer();
startTimer(250); // refresh every 250 ms
stopTimer();
startTimer(250); // refresh every 250 ms

recordSelector->setEnabled(false); // why is this outside the "if" statement?
recordOptionsButton->setEnabled(false);

graph->startAcquisition(); // start data flow
}
recordSelector->setEnabled(false); // why is this outside the "if" statement?
recordOptionsButton->setEnabled(false);

audio->beginCallbacks();
}
}

Expand Down

0 comments on commit 36a6f7e

Please sign in to comment.