MCPcopy Create free account
hub / github.com/audacity/audacity / OnTimer

Method OnTimer

src/ProjectManager.cpp:766–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764}
765
766void 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
796void ProjectManager::OnStatusChange(StatusBarField field)
797{

Callers

nothing calls this directly

Calls 6

GetFunction · 0.85
MainStatusBarFieldFunction · 0.85
GetAudioIOTokenMethod · 0.80
GetFreeDiskSpaceMethod · 0.80
UpdateControlsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected