| 1799 | } |
| 1800 | |
| 1801 | void MeterPanel::StartMonitoring() |
| 1802 | { |
| 1803 | bool start = !mMonitoring; |
| 1804 | |
| 1805 | auto gAudioIO = AudioIO::Get(); |
| 1806 | if (gAudioIO->IsMonitoring()){ |
| 1807 | gAudioIO->StopStream(); |
| 1808 | } |
| 1809 | |
| 1810 | if (start && !gAudioIO->IsBusy()){ |
| 1811 | AudacityProject *p = mProject; |
| 1812 | if (p) |
| 1813 | gAudioIO->StartMonitoring(ProjectAudioIO::GetDefaultOptions(*p)); |
| 1814 | |
| 1815 | mLayoutValid = false; |
| 1816 | |
| 1817 | Refresh(false); |
| 1818 | } |
| 1819 | } |
| 1820 | |
| 1821 | void MeterPanel::StopMonitoring(){ |
| 1822 | mMonitoring = false; |
no test coverage detected