| 274 | } |
| 275 | |
| 276 | void NeuralNoteMainView::timerCallback() |
| 277 | { |
| 278 | auto processor_state = mProcessor.getState(); |
| 279 | if (mRecordButton->getToggleState() && processor_state != Recording) { |
| 280 | mRecordButton->setToggleState(false, sendNotification); |
| 281 | updateEnablements(); |
| 282 | } |
| 283 | |
| 284 | if (mPlayPauseButton->getToggleState() != mProcessor.getPlayer()->isPlaying()) { |
| 285 | mPlayPauseButton->setToggleState(mProcessor.getPlayer()->isPlaying(), sendNotification); |
| 286 | } |
| 287 | |
| 288 | if (mPrevState != processor_state) { |
| 289 | mPrevState = processor_state; |
| 290 | updateEnablements(); |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | void NeuralNoteMainView::repaintPianoRoll() |
| 295 | { |