mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
code cleanup
naming improvements for clarity (e.g., aliasedFileName instead of aliasedFile for an instance of wxFileName -- it's not an instance of AliasedFile)
This commit is contained in:
parent
2f139f524d
commit
ddec06f8a2
@ -19,14 +19,14 @@
|
||||
#include "../Internat.h"
|
||||
|
||||
LegacyAliasBlockFile::LegacyAliasBlockFile(wxFileName fileName,
|
||||
wxFileName aliasedFile,
|
||||
wxFileName aliasedFileName,
|
||||
sampleCount aliasStart,
|
||||
sampleCount aliasLen,
|
||||
int aliasChannel,
|
||||
sampleCount summaryLen,
|
||||
bool noRMS):
|
||||
PCMAliasBlockFile(fileName, aliasedFile, aliasStart, aliasLen,
|
||||
aliasChannel, 0.0, 0.0, 0.0)
|
||||
bool noRMS)
|
||||
: PCMAliasBlockFile(fileName, aliasedFileName, aliasStart, aliasLen,
|
||||
aliasChannel, 0.0, 0.0, 0.0)
|
||||
{
|
||||
sampleFormat format;
|
||||
|
||||
|
@ -23,7 +23,7 @@ class LegacyAliasBlockFile : public PCMAliasBlockFile
|
||||
|
||||
/// Constructs a LegacyAliasBlockFile, writing the summary to disk
|
||||
LegacyAliasBlockFile(wxFileName fileName,
|
||||
wxFileName aliasedFile,
|
||||
wxFileName aliasedFileName,
|
||||
sampleCount aliasStart,
|
||||
sampleCount aliasLen,
|
||||
int aliasChannel,
|
||||
|
@ -42,21 +42,27 @@ const int aheaderTagLen = 20;
|
||||
char aheaderTag[aheaderTagLen + 1] = "AudacityBlockFile112";
|
||||
|
||||
|
||||
ODPCMAliasBlockFile::ODPCMAliasBlockFile(wxFileName fileName,
|
||||
wxFileName aliasedFile, sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel):
|
||||
PCMAliasBlockFile(fileName, aliasedFile, aliasStart, aliasLen, aliasChannel,false)
|
||||
ODPCMAliasBlockFile::ODPCMAliasBlockFile(
|
||||
wxFileName fileName,
|
||||
wxFileName aliasedFileName,
|
||||
sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel)
|
||||
: PCMAliasBlockFile(fileName, aliasedFileName,
|
||||
aliasStart, aliasLen, aliasChannel,false)
|
||||
{
|
||||
mSummaryAvailable = mSummaryBeingComputed = mHasBeenSaved = false;
|
||||
}
|
||||
|
||||
///summaryAvailable should be true if the file has been written already.
|
||||
ODPCMAliasBlockFile::ODPCMAliasBlockFile(wxFileName existingFileName,
|
||||
wxFileName aliasedFile, sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel,
|
||||
float min, float max, float rms, bool summaryAvailable):
|
||||
PCMAliasBlockFile(existingFileName, aliasedFile, aliasStart, aliasLen,
|
||||
aliasChannel, min, max, rms)
|
||||
ODPCMAliasBlockFile::ODPCMAliasBlockFile(
|
||||
wxFileName existingSummaryFileName,
|
||||
wxFileName aliasedFileName,
|
||||
sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel,
|
||||
float min, float max, float rms, bool summaryAvailable)
|
||||
: PCMAliasBlockFile(existingSummaryFileName, aliasedFileName,
|
||||
aliasStart, aliasLen,
|
||||
aliasChannel, min, max, rms)
|
||||
{
|
||||
mSummaryAvailable=summaryAvailable;
|
||||
mSummaryBeingComputed=mHasBeenSaved=false;
|
||||
|
@ -46,17 +46,14 @@ Some of these methods have been overridden only because they used the unsafe wxL
|
||||
class ODPCMAliasBlockFile : public PCMAliasBlockFile
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructor / Destructor
|
||||
|
||||
/// Constructs a PCMAliasBlockFile, writing the summary to disk
|
||||
ODPCMAliasBlockFile(wxFileName baseFileName,
|
||||
wxFileName aliasedFile, sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel);
|
||||
ODPCMAliasBlockFile(wxFileName existingFileName,
|
||||
wxFileName aliasedFile, sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel,
|
||||
float min, float max, float rms, bool summaryAvailable);
|
||||
wxFileName aliasedFileName, sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel);
|
||||
ODPCMAliasBlockFile(wxFileName existingSummaryFileName,
|
||||
wxFileName aliasedFileName, sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel,
|
||||
float min, float max, float rms, bool summaryAvailable);
|
||||
virtual ~ODPCMAliasBlockFile();
|
||||
|
||||
//checks to see if summary data has been computed and written to disk yet. Thread safe. Blocks if we are writing summary data.
|
||||
|
@ -18,29 +18,28 @@
|
||||
class PCMAliasBlockFile : public AliasBlockFile
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructor / Destructor
|
||||
|
||||
/// Constructs a PCMAliasBlockFile, writing the summary to disk
|
||||
PCMAliasBlockFile(wxFileName baseFileName,
|
||||
wxFileName aliasedFile, sampleCount aliasStart,
|
||||
wxFileName aliasedFileName,
|
||||
sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel);
|
||||
///Constructs a PCMAliasBlockFile with the option of not writing to disk
|
||||
PCMAliasBlockFile(wxFileName fileName,
|
||||
wxFileName aliasedFile, sampleCount aliasStart,
|
||||
wxFileName aliasedFileName,
|
||||
sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel,bool writeSummary);
|
||||
|
||||
PCMAliasBlockFile(wxFileName existingFileName,
|
||||
wxFileName aliasedFile, sampleCount aliasStart,
|
||||
PCMAliasBlockFile(wxFileName existingSummaryFileName,
|
||||
wxFileName aliasedFileName,
|
||||
sampleCount aliasStart,
|
||||
sampleCount aliasLen, int aliasChannel,
|
||||
float min, float max, float rms);
|
||||
virtual ~PCMAliasBlockFile();
|
||||
|
||||
// Reading
|
||||
|
||||
/// Reads the specified data from the aliased file using libsndfile
|
||||
virtual int ReadData(samplePtr data, sampleFormat format,
|
||||
sampleCount start, sampleCount len);
|
||||
|
||||
virtual void SaveXML(XMLWriter &xmlFile);
|
||||
virtual BlockFile *Copy(wxFileName fileName);
|
||||
virtual void Recover();
|
||||
@ -50,15 +49,3 @@ class PCMAliasBlockFile : public AliasBlockFile
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
// version control system. Please do not modify past this point.
|
||||
//
|
||||
// Local Variables:
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
//
|
||||
// vim: et sts=3 sw=3
|
||||
// arch-tag: a61d1bbb-662b-4abe-8995-149df0bd24f4
|
||||
|
||||
|
@ -85,15 +85,3 @@ wxLongLong SilentBlockFile::GetSpaceUsage()
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
// version control system. Please do not modify past this point.
|
||||
//
|
||||
// Local Variables:
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
//
|
||||
// vim: et sts=3 sw=3
|
||||
// arch-tag: d7d174aa-19f1-4bc8-8bd9-c075dcd1cc1b
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
/**********************************************************************
|
||||
|
||||
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.
|
||||
|
||||
SilentBlockFile.h
|
||||
SilentBlockFile.h
|
||||
|
||||
Dominic Mazzoni
|
||||
Dominic Mazzoni
|
||||
Vaughan Johnson
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
@ -47,15 +50,3 @@ class SilentBlockFile : public BlockFile {
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
// version control system. Please do not modify past this point.
|
||||
//
|
||||
// Local Variables:
|
||||
// c-basic-offset: 3
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
//
|
||||
// vim: et sts=3 sw=3
|
||||
// arch-tag: 2d820790-7fce-4a08-80ae-1858f0957c11
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user