mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 14:18:53 +02:00
fix some comments
This commit is contained in:
parent
6665370f61
commit
3e51fd5078
@ -1200,6 +1200,13 @@ bool AudacityApp::OnInit()
|
||||
// JKC: ANSWER-ME: Who actually added the event loop guarantor?
|
||||
// Although 'blame' says Leland, I think it came from a donated patch.
|
||||
|
||||
// PRL: It was added by LL at 54676a72285ba7ee3a69920e91fa390a71ef10c9 :
|
||||
// " Ensure OnInit() has an event loop
|
||||
// And allow events to flow so the splash window updates under GTK"
|
||||
// then mistakenly lost in the merge at
|
||||
// 37168ebbf67ae869ab71a3b5cbbf1d2a48e824aa
|
||||
// then restored at 7687972aa4b2199f0717165235f3ef68ade71e08
|
||||
|
||||
// Ensure we have an event loop during initialization
|
||||
wxEventLoopGuarantor eventLoop;
|
||||
|
||||
|
@ -156,8 +156,8 @@ bool ODDecodeBlockFile::Read64K(float *buffer, size_t start, size_t len)
|
||||
}
|
||||
|
||||
/// If the summary has been computed,
|
||||
/// Construct a NEW PCMAliasBlockFile based on this one.
|
||||
/// otherwise construct an ODPCMAliasBlockFile that still needs to be computed.
|
||||
/// Construct a NEW SimpleBlockFile based on this one.
|
||||
/// otherwise construct an ODDecodeBlockFile that still needs to be computed.
|
||||
/// @param newFileName The filename to copy the summary data to.
|
||||
BlockFilePtr ODDecodeBlockFile::Copy(wxFileNameWrapper &&newFileName)
|
||||
{
|
||||
@ -219,8 +219,8 @@ void ODDecodeBlockFile::SaveXML(XMLWriter &xmlFile)
|
||||
UnlockRead();
|
||||
}
|
||||
|
||||
/// Constructs a ODPCMAliasBlockFile from the xml output of WriteXML.
|
||||
/// Also schedules the ODPCMAliasBlockFile for OD loading.
|
||||
/// Constructs a ODDecodeBlockFile from the xml output of WriteXML.
|
||||
/// Also schedules the ODDecodeBlockFile for OD loading.
|
||||
// BuildFromXML methods should always return a BlockFile, not NULL,
|
||||
// even if the result is flawed (e.g., refers to nonexistent file),
|
||||
// as testing will be done in DirManager::ProjectFSCK().
|
||||
|
@ -14,7 +14,7 @@
|
||||
\brief ODDecodeBlockFile is a special type of SimpleBlockFile that does not necessarily have summary OR audio data available
|
||||
The summary and audio is eventually computed and written to a file in a background thread.
|
||||
|
||||
Load On-Demand implementation of the SimpleBlockFIle for audio files that need to be decoded (mp3,flac,etc..).
|
||||
Load On-Demand implementation of the SimpleBlockFile for audio files that need to be decoded (mp3,flac,etc..).
|
||||
|
||||
Also, see ODPCMAliasBlockFile for a similar file.
|
||||
*//*******************************************************************/
|
||||
@ -76,19 +76,18 @@ class ODDecodeBlockFile final : public SimpleBlockFile
|
||||
|
||||
|
||||
|
||||
///Makes NEW ODPCMAliasBlockFile or PCMAliasBlockFile depending on summary availability
|
||||
///Makes NEW ODDecodeBlockFile or SimpleBlockFile depending on summary availability
|
||||
BlockFilePtr Copy(wxFileNameWrapper &&fileName) override;
|
||||
|
||||
///Saves as xml ODPCMAliasBlockFile or PCMAliasBlockFile depending on summary availability
|
||||
///Saves as xml ODDecodeBlockFile or SimpleBlockFile depending on summary availability
|
||||
void SaveXML(XMLWriter &xmlFile) override;
|
||||
|
||||
///Reconstructs from XML a ODPCMAliasBlockFile and reschedules it for OD loading
|
||||
///Reconstructs from XML a ODDecodeBlockFile and reschedules it for OD loading
|
||||
static BlockFilePtr BuildFromXML(DirManager &dm, const wxChar **attrs);
|
||||
|
||||
///Writes the summary file if summary data is available
|
||||
void Recover(void) override;
|
||||
|
||||
///A public interface to WriteSummary
|
||||
int DoWriteBlockFile(){return WriteODDecodeBlockFile();}
|
||||
|
||||
int WriteODDecodeBlockFile();
|
||||
|
@ -224,7 +224,7 @@ BlockFilePtr ODPCMAliasBlockFile::Copy(wxFileNameWrapper &&newFileName)
|
||||
|
||||
/// Writes the xml as a PCMAliasBlockFile if we can (if we have a summary file)
|
||||
/// Otherwise writes XML as a subset of attributes with 'odpcmaliasblockfile as the start tag.
|
||||
/// Most notably, the summaryfile attribute refers to a file that does not yet, so when the project file is read back in
|
||||
/// Most notably, the summaryfile attribute refers to a file that does not yet exist, so when the project file is read back in
|
||||
/// and this object reconstructed, it needs to avoid trying to open it as well as schedule itself for OD loading
|
||||
void ODPCMAliasBlockFile::SaveXML(XMLWriter &xmlFile)
|
||||
{
|
||||
|
@ -16,10 +16,10 @@ The summary is eventually computed and written to a file in a background thread.
|
||||
|
||||
Load On-Demand implementation of the AliasBlockFile for PCM files.
|
||||
|
||||
to load large files more quickly, we take skip computing the summary data and put
|
||||
to load large files more quickly, we skip computing the summary data and put
|
||||
ODPCMAliasBlockFiles in the sequence as place holders. A background thread loads and
|
||||
computes the summary data into these classes.
|
||||
ODPCMAliasBlockFiles are unlike all other BlockFiles are not immutable (for the most part,) because when NEW
|
||||
ODPCMAliasBlockFiles unlike all other BlockFiles are not immutable (for the most part,) because when NEW
|
||||
summary data is computed for an existing ODPCMAliasBlockFile we save the buffer then and write the Summary File.
|
||||
|
||||
All BlockFile methods that treat the summary data as a buffer that exists in its BlockFile
|
||||
|
@ -16,7 +16,7 @@
|
||||
This is an abstract class that subclasses will have to derive the types
|
||||
from. For any type there should only be one ODDecodeTask associated with
|
||||
a given track.
|
||||
There could be the ODBlockFiles of several FLACs in one track (after copy and pasting),
|
||||
There could be the ODDecodeBlockFiles of several FLACs in one track (after copy and pasting),
|
||||
so things aren't as simple as they seem - the implementation needs to be
|
||||
robust enough to allow all the user changes such as copy/paste, DELETE, and so on.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ODComputeSummaryTask.cpp
|
||||
ODDecodeTask
|
||||
|
||||
Created by Michael Chinen (mchinen) on 8/10/08.
|
||||
Audacity(R) is copyright (c) 1999-2008 Audacity Team.
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
******************************************************************//**
|
||||
|
||||
\class ODComputeSummaryTask
|
||||
\brief Computes the summary data for a PCM (WAV) file and writes it to disk,
|
||||
updating the ODPCMAliasBlockFile and the GUI of the newly available data.
|
||||
\class ODDecodeTask
|
||||
\brief Decodes files and writes block files in .au format,
|
||||
updating the ODDecodeBlockFile and the GUI of the newly available data.
|
||||
|
||||
*//*******************************************************************/
|
||||
|
||||
@ -23,7 +23,7 @@ updating the ODPCMAliasBlockFile and the GUI of the newly available data.
|
||||
#include "../WaveTrack.h"
|
||||
#include <wx/wx.h>
|
||||
|
||||
///Creates a NEW task that computes summaries for a wavetrack that needs to be specified through SetWaveTrack()
|
||||
///Creates a NEW task that decodes files
|
||||
ODDecodeTask::ODDecodeTask()
|
||||
{
|
||||
mMaxBlockFiles = 0;
|
||||
@ -150,7 +150,7 @@ void ODDecodeTask::Update()
|
||||
insertCursor =0;//OD TODO:see if this works, removed from inner loop (bfore was n*n)
|
||||
for (i = 0; i<(int)blocks->size(); i++)
|
||||
{
|
||||
//since we have more than one ODBlockFile, we will need type flags to cast.
|
||||
//since we have more than one ODDecodeBlockFile, we will need type flags to cast.
|
||||
SeqBlock &block = (*blocks)[i];
|
||||
const auto &file = block.f;
|
||||
std::shared_ptr<ODDecodeBlockFile> oddbFile;
|
||||
@ -242,7 +242,7 @@ void ODDecodeTask::DemandTrackUpdate(WaveTrack* track, double seconds)
|
||||
}
|
||||
|
||||
|
||||
///there could be the ODBlockFiles of several FLACs in one track (after copy and pasting)
|
||||
///there could be the ODDecodeBlockFiles of several FLACs in one track (after copy and pasting)
|
||||
///so we keep a list of decoders that keep track of the file names, etc, and check the blocks against them.
|
||||
///Blocks that have IsDataAvailable()==false are blockfiles to be decoded. if BlockFile::GetDecodeType()==ODDecodeTask::GetODType() then
|
||||
///this decoder should handle it. Decoders are accessible with the methods below. These aren't thread-safe and should only
|
||||
|
@ -16,7 +16,7 @@
|
||||
This is an abstract class that subclasses will have to derive the types
|
||||
from. For any type there should only be one ODDecodeTask associated with
|
||||
a given track.
|
||||
There could be the ODBlockFiles of several FLACs in one track (after copy and pasting),
|
||||
There could be the ODDecodeBlockFiles of several FLACs in one track (after copy and pasting),
|
||||
so things aren't as simple as they seem - the implementation needs to be
|
||||
robust enough to allow all the user changes such as copy/paste, DELETE, and so on.
|
||||
|
||||
@ -62,7 +62,7 @@ class ODDecodeTask /* not final */ : public ODTask
|
||||
///Creates an ODFileDecoder that decodes a file of filetype the subclass handles.
|
||||
virtual ODFileDecoder* CreateFileDecoder(const wxString & fileName)=0;
|
||||
|
||||
///there could be the ODBlockFiles of several FLACs in one track (after copy and pasting)
|
||||
///there could be the ODDecodeBlockFiles of several FLACs in one track (after copy and pasting)
|
||||
///so we keep a list of decoders that keep track of the file names, etc, and check the blocks against them.
|
||||
///Blocks that have IsDataAvailable()==false are blockfiles to be decoded. if BlockFile::GetDecodeType()==ODDecodeTask::GetODType() then
|
||||
///this decoder should handle it. Decoders are accessible with the methods below. These aren't thread-safe and should only
|
||||
|
Loading…
x
Reference in New Issue
Block a user