1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-20 14:20:06 +02:00
Remove crash-prone "Audio Cache" feature.
This commit is contained in:
v.audacity 2012-07-18 01:18:59 +00:00
parent 67b9e6bc2d
commit a42f5b45cb
4 changed files with 12 additions and 3 deletions

View File

@ -1812,6 +1812,8 @@ void DirManager::RemoveOrphanBlockfiles()
void DirManager::FillBlockfilesCache() void DirManager::FillBlockfilesCache()
{ {
#ifdef DEPRECATED_AUDIO_CACHE
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=545.
bool cacheBlockFiles = false; bool cacheBlockFiles = false;
gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles); gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles);
@ -1856,6 +1858,7 @@ void DirManager::FillBlockfilesCache()
iter++; iter++;
current++; current++;
} }
#endif // DEPRECATED_AUDIO_CACHE
} }
void DirManager::WriteCacheToDisk() void DirManager::WriteCacheToDisk()

View File

@ -4575,7 +4575,10 @@ void AudacityProject::OnAudioIONewBlockFiles(const wxString& blockFileLog)
bool AudacityProject::GetCacheBlockFiles() bool AudacityProject::GetCacheBlockFiles()
{ {
bool cacheBlockFiles = false; bool cacheBlockFiles = false;
#ifdef DEPRECATED_AUDIO_CACHE
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=545.
gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles); gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles);
#endif
return cacheBlockFiles; return cacheBlockFiles;
} }

View File

@ -596,6 +596,8 @@ bool SimpleBlockFile::GetNeedWriteCacheToDisk()
bool SimpleBlockFile::GetCache() bool SimpleBlockFile::GetCache()
{ {
#ifdef DEPRECATED_AUDIO_CACHE
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=545.
bool cacheBlockFiles = false; bool cacheBlockFiles = false;
gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles); gPrefs->Read(wxT("/Directories/CacheBlockFiles"), &cacheBlockFiles);
if (!cacheBlockFiles) if (!cacheBlockFiles)
@ -607,6 +609,9 @@ bool SimpleBlockFile::GetCache()
} }
lowMem <<= 20; lowMem <<= 20;
return (GetFreeMemory() > lowMem); return (GetFreeMemory() > lowMem);
#else
return false;
#endif
} }
// Indentation settings for Vim and Emacs and unique identifier for Arch, a // Indentation settings for Vim and Emacs and unique identifier for Arch, a

View File

@ -101,9 +101,7 @@ void DirectoriesPrefs::PopulateOrExchange(ShuttleGui & S)
S.EndStatic(); S.EndStatic();
#ifdef DEPRECATED_AUDIO_CACHE #ifdef DEPRECATED_AUDIO_CACHE
//vvvvv If confirmed deprecated by version 2.0.2 release, remove this code and the code it affects, // See http://bugzilla.audacityteam.org/show_bug.cgi?id=545.
// i.e., anyplace that uses "/Directories/CacheBlockFiles" or "/Directories/CacheLowMem".
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=545
S.StartStatic(_("Audio cache")); S.StartStatic(_("Audio cache"));
{ {
S.TieCheckBox(_("Play and/or record using &RAM (useful for slow drives)"), S.TieCheckBox(_("Play and/or record using &RAM (useful for slow drives)"),