| 352 | |
| 353 | |
| 354 | void DeviceToolBar::EnableDisableButtons() |
| 355 | { |
| 356 | auto gAudioIO = AudioIOBase::Get(); |
| 357 | if (gAudioIO) { |
| 358 | // we allow changes when monitoring, but not when recording |
| 359 | bool audioStreamActive = gAudioIO->IsStreamActive() && !gAudioIO->IsMonitoring(); |
| 360 | |
| 361 | // Here we should relinquish focus |
| 362 | if (audioStreamActive) { |
| 363 | wxWindow *focus = wxWindow::FindFocus(); |
| 364 | if (focus == mHost || focus == mInput || focus == mOutput || focus == mInputChannels) |
| 365 | TrackPanel::Get( mProject ).SetFocus(); |
| 366 | } |
| 367 | |
| 368 | mHost->Enable(!audioStreamActive); |
| 369 | mInput->Enable(!audioStreamActive); |
| 370 | mOutput->Enable(!audioStreamActive); |
| 371 | mInputChannels->Enable(!audioStreamActive); |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | void DeviceToolBar::SetNames() |
| 376 | { |
nothing calls this directly
no test coverage detected