| 764 | } |
| 765 | |
| 766 | void ProjectManager::OnTimer(wxTimerEvent& WXUNUSED(event)) |
| 767 | { |
| 768 | auto &project = mProject; |
| 769 | auto &projectAudioIO = ProjectAudioIO::Get( project ); |
| 770 | auto meterToolBars = MeterToolBar::GetToolBars( project ); |
| 771 | |
| 772 | for (auto& meterToolBar : meterToolBars) |
| 773 | meterToolBar.get().UpdateControls(); |
| 774 | |
| 775 | auto gAudioIO = AudioIO::Get(); |
| 776 | // gAudioIO->GetNumCaptureChannels() should only be positive |
| 777 | // when we are recording. |
| 778 | if (projectAudioIO.GetAudioIOToken() > 0 && gAudioIO->GetNumCaptureChannels() > 0) { |
| 779 | wxLongLong freeSpace = ProjectFileIO::Get(project).GetFreeDiskSpace(); |
| 780 | if (freeSpace >= 0) { |
| 781 | |
| 782 | int iRecordingMins = GetEstimatedRecordingMinsLeftOnDisk(gAudioIO->GetNumCaptureChannels()); |
| 783 | auto sMessage = XO("Disk space remaining for recording: %s") |
| 784 | .Format( GetHoursMinsString(iRecordingMins) ); |
| 785 | |
| 786 | // Do not change mLastMainStatusMessage |
| 787 | SetStatusText(sMessage, MainStatusBarField()); |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | // As also with the TrackPanel timer: wxTimer may be unreliable without |
| 792 | // some restarts |
| 793 | RestartTimer(); |
| 794 | } |
| 795 | |
| 796 | void ProjectManager::OnStatusChange(StatusBarField field) |
| 797 | { |
nothing calls this directly
no test coverage detected