1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-30 07:29:29 +02:00

minor changes on brief code review

This commit is contained in:
v.audacity 2010-07-06 21:39:08 +00:00
parent 0c3fbd91ac
commit 7501b9a865
4 changed files with 26 additions and 13 deletions

View File

@ -1,8 +1,10 @@
/**********************************************************************
Audacity: A Digital Audio Editor
Audacity: A Digital Audio Editor
Audacity(R) is copyright (c) 1999-2010 Audacity Team.
License: GPL v2. See License.txt.
AutoRecovery.cpp
AutoRecovery.cpp
*******************************************************************//**
@ -143,7 +145,7 @@ static bool HaveFilesToRecover()
wxDir dir(FileNames::AutoSaveDir());
if (!dir.IsOpened())
{
wxMessageBox(_("Could not enumerate files in auto save directory"),
wxMessageBox(_("Could not enumerate files in auto save directory."),
_("Error"), wxICON_STOP);
return false;
}
@ -180,7 +182,7 @@ static bool RecoverAllProjects(AudacityProject** pproj)
wxDir dir(FileNames::AutoSaveDir());
if (!dir.IsOpened())
{
wxMessageBox(_("Could not enumerate files in auto save directory"),
wxMessageBox(_("Could not enumerate files in auto save directory."),
_("Error"), wxICON_STOP);
return false;
}

View File

@ -1,3 +1,13 @@
/**********************************************************************
Audacity: A Digital Audio Editor
Audacity(R) is copyright (c) 1999-2010 Audacity Team.
License: GPL v2. See License.txt.
AutoRecovery.h
*******************************************************************/
#ifndef __AUDACITY_AUTORECOVERY__
#define __AUDACITY_AUTORECOVERY__

View File

@ -1430,7 +1430,7 @@ int DirManager::ProjectFSCK(bool forceerror, bool silentlycorrect, bool bIgnoreN
if(!orphanList.IsEmpty() && !silentlycorrect){
wxString promptA =
_("Project check found %d orphaned blockfile[s]. These files are\nunused and probably left over from a crash or some other bug.\nThey should be deleted to avoid disk contention.");
_("Project check found %d orphaned blockfile(s). These files are\nunused and probably left over from a crash or some other bug.\nThey should be deleted to avoid disk contention.");
wxString prompt;
prompt.Printf(promptA,(int)orphanList.GetCount());
@ -1465,7 +1465,7 @@ int DirManager::ProjectFSCK(bool forceerror, bool silentlycorrect, bool bIgnoreN
} else
{
wxString promptA =
_("Project check detected %d input file[s] being used in place\n('alias files') are now missing. There is no way for Audacity\nto recover these files automatically; you may choose to\npermanently fill in silence for the missing files, temporarily\nfill in silence for this session only, or close the project now\nand try to restore the missing files by hand.");
_("Project check detected %d input file(s) being used in place\n('alias files') are now missing. There is no way for Audacity\nto recover these files automatically; you may choose to\npermanently fill in silence for the missing files, temporarily\nfill in silence for this session only, or close the project now\nand try to restore the missing files by hand.");
wxString prompt;
prompt.Printf(promptA,missingAliasFiles.size());
@ -1511,7 +1511,7 @@ int DirManager::ProjectFSCK(bool forceerror, bool silentlycorrect, bool bIgnoreN
} else
{
wxString promptA =
_("Project check detected %d missing summary file[s] (.auf).\nAudacity can fully regenerate these summary files from the\noriginal audio data in the project.");
_("Project check detected %d missing summary file(s) (.auf).\nAudacity can fully regenerate these summary files from the\noriginal audio data in the project.");
wxString prompt;
prompt.Printf(promptA,missingSummaryList.size());
@ -1553,7 +1553,7 @@ int DirManager::ProjectFSCK(bool forceerror, bool silentlycorrect, bool bIgnoreN
} else
{
wxString promptA =
_("Project check detected %d missing audio data blockfile[s] (.au), \nprobably due to a bug, system crash or accidental deletion.\nThere is no way for Audacity to recover this lost data\nautomatically; you may choose to permanently fill in silence\nfor the missing data, temporarily fill in silence for this\nsession only, or close the project now and try to restore the\nmissing data by hand.");
_("Project check detected %d missing audio data blockfile(s) (.au), \nprobably due to a bug, system crash or accidental deletion.\nThere is no way for Audacity to recover this lost data\nautomatically; you may choose to permanently fill in silence\nfor the missing data, temporarily fill in silence for this\nsession only, or close the project now and try to restore the\nmissing data by hand.");
wxString prompt;
prompt.Printf(promptA,missingDataList.size());

View File

@ -32,12 +32,12 @@ default is to disable caching.
* Read-caching: If caching is enabled, all block files will always be
read-cached. Block files on disk will be read as soon as they are created
and hold in memory. New block files will be written to disk, but hold in
and held in memory. New block files will be written to disk, but held in
memory, so they are never read from disk in the current session.
* Write-caching: If caching is enabled and the parameter allowDeferredWrite
is enabled at the block file constructor, new block files are hold in memory
and only written to disk when WriteCacheToDisk() is called. This is used
is enabled at the block file constructor, new block files are held in memory
and written to disk only when WriteCacheToDisk() is called. This is used
during recording to prevent disk access. After recording, WriteCacheToDisk()
will be called on all block files and they will be written to disk. During
normal editing, no write cache is active, that is, any block files will be
@ -592,14 +592,15 @@ bool SimpleBlockFile::GetCache()
{
bool cacheBlockFiles = false;
gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles);
if (!cacheBlockFiles)
return false;
int lowMem = gPrefs->Read(wxT("/Directories/CacheLowMem"), 16l);
if (lowMem < 16) {
lowMem = 16;
}
lowMem <<= 20;
return cacheBlockFiles && (GetFreeMemory() > lowMem);
return (GetFreeMemory() > lowMem);
}
// Indentation settings for Vim and Emacs and unique identifier for Arch, a