Audacity  3.0.3
Enumerations | Functions
ProjectFSCK.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  : unsigned {
  IndicatorSmallWidth = 9, IndicatorMediumWidth = 13, IndicatorOffset = 1, TopMargin = 1,
  BottomMargin = 2, LeftMargin = 1, RightMargin = 1, ID_QUIT_AUDACITY = 10000,
  ID_DISCARD_SELECTED, ID_RECOVER_SELECTED, ID_SKIP, ID_FILE_LIST,
  AddButtonID = 10000, RemoveButtonID, RenameButtonID, RestoreButtonID,
  ImportButtonID, ExportButtonID, SaveButtonID, DefaultsButtonID,
  InsertButtonID, EditButtonID, DeleteButtonID, UpButtonID,
  DownButtonID, ApplyToProjectButtonID = ApplyToProjectID, ApplyToFilesButtonID = ApplyToFilesID, RunID = 1000,
  BSaveID, ClearID, StaticTextID, BlockSizeID,
  DataSizeID, NumEditsID, RandSeedID, kCommands,
  kMenus, kPreferences, kTracks, kClips,
  kEnvelopes, kLabels, kBoxes, nTypes,
  kJson, kLisp, kBrief, nFormats,
  FileListID = 6000, CopySelectedFilesButtonID, CopyNamesToClipboardID, FutureActionChoiceID,
  ID_Amp = 10000, ID_Peak, ID_Clip, ID_Bass = 10000,
  ID_Treble, ID_Gain, ID_Link, ID_PercentChange = 10000,
  ID_Multiplier, ID_FromVinyl, ID_ToVinyl, ID_ToLength,
  ID_Thresh = 10000, ID_Width, ID_Threshold = 10000, ID_NoiseFloor,
  ID_Ratio, ID_Attack, ID_Decay, ID_BUTTON_USECURRENTF = 10001,
  ID_BUTTON_USECURRENTB, ID_BUTTON_EXPORT, ID_BUTTON_RESET, ID_FOREGROUNDSTART_T,
  ID_FOREGROUNDEND_T, ID_BACKGROUNDSTART_T, ID_BACKGROUNDEND_T, ID_FOREGROUNDDB_TEXT,
  ID_BACKGROUNDDB_TEXT, ID_RESULTS_TEXT, ID_RESULTSDB_TEXT, ID_Sequence,
  ID_Amplitude, ID_Duration, ID_DutyCycle, ID_Length = 10000,
  ID_dBMax, ID_dBMin, ID_Clear, ID_Invert,
  ID_Mode, ID_Draw, ID_Graphic, ID_Interp,
  ID_Linear, ID_Grid, ID_Curve, ID_Manage,
  ID_Delete, ID_Slider, ID_Duration = 20000, ID_Toggles = 21000,
  ID_Sliders = 22000, ID_Texts = 23000, ID_Duration = 10000, ID_Triggers = 11000,
  ID_Toggles = 12000, ID_Sliders = 13000, ID_Choices = 14000, ID_Texts = 15000,
  ID_TIMER = 20000, ID_BUTTON_GETPROFILE = 10001, ID_RADIOBUTTON_KEEPSIGNAL, ID_RADIOBUTTON_RESIDUE,
  ID_GAIN_SLIDER, ID_GAIN_TEXT, ID_NEW_SENSITIVITY_SLIDER, ID_NEW_SENSITIVITY_TEXT,
  ID_FREQ_SLIDER, ID_FREQ_TEXT, END_OF_BASIC_SLIDERS, END_OF_SLIDERS = END_OF_BASIC_SLIDERS,
  FIRST_SLIDER = ID_GAIN_SLIDER, ID_BUTTON_GETPROFILE = 10001, ID_BUTTON_LEAVENOISE, ID_RADIOBUTTON_KEEPSIGNAL,
  ID_RADIOBUTTON_KEEPNOISE, ID_SENSITIVITY_SLIDER, ID_GAIN_SLIDER, ID_FREQ_SLIDER,
  ID_TIME_SLIDER, ID_SENSITIVITY_TEXT, ID_GAIN_TEXT, ID_FREQ_TEXT,
  ID_TIME_TEXT, ID_Editor = 10000, ID_Load, ID_Save,
  ID_Slider = 11000, ID_Choice = 13000, ID_FILE = 15000, ID_Stages = 10000,
  ID_DryWet, ID_Freq, ID_Phase, ID_Depth,
  ID_Feedback, ID_OutGain, ID_RoomSize = 10000, ID_PreDelay,
  ID_Reverberance, ID_HfDamping, ID_ToneLow, ID_ToneHigh,
  ID_WetGain, ID_DryGain, ID_StereoWidth, ID_WetOnly,
  SBSMSOutBlockSize = 512, ID_FilterPanel = 10000, ID_dBMax, ID_dBMin,
  ID_Type, ID_SubType, ID_Order, ID_Ripple,
  ID_Cutoff, ID_StopbandRipple, ID_RatePercentChangeStart = 10000, ID_RatePercentChangeEnd,
  ID_PitchHalfStepsStart, ID_PitchHalfStepsEnd, ID_PitchPercentChangeStart, ID_PitchPercentChangeEnd,
  ID_Program = 10000, ID_Sliders = 11000, ID_Choices = 12000, ID_Texts = 13000,
  ID_Toggles = 14000, ID_Duration = 20000, ID_Sliders = 21000, ID_Freq = 10000,
  ID_Phase, ID_Depth, ID_Res, ID_FreqOfs,
  ID_OutGain, ID_MIXERPANEL = 10001, ID_SLIDER_CHANNEL, QUALITY_2 = 2,
  PRESET_INSANE = 0, PRESET_EXTREME = 1, PRESET_STANDARD = 2, PRESET_MEDIUM = 3,
  FormatID = 10001, OptionsID, DirID, CreateID,
  ChooseID, LabelID, FirstID, FirstFileNameID,
  TrackID, ByNameAndNumberID, ByNameID, ByNumberID,
  PrefixID, OverwriteID, FirstID = 7000, FreqZoomSliderID,
  FreqPanScrollerID, FreqExportButtonID, FreqAlgChoiceID, FreqSizeChoiceID,
  FreqFuncChoiceID, FreqAxisChoiceID, ReplotButtonID, GridOnOffID,
  ID_AVAIL = 1000, ID_FILESIZE, ID_TOTAL, ID_LEVELS,
  ID_DISCARD, ID_DISCARD_CLIPBOARD, ID_COMPACT, ChoiceID = 9000,
  PlayID, DetectID, ID_INSERTA = 11000, ID_INSERTB,
  ID_REMOVE, ID_IMPORT, ID_EXPORT, LoggerID_Save = wxID_HIGHEST + 1,
  LoggerID_Clear, LoggerID_Close, kID_RadioButton_BouncingBall = 10101, kID_RadioButton_Highlight,
  ID_BITMAPBUTTON_MUSICAL_INSTRUMENT = 13000, ID_SLIDER_PAN, ID_SLIDER_GAIN, ID_TOGGLEBUTTON_MUTE,
  ID_TOGGLEBUTTON_SOLO, kModuleDisabled = 0, kModuleEnabled = 1, kModuleAsk = 2,
  kModuleFailed = 3, kModuleNew = 4, STATE_Enabled, STATE_Disabled,
  STATE_New, STATE_COUNT, HostID = 10000, PlayID,
  RecordID, ChannelsID, ToolColumn, ActionColumn,
  ButtonsColumn, CommentColumn, UseCustomTrackNameID = 1000, ID_WINDOW_SIZE = 10001,
  ID_WINDOW_TYPE, ID_PADDING_SIZE, ID_SCALE, ID_ALGORITHM,
  ID_MINIMUM, ID_MAXIMUM, ID_GAIN, ID_RANGE,
  ID_FREQUENCY_GAIN, ID_COLOR_SCHEME, ID_SPECTRAL_SELECTION, ID_DEFAULTS,
  ID_DEFAULTS = 10001, ID_SCALE, ID_RANGE, FSCKstatus_CLOSE_REQ = 0x1,
  FSCKstatus_CHANGED = 0x2, FSCKstatus_SAVE_AUP = 0x4, SNAP_OFF, SNAP_NEAREST,
  SNAP_PRIOR, FirstID = 1000, HSBarID, VSBarID,
  NextID, FFT_SinCosBRTable, FFT_SinCosTableVBR16, FFT_SinCosTableBR16,
  FFT_FastMathBR16, FFT_FastMathBR24, IdMainWindowSmall = 19200, IdMainWindowLarge,
  IdDirectory, IdDirChoose, IdOneSec, IdTenSec,
  IdOneMin, IdFiveMin, IdOneHour, IdShortTracks,
  IdMedTracks, IdTallTracks, IdDelayCheckBox, IdCaptureFirst,
  IdCaptureEffects = IdCaptureFirst, IdCaptureScriptables, IdCapturePreferences, IdCaptureToolbars,
  IdAllDelayedEvents, IdCaptureWindowContents =IdAllDelayedEvents, IdCaptureFullWindow, IdCaptureWindowPlus,
  IdCaptureFullScreen, IdCaptureSelectionBar, IdCaptureSpectralSelection, IdCaptureTimer,
  IdCaptureTools, IdCaptureTransport, IdCaptureMixer, IdCaptureMeter,
  IdCapturePlayMeter, IdCaptureRecordMeter, IdCaptureEdit, IdCaptureDevice,
  IdCaptureTranscription, IdCaptureScrub, IdCaptureTrackPanel, IdCaptureRuler,
  IdCaptureTracks, IdCaptureFirstTrack, IdCaptureSecondTrack, IdCaptureLast = IdCaptureSecondTrack,
  IdLastDelayedEvent, IdToggleBackgroundBlue, IdToggleBackgroundWhite, eOkButton = 0x0001,
  eCancelButton = 0x0002, eYesButton = 0x0004, eNoButton = 0x0008, eHelpButton = 0x0010,
  ePreviewButton = 0x0020, eDebugButton = 0x0040, eSettingsButton = 0x0080, ePreviewDryButton = 0x0100,
  eApplyButton = 0x0200, eCloseButton = 0x0400, DontShowID =1000, ID_DATEPICKER_START = 10000,
  ID_TIMETEXT_START, ID_DATEPICKER_END, ID_TIMETEXT_END, ID_TIMETEXT_DURATION,
  ID_AUTOSAVEPATH_BUTTON, ID_AUTOSAVEPATH_TEXT, ID_AUTOEXPORTPATH_BUTTON, ID_AUTOEXPORTPATH_TEXT,
  ID_AUTOSAVE_CHECKBOX, ID_AUTOEXPORT_CHECKBOX, POST_TIMER_RECORD_STOPPED = -3, POST_TIMER_RECORD_CANCEL_WAIT,
  POST_TIMER_RECORD_CANCEL, POST_TIMER_RECORD_NOTHING = 0, POST_TIMER_RECORD_CLOSE, ETBCutID,
  ETBCopyID, ETBPasteID, ETBTrimID, ETBSilenceID,
  ETBUndoID, ETBRedoID, ETBZoomInID, ETBZoomOutID,
  ETBZoomSelID, ETBZoomFitID, ETBNumButtons, STBScrubID,
  STBSeekID, STBRulerID, STBNumButtons, STBFirstButton = STBScrubID,
  SelectionBarFirstID = 2700, RateID, SnapToID, OnMenuID,
  ChoiceID, StartTimeID, LengthTimeID, CenterTimeID,
  EndTimeID, AudioTimeID, TimeBarFirstID = 2800, AudioPositionID,
  ToolBarFloatMargin = 1, NoDockID = 0, TopDockID, BotDockID,
  DockCount = 2, TTB_PlaySpeed, TTB_PlaySpeedSlider, TTBNumButtons,
  @0::kTimerInterval = 50, kAffordancesAreaHeight = 18, kTopInset = 4, kTopMargin = kTopInset + kBorderThickness,
  kBottomMargin = kShadowThickness + kBorderThickness, kTrackSeparatorThickness = kBottomMargin + kTopMargin, kChannelSeparatorThickness = 1, OnSetFontID = 30000,
  OnCutSelectedTextID = 1, OnCopySelectedTextID, OnPasteSelectedTextID, OnDeleteSelectedLabelID,
  OnEditSelectedLabelID, OnUpOctaveID = 30000, OnDownOctaveID, OnZoomFitVerticalID = 20000,
  OnZoomResetID, OnZoomDiv2ID, OnZoomTimes2ID, OnZoomHalfWaveID,
  OnZoomInVerticalID, OnZoomOutVerticalID, OnZoomMaxID, OnUpOctaveID,
  OnDownOctaveID, reserveDisplays = 100, OnRate8ID = 30000, OnRate11ID,
  OnRate16ID, OnRate22ID, OnRate44ID, OnRate48ID,
  OnRate88ID, OnRate96ID, OnRate176ID, OnRate192ID,
  OnRate352ID, OnRate384ID, OnRateOtherID, On16BitID,
  On24BitID, OnFloatID, OnMultiViewID, OnSetDisplayId,
  lastDisplayId = (OnSetDisplayId + reserveDisplays - 1), OnChannelLeftID, OnChannelRightID, OnChannelMonoID,
  OnMergeStereoID, OnSwapChannelsID, OnSplitStereoID, OnSplitStereoMonoID,
  ChannelMenuID, FirstAttachedItemId, OnZoomFitVerticalID = 20000, OnZoomResetID,
  OnZoomDiv2ID, OnZoomTimes2ID, OnZoomHalfWaveID, OnZoomInVerticalID,
  OnZoomOutVerticalID, OnFirstWaveformScaleID, OnLastWaveformScaleID = OnFirstWaveformScaleID + 9, OnFirstSpectrumScaleID,
  OnLastSpectrumScaleID = OnFirstSpectrumScaleID + 19, OnTimeTrackLinID = 30000, OnTimeTrackLogID, OnTimeTrackLogIntID,
  OnSetTimeTrackRangeID, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10, OnSetNameID = 2000,
  OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID,
  SCRUBBING_PIXEL_TOLERANCE = 10, kOneSecondCountdown = 1000 / ScrubPollInterval_ms, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10,
  ID_TIMER = wxID_HIGHEST + 1, DontShowID = wxID_HIGHEST + 1, kToggleButtonID = 5000, kTimerID,
  OnMeterUpdateID = 6000, OnMonitorID, OnPreferencesID, AV_FRAME_CROP_UNALIGNED = 1 << 0,
  AV_FRAME_CROP_UNALIGNED = 1 << 0, MAX_HFFT = 10, kVerticalPadding = 7, kBorderThickness = 1,
  kShadowThickness = 1, kLeftInset = 4, kRightInset = kLeftInset, kLeftMargin = kLeftInset + kBorderThickness,
  kRightMargin = kRightInset + kShadowThickness + kBorderThickness, kTrackInfoWidth = 100 - kLeftMargin, ID_AUTOLOAD = 20000, ID_AUTOWRAP,
  ID_FONT, ID_SPLITV, ID_SPLITH, ID_TOGGLECODE,
  ID_TOGGLEOUTPUT, ID_SMALLICONS, ID_LARGEICONS, ID_MATCH,
  ID_TOP, ID_UP, ID_PREVIOUS, ID_NEXT,
  ID_GO, ID_STOP, ID_SCRIPT, ID_OUTPUT
}
 

Functions

int ProjectFSCK (DirManager &dm, const bool bForceError, const bool bAutoRecoverMode)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : unsigned
Enumerator
IndicatorSmallWidth 
IndicatorMediumWidth 
IndicatorOffset 
TopMargin 
BottomMargin 
LeftMargin 
RightMargin 
ID_QUIT_AUDACITY 
ID_DISCARD_SELECTED 
ID_RECOVER_SELECTED 
ID_SKIP 
ID_FILE_LIST 
AddButtonID 
RemoveButtonID 
RenameButtonID 
RestoreButtonID 
ImportButtonID 
ExportButtonID 
SaveButtonID 
DefaultsButtonID 
InsertButtonID 
EditButtonID 
DeleteButtonID 
UpButtonID 
DownButtonID 
ApplyToProjectButtonID 
ApplyToFilesButtonID 
RunID 
BSaveID 
ClearID 
StaticTextID 
BlockSizeID 
DataSizeID 
NumEditsID 
RandSeedID 
kCommands 
kMenus 
kPreferences 
kTracks 
kClips 
kEnvelopes 
kLabels 
kBoxes 
nTypes 
kJson 
kLisp 
kBrief 
nFormats 
FileListID 
CopySelectedFilesButtonID 
CopyNamesToClipboardID 
FutureActionChoiceID 
ID_Amp 
ID_Peak 
ID_Clip 
ID_Bass 
ID_Treble 
ID_Gain 
ID_Link 
ID_PercentChange 
ID_Multiplier 
ID_FromVinyl 
ID_ToVinyl 
ID_ToLength 
ID_Thresh 
ID_Width 
ID_Threshold 
ID_NoiseFloor 
ID_Ratio 
ID_Attack 
ID_Decay 
ID_BUTTON_USECURRENTF 
ID_BUTTON_USECURRENTB 
ID_BUTTON_EXPORT 
ID_BUTTON_RESET 
ID_FOREGROUNDSTART_T 
ID_FOREGROUNDEND_T 
ID_BACKGROUNDSTART_T 
ID_BACKGROUNDEND_T 
ID_FOREGROUNDDB_TEXT 
ID_BACKGROUNDDB_TEXT 
ID_RESULTS_TEXT 
ID_RESULTSDB_TEXT 
ID_Sequence 
ID_Amplitude 
ID_Duration 
ID_DutyCycle 
ID_Length 
ID_dBMax 
ID_dBMin 
ID_Clear 
ID_Invert 
ID_Mode 
ID_Draw 
ID_Graphic 
ID_Interp 
ID_Linear 
ID_Grid 
ID_Curve 
ID_Manage 
ID_Delete 
ID_Slider 
ID_Duration 
ID_Toggles 
ID_Sliders 
ID_Texts 
ID_Duration 
ID_Triggers 
ID_Toggles 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_TIMER 
ID_BUTTON_GETPROFILE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_RESIDUE 
ID_GAIN_SLIDER 
ID_GAIN_TEXT 
ID_NEW_SENSITIVITY_SLIDER 
ID_NEW_SENSITIVITY_TEXT 
ID_FREQ_SLIDER 
ID_FREQ_TEXT 
END_OF_BASIC_SLIDERS 
END_OF_SLIDERS 
FIRST_SLIDER 
ID_BUTTON_GETPROFILE 
ID_BUTTON_LEAVENOISE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_KEEPNOISE 
ID_SENSITIVITY_SLIDER 
ID_GAIN_SLIDER 
ID_FREQ_SLIDER 
ID_TIME_SLIDER 
ID_SENSITIVITY_TEXT 
ID_GAIN_TEXT 
ID_FREQ_TEXT 
ID_TIME_TEXT 
ID_Editor 
ID_Load 
ID_Save 
ID_Slider 
ID_Choice 
ID_FILE 
ID_Stages 
ID_DryWet 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Feedback 
ID_OutGain 
ID_RoomSize 
ID_PreDelay 
ID_Reverberance 
ID_HfDamping 
ID_ToneLow 
ID_ToneHigh 
ID_WetGain 
ID_DryGain 
ID_StereoWidth 
ID_WetOnly 
SBSMSOutBlockSize 
ID_FilterPanel 
ID_dBMax 
ID_dBMin 
ID_Type 
ID_SubType 
ID_Order 
ID_Ripple 
ID_Cutoff 
ID_StopbandRipple 
ID_RatePercentChangeStart 
ID_RatePercentChangeEnd 
ID_PitchHalfStepsStart 
ID_PitchHalfStepsEnd 
ID_PitchPercentChangeStart 
ID_PitchPercentChangeEnd 
ID_Program 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_Toggles 
ID_Duration 
ID_Sliders 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Res 
ID_FreqOfs 
ID_OutGain 
ID_MIXERPANEL 
ID_SLIDER_CHANNEL 
QUALITY_2 
PRESET_INSANE 
PRESET_EXTREME 
PRESET_STANDARD 
PRESET_MEDIUM 
FormatID 
OptionsID 
DirID 
CreateID 
ChooseID 
LabelID 
FirstID 
FirstFileNameID 
TrackID 
ByNameAndNumberID 
ByNameID 
ByNumberID 
PrefixID 
OverwriteID 
FirstID 
FreqZoomSliderID 
FreqPanScrollerID 
FreqExportButtonID 
FreqAlgChoiceID 
FreqSizeChoiceID 
FreqFuncChoiceID 
FreqAxisChoiceID 
ReplotButtonID 
GridOnOffID 
ID_AVAIL 
ID_FILESIZE 
ID_TOTAL 
ID_LEVELS 
ID_DISCARD 
ID_DISCARD_CLIPBOARD 
ID_COMPACT 
ChoiceID 
PlayID 
DetectID 
ID_INSERTA 
ID_INSERTB 
ID_REMOVE 
ID_IMPORT 
ID_EXPORT 
LoggerID_Save 
LoggerID_Clear 
LoggerID_Close 
kID_RadioButton_BouncingBall 
kID_RadioButton_Highlight 
ID_BITMAPBUTTON_MUSICAL_INSTRUMENT 
ID_SLIDER_PAN 
ID_SLIDER_GAIN 
ID_TOGGLEBUTTON_MUTE 
ID_TOGGLEBUTTON_SOLO 
kModuleDisabled 
kModuleEnabled 
kModuleAsk 
kModuleFailed 
kModuleNew 
STATE_Enabled 
STATE_Disabled 
STATE_New 
STATE_COUNT 
HostID 
PlayID 
RecordID 
ChannelsID 
ToolColumn 
ActionColumn 
ButtonsColumn 
CommentColumn 
UseCustomTrackNameID 
ID_WINDOW_SIZE 
ID_WINDOW_TYPE 
ID_PADDING_SIZE 
ID_SCALE 
ID_ALGORITHM 
ID_MINIMUM 
ID_MAXIMUM 
ID_GAIN 
ID_RANGE 
ID_FREQUENCY_GAIN 
ID_COLOR_SCHEME 
ID_SPECTRAL_SELECTION 
ID_DEFAULTS 
ID_DEFAULTS 
ID_SCALE 
ID_RANGE 
FSCKstatus_CLOSE_REQ 
FSCKstatus_CHANGED 
FSCKstatus_SAVE_AUP 
SNAP_OFF 
SNAP_NEAREST 
SNAP_PRIOR 
FirstID 
HSBarID 
VSBarID 
NextID 
FFT_SinCosBRTable 
FFT_SinCosTableVBR16 
FFT_SinCosTableBR16 
FFT_FastMathBR16 
FFT_FastMathBR24 
IdMainWindowSmall 
IdMainWindowLarge 
IdDirectory 
IdDirChoose 
IdOneSec 
IdTenSec 
IdOneMin 
IdFiveMin 
IdOneHour 
IdShortTracks 
IdMedTracks 
IdTallTracks 
IdDelayCheckBox 
IdCaptureFirst 
IdCaptureEffects 
IdCaptureScriptables 
IdCapturePreferences 
IdCaptureToolbars 
IdAllDelayedEvents 
IdCaptureWindowContents 
IdCaptureFullWindow 
IdCaptureWindowPlus 
IdCaptureFullScreen 
IdCaptureSelectionBar 
IdCaptureSpectralSelection 
IdCaptureTimer 
IdCaptureTools 
IdCaptureTransport 
IdCaptureMixer 
IdCaptureMeter 
IdCapturePlayMeter 
IdCaptureRecordMeter 
IdCaptureEdit 
IdCaptureDevice 
IdCaptureTranscription 
IdCaptureScrub 
IdCaptureTrackPanel 
IdCaptureRuler 
IdCaptureTracks 
IdCaptureFirstTrack 
IdCaptureSecondTrack 
IdCaptureLast 
IdLastDelayedEvent 
IdToggleBackgroundBlue 
IdToggleBackgroundWhite 
eOkButton 
eCancelButton 
eYesButton 
eNoButton 
eHelpButton 
ePreviewButton 
eDebugButton 
eSettingsButton 
ePreviewDryButton 
eApplyButton 
eCloseButton 
DontShowID 
ID_DATEPICKER_START 
ID_TIMETEXT_START 
ID_DATEPICKER_END 
ID_TIMETEXT_END 
ID_TIMETEXT_DURATION 
ID_AUTOSAVEPATH_BUTTON 
ID_AUTOSAVEPATH_TEXT 
ID_AUTOEXPORTPATH_BUTTON 
ID_AUTOEXPORTPATH_TEXT 
ID_AUTOSAVE_CHECKBOX 
ID_AUTOEXPORT_CHECKBOX 
POST_TIMER_RECORD_STOPPED 
POST_TIMER_RECORD_CANCEL_WAIT 
POST_TIMER_RECORD_CANCEL 
POST_TIMER_RECORD_NOTHING 
POST_TIMER_RECORD_CLOSE 
ETBCutID 
ETBCopyID 
ETBPasteID 
ETBTrimID 
ETBSilenceID 
ETBUndoID 
ETBRedoID 
ETBZoomInID 
ETBZoomOutID 
ETBZoomSelID 
ETBZoomFitID 
ETBNumButtons 
STBScrubID 
STBSeekID 
STBRulerID 
STBNumButtons 
STBFirstButton 
SelectionBarFirstID 
RateID 
SnapToID 
OnMenuID 
ChoiceID 
StartTimeID 
LengthTimeID 
CenterTimeID 
EndTimeID 
AudioTimeID 
TimeBarFirstID 
AudioPositionID 
ToolBarFloatMargin 
NoDockID 
TopDockID 
BotDockID 
DockCount 
TTB_PlaySpeed 
TTB_PlaySpeedSlider 
TTBNumButtons 
kTimerInterval 
kAffordancesAreaHeight 
kTopInset 
kTopMargin 
kBottomMargin 
kTrackSeparatorThickness 
kChannelSeparatorThickness 
OnSetFontID 
OnCutSelectedTextID 
OnCopySelectedTextID 
OnPasteSelectedTextID 
OnDeleteSelectedLabelID 
OnEditSelectedLabelID 
OnUpOctaveID 
OnDownOctaveID 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnZoomMaxID 
OnUpOctaveID 
OnDownOctaveID 
reserveDisplays 
OnRate8ID 
OnRate11ID 
OnRate16ID 
OnRate22ID 
OnRate44ID 
OnRate48ID 
OnRate88ID 
OnRate96ID 
OnRate176ID 
OnRate192ID 
OnRate352ID 
OnRate384ID 
OnRateOtherID 
On16BitID 
On24BitID 
OnFloatID 
OnMultiViewID 
OnSetDisplayId 
lastDisplayId 
OnChannelLeftID 
OnChannelRightID 
OnChannelMonoID 
OnMergeStereoID 
OnSwapChannelsID 
OnSplitStereoID 
OnSplitStereoMonoID 
ChannelMenuID 
FirstAttachedItemId 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnFirstWaveformScaleID 
OnLastWaveformScaleID 
OnFirstSpectrumScaleID 
OnLastSpectrumScaleID 
OnTimeTrackLinID 
OnTimeTrackLogID 
OnTimeTrackLogIntID 
OnSetTimeTrackRangeID 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
OnSetNameID 
OnMoveUpID 
OnMoveDownID 
OnMoveTopID 
OnMoveBottomID 
SCRUBBING_PIXEL_TOLERANCE 
kOneSecondCountdown 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
ID_TIMER 
DontShowID 
kToggleButtonID 
kTimerID 
OnMeterUpdateID 
OnMonitorID 
OnPreferencesID 
AV_FRAME_CROP_UNALIGNED 
AV_FRAME_CROP_UNALIGNED 
MAX_HFFT 
kVerticalPadding 

Width of padding below each channel group

kBorderThickness 
kShadowThickness 
kLeftInset 
kRightInset 
kLeftMargin 
kRightMargin 
kTrackInfoWidth 
ID_AUTOLOAD 
ID_AUTOWRAP 
ID_FONT 
ID_SPLITV 
ID_SPLITH 
ID_TOGGLECODE 
ID_TOGGLEOUTPUT 
ID_SMALLICONS 
ID_LARGEICONS 
ID_MATCH 
ID_TOP 
ID_UP 
ID_PREVIOUS 
ID_NEXT 
ID_GO 
ID_STOP 
ID_SCRIPT 
ID_OUTPUT 

Definition at line 18 of file ProjectFSCK.h.

18  : unsigned {
20  FSCKstatus_CHANGED = 0x2,
21  FSCKstatus_SAVE_AUP = 0x4, // used in combination with FSCKstatus_CHANGED
22 };

Function Documentation

◆ ProjectFSCK()

int ProjectFSCK ( DirManager &  dm,
const bool  bForceError,
const bool  bAutoRecoverMode 
)

Definition at line 33 of file ProjectFSCK.cpp.

35 {
36 #pragma message( "====================================================================")
37 #pragma message( "Don\'t forget to redo ProjectFSCK")
38 #pragma message( "====================================================================")
39  // In earlier versions of this method, enumerations of errors were
40  // all done in sequence, then the user was prompted for each type of error.
41  // The enumerations are now interleaved with prompting, because, for example,
42  // user choosing to replace missing aliased block files with silence
43  // needs to put in SilentBlockFiles and DELETE the corresponding auf files,
44  // so those would then not be cumulated in missingAUFHash.
45  // We still do the FindX methods outside the conditionals,
46  // so the log always shows all found errors.
47 
48  int action; // choice of action for each type of error
49  int nResult = 0;
50 
51  if (bForceError && !bAutoRecoverMode)
52  {
53  // TODO: Replace with more user friendly error message?
54  /* i18n-hint: The audacity project file is XML and has 'tags' in it,
55  rather like html tags <something>some stuff</something>.
56  This error message is about the tags that hold the sequence information.
57  The error message is confusing to users in English, and could just say
58  "Found problems with <sequence> when checking project file." */
59  auto msg = XO("Project check read faulty Sequence tags.");
60  const TranslatableStrings buttons{
61  XO("Close project immediately with no changes"),
62  XO("Continue with repairs noted in log, and check for more errors. This will save the project in its current state, unless you \"Close project immediately\" on further error alerts.")
63  };
64  wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
65  action = ShowMultiDialog(msg,
66  XO("Warning - Problems Reading Sequence Tags"),
67  buttons,"");
68  if (action == 0)
69  nResult = FSCKstatus_CLOSE_REQ;
70  else
72  }
73 #if 0
74  FilePaths filePathArray; // *all* files in the project directory/subdirectories
75  auto dirPath = ( dm.GetDataFilesDir() );
76  DirManager::RecursivelyEnumerateWithProgress(
77  dirPath,
78  filePathArray, // output: all files in project directory tree
79  wxEmptyString, // All dirs
80  wxEmptyString, // All files
81  true, false,
82  dm.NumBlockFiles(), // rough guess of how many BlockFiles will be found/processed, for progress
83  XO("Inspecting project file data"));
84 
85  //
86  // MISSING ALIASED AUDIO FILES
87  //
88  MissingAliasFilesDialog::SetShouldShow(false);
89  BlockHash missingAliasFilesAUFHash; // (.auf) AliasBlockFiles whose aliased files are missing
90  BlockHash missingAliasFilesPathHash; // full paths of missing aliased files
91  dm.FindMissingAliasFiles(missingAliasFilesAUFHash, missingAliasFilesPathHash);
92 
93  if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAliasFilesAUFHash.empty())
94  {
95  // In auto-recover mode, we always create silent blocks, and do not ask user.
96  // This makes sure the project is complete next time we open it.
97  if (bAutoRecoverMode)
98  action = 2;
99  else
100  {
101  auto msg =
102 XO("Project check of \"%s\" folder \
103 \ndetected %lld missing external audio file(s) \
104 \n('aliased files'). There is no way for Audacity \
105 \nto recover these files automatically. \
106 \n\nIf you choose the first or second option below, \
107 \nyou can try to find and restore the missing files \
108 \nto their previous location. \
109 \n\nNote that for the second option, the waveform \
110 \nmay not show silence. \
111 \n\nIf you choose the third option, this will save the \
112 \nproject in its current state, unless you \"Close \
113 \nproject immediately\" on further error alerts.")
114  .Format(
115  dm.GetProjectName(),
116  (long long) missingAliasFilesPathHash.size() );
117  const TranslatableStrings buttons{
118  XO("Close project immediately with no changes"),
119  XO("Treat missing audio as silence (this session only)"),
120  XO("Replace missing audio with silence (permanent immediately)."),
121  };
122  wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
123  action = ShowMultiDialog(msg,
124  XO("Warning - Missing Aliased File(s)"),
125  buttons,
126  "");
127  }
128 
129  if (action == 0)
130  nResult = FSCKstatus_CLOSE_REQ;
131  else
132  {
133  // LL: A progress dialog should probably be used here
134  BlockHash::iterator iter = missingAliasFilesAUFHash.begin();
135  while (iter != missingAliasFilesAUFHash.end())
136  {
137  // This type cast is safe. We checked that it's an alias block file earlier.
138  BlockFilePtr b = iter->second.lock();
139  wxASSERT(b);
140  if (b) {
141  auto ab = static_cast< AliasBlockFile * > ( &*b );
142 
143  if (action == 2)
144  {
145  // silence the blockfiles by yanking the filename
146  // This is done, eventually, in PCMAliasBlockFile::ReadData(),
147  // in the stack of b->Recover().
148  // There, if the mAliasedFileName is bad, it zeroes the data.
149  wxFileNameWrapper dummy;
150  dummy.Clear();
151  ab->ChangeAliasedFileName(std::move(dummy));
152 
153  // If recovery fails for one file, silence it,
154  // and don't try to recover other files but
155  // silence them too. GuardedCall will cause an appropriate
156  // error message for the user.
157  GuardedCall(
158  [&] { ab->Recover(); },
159  [&] (AudacityException*) { action = 1; }
160  );
161 
163  }
164 
165  if (action == 1)
166  // Silence error logging for this block in this session.
167  ab->SilenceAliasLog();
168  }
169  ++iter;
170  }
171  if ((action == 2) && bAutoRecoverMode)
172  wxLogWarning(wxT(" Project check replaced missing aliased file(s) with silence."));
173  }
174  }
175 
176  //
177  // MISSING ALIAS (.AUF) AliasBlockFiles
178  //
179  // Alias summary regeneration must happen after checking missing aliased files.
180  //
181  BlockHash missingAUFHash; // missing (.auf) AliasBlockFiles
182  dm.FindMissingAUFs(missingAUFHash);
183  if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAUFHash.empty())
184  {
185  // In auto-recover mode, we just recreate the alias files, and do not ask user.
186  // This makes sure the project is complete next time we open it.
187  if (bAutoRecoverMode)
188  action = 0;
189  else
190  {
191  auto msg =
192 XO("Project check of \"%s\" folder \
193 \ndetected %lld missing alias (.auf) blockfile(s). \
194 \nAudacity can fully regenerate these files \
195 \nfrom the current audio in the project.")
196  .Format(
197  dm.GetProjectName(), (long long) missingAUFHash.size() );
198  const TranslatableStrings buttons{
199  XO("Regenerate alias summary files (safe and recommended)"),
200  XO("Fill in silence for missing display data (this session only)"),
201  XO("Close project immediately with no further changes"),
202  };
203  wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
204  action = ShowMultiDialog(msg,
205  XO("Warning - Missing Alias Summary File(s)"),
206  buttons,
207  "");
208  }
209 
210  if (action == 2)
211  nResult = FSCKstatus_CLOSE_REQ;
212  else
213  {
214  // LL: A progress dialog should probably be used here
215  BlockHash::iterator iter = missingAUFHash.begin();
216  while (iter != missingAUFHash.end())
217  {
218  BlockFilePtr b = iter->second.lock();
219  wxASSERT(b);
220  if (b) {
221  if(action==0) {
222  //regenerate from data
223  // If recovery fails for one file, silence it,
224  // and don't try to recover other files but
225  // silence them too. GuardedCall will cause an appropriate
226  // error message for the user.
227  GuardedCall(
228  [&] {
229  b->Recover();
230  nResult |= FSCKstatus_CHANGED;
231  },
232  [&] (AudacityException*) { action = 1; }
233  );
234  }
235 
236  if (action==1){
237  // Silence error logging for this block in this session.
238  b->SilenceLog();
239  }
240  }
241  ++iter;
242  }
243  if ((action == 0) && bAutoRecoverMode)
244  wxLogWarning(wxT(" Project check regenerated missing alias summary file(s)."));
245  }
246  }
247 
248  //
249  // MISSING (.AU) SimpleBlockFiles
250  //
251  BlockHash missingAUHash; // missing data (.au) blockfiles
252  dm.FindMissingAUs(missingAUHash);
253  if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAUHash.empty())
254  {
255  // In auto-recover mode, we just always create silent blocks.
256  // This makes sure the project is complete next time we open it.
257  if (bAutoRecoverMode)
258  action = 2;
259  else
260  {
261  auto msg =
262 XO("Project check of \"%s\" folder \
263 \ndetected %lld missing audio data (.au) blockfile(s), \
264 \nprobably due to a bug, system crash, or accidental \
265 \ndeletion. There is no way for Audacity to recover \
266 \nthese missing files automatically. \
267 \n\nIf you choose the first or second option below, \
268 \nyou can try to find and restore the missing files \
269 \nto their previous location. \
270 \n\nNote that for the second option, the waveform \
271 \nmay not show silence.")
272  .Format(
273  dm.GetProjectName(), (long long) missingAUHash.size() );
274  const TranslatableStrings buttons{
275  XO("Close project immediately with no further changes"),
276  XO("Treat missing audio as silence (this session only)"),
277  XO("Replace missing audio with silence (permanent immediately)"),
278  };
279  wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
280  action = ShowMultiDialog(msg,
281  XO("Warning - Missing Audio Data Block File(s)"),
282  buttons,
283  "Warning_-_Missing_Audio_Data_Block_Files");
284  }
285 
286  if (action == 0)
287  nResult = FSCKstatus_CLOSE_REQ;
288  else
289  {
290  // LL: A progress dialog should probably be used here
291  BlockHash::iterator iter = missingAUHash.begin();
292  while (iter != missingAUHash.end())
293  {
294  BlockFilePtr b = iter->second.lock();
295  wxASSERT(b);
296  if (b) {
297  if (action == 2)
298  {
299  //regenerate from data
300  // If recovery fails for one file, silence it,
301  // and don't try to recover other files but
302  // silence them too. GuardedCall will cause an appropriate
303  // error message for the user.
304  GuardedCall(
305  [&] {
306  //regenerate with zeroes
307  b->Recover();
308  nResult |= FSCKstatus_CHANGED;
309  },
310  [&] (AudacityException*) { action = 1; }
311  );
312  }
313 
314  if (action == 1)
315  b->SilenceLog();
316  }
317  ++iter;
318  }
319  if ((action == 2) && bAutoRecoverMode)
320  wxLogWarning(wxT(" Project check replaced missing audio data block file(s) with silence."));
321  }
322  }
323 
324  //
325  // ORPHAN BLOCKFILES (.au and .auf files that are not in the project.)
326  //
327  FilePaths orphanFilePathArray; // orphan .au and .auf files
328  dm.FindOrphanBlockFiles(filePathArray, orphanFilePathArray);
329 
330  if ((nResult != FSCKstatus_CLOSE_REQ) && !orphanFilePathArray.empty())
331  {
332  // In auto-recover mode, leave orphan blockfiles alone.
333  // They will be deleted when project is saved the first time.
334  if (bAutoRecoverMode)
335  {
336  wxLogWarning(wxT(" Project check ignored orphan block file(s). They will be deleted when project is saved."));
337  action = 1;
338  }
339  else
340  {
341  auto msg =
342 XO("Project check of \"%s\" folder \
343 \nfound %d orphan block file(s). These files are \
344 \nunused by this project, but might belong to \
345 other projects. \
346 \nThey are doing no harm and are small.")
347  .Format( dm.GetProjectName(), (int)orphanFilePathArray.size() );
348 
349  const TranslatableStrings buttons{
350  XO("Continue without deleting; ignore the extra files this session"),
351  XO("Close project immediately with no further changes"),
352  XO("Delete orphan files (permanent immediately)"),
353  };
354  wxLog::FlushActive(); // MultiDialog has "Show Log..." button, so make sure log is current.
355  action = ShowMultiDialog(msg,
356  XO("Warning - Orphan Block File(s)"),
357  buttons,
358  "Warning_-_Orphan_Block_Files"
359  );
360  }
361 
362  if (action == 1)
363  nResult = FSCKstatus_CLOSE_REQ;
364  // Nothing is done if (action == 0).
365  else if (action == 2)
366  {
367  // FSCKstatus_CHANGED was bogus here.
368  // The files are deleted, so "Undo Project Repair" could not do anything.
369  // Plus they affect none of the valid tracks, so incorrect to mark them changed,
370  // and no need for refresh.
371  // nResult |= FSCKstatus_CHANGED;
372  for ( const auto &orphan : orphanFilePathArray )
373  wxRemoveFile(orphan);
374  }
375  }
376 
377  if (nResult != FSCKstatus_CLOSE_REQ)
378  {
379  // Remove any empty directories.
380  ProgressDialog pProgress(
381  XO("Progress"),
382  XO("Cleaning up unused directories in project data"));
383  // nDirCount is for updating pProgress. +1 because we may DELETE dirPath.
384  int nDirCount = DirManager::RecursivelyCountSubdirs(dirPath) + 1;
385  DirManager::RecursivelyRemoveEmptyDirs(dirPath, nDirCount, &pProgress);
386  }
387 
388  // Summarize and flush the log.
389  if (bForceError ||
390  !missingAliasFilesAUFHash.empty() ||
391  !missingAUFHash.empty() ||
392  !missingAUHash.empty() ||
393  !orphanFilePathArray.empty())
394  {
395  wxLogWarning(wxT("Project check found file inconsistencies inspecting the loaded project data."));
396  wxLog::FlushActive(); // Flush is modal and will clear the log (both desired).
397 
398  // In auto-recover mode, we didn't do any ShowMultiDialog calls above, so put up an alert.
399  if (bAutoRecoverMode)
401  XO(
402 "Project check found file inconsistencies during automatic recovery.\n\nSelect 'Help > Diagnostics > Show Log...' to see details."),
403  XO("Warning: Problems in Automatic Recovery"),
404  wxOK | wxICON_EXCLAMATION);
405  }
406 
407  MissingAliasFilesDialog::SetShouldShow(true);
408 #endif
409  return nResult;
410 }

References AudacityMessageBox(), FSCKstatus_CHANGED, FSCKstatus_CLOSE_REQ, FSCKstatus_SAVE_AUP, GuardedCall(), ShowMultiDialog(), and XO.

Here is the call graph for this function:
GuardedCall
R GuardedCall(const F1 &body, const F2 &handler=F2::Default(), std::function< void(AudacityException *)> delayedHandler=DefaultDelayedHandlerAction{})
Execute some code on any thread; catch any AudacityException; enqueue error report on the main thread...
Definition: AudacityException.h:202
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
Definition: AudacityMessageBox.cpp:17
wxFileNameWrapper
Definition: wxFileNameWrapper.h:21
TranslatableStrings
std::vector< TranslatableString > TranslatableStrings
Definition: TranslatableString.h:295
XO
#define XO(s)
Definition: Internat.h:31
wxArrayStringEx
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
Definition: wxArrayStringEx.h:18
AudacityException
Base class for exceptions specially processed by the application.
Definition: AudacityException.h:33
ProgressDialog
ProgressDialog Class.
Definition: ProgressDialog.h:51
FSCKstatus_SAVE_AUP
@ FSCKstatus_SAVE_AUP
Definition: ProjectFSCK.h:21
FSCKstatus_CLOSE_REQ
@ FSCKstatus_CLOSE_REQ
Definition: ProjectFSCK.h:19
ShowMultiDialog
int ShowMultiDialog(const TranslatableString &message, const TranslatableString &title, const TranslatableStrings &buttons, const wxString &helpPage, const TranslatableString &boxMsg, bool log)
Definition: MultiDialog.cpp:180
FSCKstatus_CHANGED
@ FSCKstatus_CHANGED
Definition: ProjectFSCK.h:20