mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 09:39:42 +02:00
Comments about CloseLock() functions
This commit is contained in:
parent
cfaf3564a2
commit
f7780adbf5
@ -122,7 +122,8 @@ class PROFILE_DLL_API BlockFile /* not final, abstract */ {
|
||||
void SilenceLog() const { mSilentLog = TRUE; }
|
||||
|
||||
///when the project closes, it locks the blockfiles.
|
||||
///Override this in case it needs special treatment
|
||||
///Override this in case it needs special treatment.
|
||||
// not balanced by unlocking calls.
|
||||
virtual void CloseLock(){Lock();}
|
||||
|
||||
/// Prevents a read on other threads. The basic blockfile runs on only one thread, so does nothing.
|
||||
|
@ -149,9 +149,11 @@ class PROFILE_DLL_API Sequence final : public XMLTagHandler{
|
||||
//
|
||||
|
||||
bool Lock();
|
||||
bool CloseLock();//similar to Lock but should be called upon project close.
|
||||
bool Unlock();
|
||||
|
||||
bool CloseLock();//similar to Lock but should be called upon project close.
|
||||
// not balanced by unlocking calls.
|
||||
|
||||
//
|
||||
// Manipulating Sample Format
|
||||
//
|
||||
|
@ -343,10 +343,12 @@ public:
|
||||
|
||||
/// Lock all blockfiles
|
||||
void Lock();
|
||||
void CloseLock(); //similar to Lock but should be called when the project closes.
|
||||
/// Unlock all blockfiles
|
||||
void Unlock();
|
||||
|
||||
void CloseLock(); //similar to Lock but should be called when the project closes.
|
||||
// not balanced by unlocking calls.
|
||||
|
||||
///Delete the wave cache - force redraw. Thread-safe
|
||||
void DeleteWaveCache();
|
||||
|
||||
|
@ -286,9 +286,11 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
|
||||
//
|
||||
|
||||
bool Lock();
|
||||
bool CloseLock(); //similar to Lock but should be called when the project closes.
|
||||
bool Unlock();
|
||||
|
||||
bool CloseLock(); //similar to Lock but should be called when the project closes.
|
||||
// not balanced by unlocking calls.
|
||||
|
||||
/** @brief Convert correctly between an (absolute) time in seconds and a number of samples.
|
||||
*
|
||||
* This method will not give the correct results if used on a relative time (difference of two
|
||||
|
@ -129,7 +129,8 @@ void ODPCMAliasBlockFile::Lock()
|
||||
PCMAliasBlockFile::Lock();
|
||||
}
|
||||
|
||||
//when the file closes, it locks the blockfiles, but it calls this so we can check if it has been saved before.
|
||||
//when the file closes, it locks the blockfiles, but only conditionally.
|
||||
// It calls this so we can check if it has been saved before.
|
||||
void ODPCMAliasBlockFile::CloseLock()
|
||||
{
|
||||
if(mHasBeenSaved)
|
||||
|
@ -127,7 +127,9 @@ class ODPCMAliasBlockFile final : public PCMAliasBlockFile
|
||||
void SetFileName(wxFileName &name) override;
|
||||
wxFileName GetFileName() const override;
|
||||
|
||||
//when the file closes, it locks the blockfiles, but it calls this so we can check if it has been saved before.
|
||||
//when the file closes, it locks the blockfiles, but only conditionally.
|
||||
// It calls this so we can check if it has been saved before.
|
||||
// not balanced by unlocking calls.
|
||||
void CloseLock() override;
|
||||
|
||||
/// Prevents a read on other threads.
|
||||
|
Loading…
x
Reference in New Issue
Block a user