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

In off-list discussion, Steve mentioned that kdevelop / kate highlighting recognizes "FIXME", but not "FIX-ME", which has been the Audacity convention. This commit changes Audacity code to use the "FIXME" convention (though I've never known it as convention and MSVC doesn't recognize it).

Also, minor change in WaveTrack.cpp in the effort on bug 641. Should have no functional difference.
This commit is contained in:
v.audacity 2013-08-24 20:30:47 +00:00
parent 8ebe966a8b
commit c7daafede2
17 changed files with 47 additions and 46 deletions

View File

@ -737,7 +737,7 @@ void AudacityApp::OnMacOpenFile(wxCommandEvent & event)
while (ofqueue.GetCount()) {
wxString name(ofqueue[0]);
ofqueue.RemoveAt(0);
MRUOpen(name); // FIX-ME: Check the return result?
MRUOpen(name); // FIXME: Check the return result?
}
}
#endif //__WXMAC__
@ -794,7 +794,7 @@ bool AudacityApp::MRUOpen(wxString fullPathStr) {
// Make sure it isn't already open.
// Test here even though AudacityProject::OpenFile() also now checks, because
// that method does not return the bad result.
// That itself may be a FIX-ME.
// That itself may be a FIXME.
if (AudacityProject::IsAlreadyOpen(fullPathStr))
return false;

View File

@ -450,7 +450,7 @@ bool BatchCommands::ApplySpecialCommand(int iCommand, const wxString command,con
// We have a command index, but we don't use it!
// TODO: Make this special-batch-command code use the menu item code....
// FIX-ME: No error reporting on write file failure in batch mode.
// FIXME: No error reporting on write file failure in batch mode.
if (command == wxT("NoAction")) {
return true;
} else if (!mFileName.IsEmpty() && command == wxT("Import")) {
@ -536,7 +536,7 @@ bool BatchCommands::ApplyEffectCommand( Effect * f, const wxString command, co
AudacityProject *project = GetActiveProject();
//FIX-ME: for later versions may want to not select-all in batch mode.
//FIXME: for later versions may want to not select-all in batch mode.
//IF nothing selected, THEN select everything
// (most effects require that you have something selected).
project->SelectAllIfNone();

View File

@ -856,7 +856,7 @@ wxFileName DirManager::MakeBlockFileName()
}else break;
}
}
// FIX-ME: Might we get here without midkey having been set?
// FIXME: Might we get here without midkey having been set?
BalanceFileAdd(midkey);
return ret;
}

View File

@ -122,7 +122,7 @@ simplifies construction of menu items.
enum {
kAlignEndToEnd=0,
kAlign, // FIX-ME: bad name for "Align Together".
kAlign, // FIXME: bad name for "Align Together".
kAlignZero,
kAlignCursor,
kAlignSelStart,
@ -390,13 +390,13 @@ void AudacityProject::CreateMenusAndCommands()
/////////////////////////////////////////////////////////////////////////////
// FIX-ME: Wave track should be required in this menu.
// FIXME: Wave track should be required in this menu.
c->BeginSubMenu(_("La&beled Audio"));
c->SetDefaultFlags(AudioIONotBusyFlag | LabelsSelectedFlag | TimeSelectedFlag,
AudioIONotBusyFlag | LabelsSelectedFlag | TimeSelectedFlag);
/* i18n-hint: (verb)*/
// FIX-ME: Most of these command labels are exact duplicates of those in 'Remove Audio or Labels'
// FIXME: Most of these command labels are exact duplicates of those in 'Remove Audio or Labels'
// which is a problem in keyboard preferences.
c->AddItem(wxT("CutLabels"), _("&Cut"), FN(OnCutLabels), wxT("Alt+X"),
AudioIONotBusyFlag | LabelsSelectedFlag | TimeSelectedFlag | IsNotSyncLockedFlag,
@ -730,20 +730,20 @@ void AudacityProject::CreateMenusAndCommands()
wxArrayString alignLabels;
alignLabels.Add(_("&Align End to End"));
alignLabels.Add(_("Align Tracks To&gether")); // FIX-ME: Visibility of Access Key with descender.
alignLabels.Add(_("Align Tracks To&gether")); // FIXME: Visibility of Access Key with descender.
// TODO: Add a separator here. How?
alignLabels.Add(_("Align with &Zero"));
alignLabels.Add(_("Align with &Cursor"));
alignLabels.Add(_("Align with Selection &Start")); // FIX-ME: Duplicate of 'Align with Cursor'.
alignLabels.Add(_("Align with Selection &Start")); // FIXME: Duplicate of 'Align with Cursor'.
alignLabels.Add(_("Align with Selection &End"));
alignLabels.Add(_("Align End with Cu&rsor"));
alignLabels.Add(_("Align End with Selection Star&t")); // FIX-ME: Duplicate of 'Align End with Cursor'.
alignLabels.Add(_("Align End with Selection Star&t")); // FIXME: Duplicate of 'Align End with Cursor'.
alignLabels.Add(_("Align End with Selection En&d"));
c->BeginSubMenu(_("&Align Tracks"));
c->AddItemList(wxT("Align"), alignLabels, FN(OnAlign));
// FIX-ME: These flags don't grey out menu.
// FIXME: These flags don't grey out menu.
c->SetCommandFlags(wxT("Align"),
AudioIONotBusyFlag | TracksSelectedFlag,
AudioIONotBusyFlag | TracksSelectedFlag);
@ -777,7 +777,7 @@ void AudacityProject::CreateMenusAndCommands()
c->AddSeparator();
#ifdef EXPERIMENTAL_SYNC_LOCK
// FIX-ME: Sync Lock should not be greyed out during AudioIOBusy.
// FIXME: Sync Lock should not be greyed out during AudioIOBusy.
c->AddCheck(wxT("SyncLock"), _("Sync-&Lock Tracks"), FN(OnSyncLock), 0);
c->AddSeparator();
@ -1346,7 +1346,7 @@ void AudacityProject::RebuildMenuBar()
// Under Windows we delete the menus, since we will soon recreate them.
// rather oddly, the menus don't vanish as a result of doing this.
// Under Linux we can't delete them as this crashes gtk2....
// FIX-ME: So we have a memory leak of menu items under linux? Oops.
// FIXME: So we have a memory leak of menu items under linux? Oops.
#ifdef __WXMSW__
wxMenuBar *menuBar = GetMenuBar();
@ -4202,7 +4202,7 @@ void AudacityProject::OnSplitNew()
// n = iter.Next();
// }
//
// wxASSERT(label); // per Vigilant Sentry report on possible null deref, FIX-ME: Report error or validate?
// wxASSERT(label); // per Vigilant Sentry report on possible null deref, FIXME: Report error or validate?
// for(int i = 0; i < label->GetNumLabels(); i++) {
// wxString name = label->GetLabel(i)->title;
// double begin = label->GetLabel(i)->t;
@ -5109,8 +5109,8 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
while (t) {
// This shifts different tracks in different ways, so no sync-lock move.
// FIX-ME: We only want to move Wave Tracks and Note Tracks.
// FIX-ME: Tracks misaligned if stereo channels have different starts or ends.
// FIXME: We only want to move Wave Tracks and Note Tracks.
// FIXME: Tracks misaligned if stereo channels have different starts or ends.
if (t->GetSelected()) {
t->SetOffset(newPos);
}

View File

@ -2307,7 +2307,7 @@ bool AudacityProject::WarnOfLegacyFile( )
}
// FIX-ME? This should return a result that is checked.
// FIXME? This should return a result that is checked.
// See comment in AudacityApp::MRUOpen().
void AudacityProject::OpenFile(wxString fileName, bool addtohistory)
{
@ -2394,7 +2394,7 @@ void AudacityProject::OpenFile(wxString fileName, bool addtohistory)
}
}
//FIX-ME: //v Surely we could be smarter about this,
//FIXME: //v Surely we could be smarter about this,
// like checking much earlier that this is a .aup file.
if (temp.Mid(0, 6) != wxT("<?xml ")) {
// If it's not XML, try opening it as any other form of audio

View File

@ -42,7 +42,7 @@
mHandle = resample_open(mMethod, dMinFactor, dMaxFactor);
if(mHandle == NULL) {
fprintf(stderr, "libresample doesn't support range of factors %f to %f.\n", dMinFactor, dMaxFactor);
// FIX-ME: Audacity will hang after this if branch.
// FIXME: Audacity will hang after this if branch.
return;
}
}
@ -97,7 +97,7 @@
this->SetMethod(useBestMethod);
if (!src_is_valid_ratio (dMinFactor) || !src_is_valid_ratio (dMaxFactor)) {
fprintf(stderr, "libsamplerate supports only resampling factors between 1/SRC_MAX_RATIO and SRC_MAX_RATIO.\n");
// FIX-ME: Audacity will hang after this if branch.
// FIXME: Audacity will hang after this if branch.
mHandle = NULL;
return;
}

View File

@ -505,7 +505,7 @@ bool Sequence::Paste(sampleCount s, const Sequence *src)
return ConsistencyCheck(wxT("Paste branch one"));
}
// FIX-ME: "b" is unsigned, so it's pointless to check that it's >= 0.
// FIXME: "b" is unsigned, so it's pointless to check that it's >= 0.
if (b >= 0 && b < numBlocks
&& ((mBlock->Item(b)->f->GetLength() + addedLen) < mMaxSamples)) {
// Special case: we can fit all of the new samples inside of

View File

@ -357,7 +357,7 @@ class AUDACITY_DLL_API TrackList:public wxEvtHandler
friend class TrackListIterator;
/// Add this Track or all children of this TrackGroup
// FIX-ME: What does that comment mean by "TrackGroup"? There was no such class at tag Audacity_1_3_13.
// FIXME: What does that comment mean by "TrackGroup"? There was no such class at tag Audacity_1_3_13.
void Add(Track * t);
void AddToHead(Track * t);
@ -365,7 +365,7 @@ class AUDACITY_DLL_API TrackList:public wxEvtHandler
void Replace(Track * t, Track * with, bool deletetrack = false);
/// Remove this Track or all children of this TrackGroup
// FIX-ME: What does that comment mean by "TrackGroup"? There was no such class at tag Audacity_1_3_13.
// FIXME: What does that comment mean by "TrackGroup"? There was no such class at tag Audacity_1_3_13.
void Remove(Track * t, bool deletetrack = false);
/// Make the list empty

View File

@ -5175,7 +5175,7 @@ void TrackPanel::OnMouseEvent(wxMouseEvent & event)
bool TrackPanel::HandleTrackLocationMouseEvent(WaveTrack * track, wxRect &r, wxMouseEvent &event)
{
// FIX-ME: Disable this and return true when CutLines aren't showing?
// FIXME: Disable this and return true when CutLines aren't showing?
// (Don't use gPerfs-> for the fix as registry access is slow).
if (mMouseCapture == WasOverCutLine)
@ -5544,7 +5544,7 @@ int TrackPanel::DetermineToolToUse( ToolsToolBar * pTtb, wxMouseEvent & event)
} else if( trackKind != Track::Wave) {
currentTool = selectTool;
// So we are in a wave track.
//FIX-ME: Not necessarily. Haven't checked Track::Note (#if defined(USE_MIDI)).
//FIXME: Not necessarily. Haven't checked Track::Note (#if defined(USE_MIDI)).
// From here on the order in which we hit test determines
// which tool takes priority in the rare cases where it
// could be more than one.

View File

@ -1843,8 +1843,8 @@ void WaveTrack::GetEnvelopeValues(double *buffer, int bufferLen,
return;
// This is useful in debugging, to easily find null envelope settings, but
// should not be necessary in release build.
// If we were going to set it to failsafe values, better to set each element to 1.0.
// should not be necessary in Release build.
// If we were going to set it to failsafe values in Release build, better to set each element to 1.0.
#ifdef __WXDEBUG__
memset(buffer, 0, sizeof(double)*bufferLen);
#endif
@ -1863,8 +1863,6 @@ void WaveTrack::GetEnvelopeValues(double *buffer, int bufferLen,
{
double* rbuf = buffer;
int rlen = bufferLen;
if (rlen <= 0)
return; // loop completion
double rt0 = t0;
if (rt0 < dClipStartTime)
@ -1877,16 +1875,19 @@ void WaveTrack::GetEnvelopeValues(double *buffer, int bufferLen,
if (rt0 + rlen*tstep > dClipEndTime)
{
//vvvvv debugging int nStartSample = clip->GetStartSample();
//vvvvv debugging int nEndSample = clip->GetEndSample();
int nClipLen = clip->GetEndSample() - clip->GetStartSample();
if (nClipLen <= 0) // Testing for bug 641, this problem is consistently '== 0', but doesn't hurt to check <.
return;
// This check prevents problem cited in http://bugzilla.audacityteam.org/show_bug.cgi?id=528#c11,
// Gale's cross_fade_out project, which was already corrupted by bug 528.
// This conditional prevents the previous write past the buffer end, in clip->GetEnvelope() call.
if (nClipLen < rlen) // Never increase rlen here.
rlen = nClipLen;
}
if (rlen <= 0)
return; // loop completion
clip->GetEnvelope()->GetValues(rbuf, rlen, rt0, tstep);
}
}
@ -2290,7 +2291,7 @@ bool WaveTrack::Resample(int rate, ProgressDialog *progress)
if (!it->GetData()->Resample(rate, progress))
{
wxLogDebug( wxT("Resampling problem! We're partially resampled") );
// FIX-ME: The track is now in an inconsistent state since some
// FIXME: The track is now in an inconsistent state since some
// clips are resampled and some are not
return false;
}

View File

@ -94,7 +94,7 @@ void CloseContrastDialog()
float ContrastDialog::GetDB()
{
// FIX-ME: what if more than one track?
// FIXME: what if more than one track?
float rms = float(0.0);
AudacityProject *p = GetActiveProject();

View File

@ -287,7 +287,7 @@ bool EffectTruncSilence::Process()
}
// Intersection may create regions smaller than allowed; ignore them.
// FIX-ME: See http://bugzilla.audacityteam.org/show_bug.cgi?id=434#c10 and
// FIXME: See http://bugzilla.audacityteam.org/show_bug.cgi?id=434#c10 and
// http://bugzilla.audacityteam.org/show_bug.cgi?id=434#c11 about the 0.0001 fudge factor.
if ((r->end - r->start) < ((mTruncInitialAllowedSilentMs / 1000.0) - 0.0001))
continue;

View File

@ -541,7 +541,7 @@ bool ExportFFmpeg::Finalize()
// If codec supports CODEC_CAP_SMALL_LAST_FRAME, we can feed it with smaller frame
// If codec is FLAC, feed it anyway (it doesn't have CODEC_CAP_SMALL_LAST_FRAME, but it works)
// If frame_size is 1, then it's some kind of PCM codec, they don't have frames
// If user configured the exporter to feed the encoder with silence // FIX-ME: Finish the sentence!
// If user configured the exporter to feed the encoder with silence // FIXME: Finish the sentence!
if ((codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME)
|| codec->id == CODEC_ID_FLAC
|| mEncAudioCodecCtx->frame_size == 1

View File

@ -427,7 +427,7 @@ FFmpegPresets::FFmpegPresets()
FFmpegPresets::~FFmpegPresets()
{
XMLFileWriter writer;
// FIX-ME: Catch XMLFileWriterException
// FIXME: Catch XMLFileWriterException
wxFileName xmlFileName(FileNames::DataDir(), wxT("ffmpeg_presets.xml"));
writer.Open(xmlFileName.GetFullPath(),wxT("wb"));
WriteXMLHeader(writer);
@ -444,7 +444,7 @@ void FFmpegPresets::ImportPresets(wxString &filename)
void FFmpegPresets::ExportPresets(wxString &filename)
{
XMLFileWriter writer;
// FIX-ME: Catch XMLFileWriterException
// FIXME: Catch XMLFileWriterException
writer.Open(filename,wxT("wb"));
WriteXMLHeader(writer);
WriteXML(writer);

View File

@ -225,7 +225,7 @@ WaveTrack* ODWaveTrackTaskQueue::GetWaveTrack(size_t x)
{
WaveTrack* ret = NULL;
mTracksMutex.Lock();
// FIX-ME: x is unsigned so there's no point in checking that it's >= 0.
// FIXME: x is unsigned so there's no point in checking that it's >= 0.
if(x>=0&&x<mTracks.size())
ret = mTracks[x];
mTracksMutex.Unlock();
@ -257,7 +257,7 @@ ODTask* ODWaveTrackTaskQueue::GetTask(size_t x)
{
ODTask* ret = NULL;
mTasksMutex.Lock();
// FIX-ME: x is unsigned so there's no point in checking that it's >= 0.
// FIXME: x is unsigned so there's no point in checking that it's >= 0.
if(x>=0&&x<mTasks.size())
ret = mTasks[x];
mTasksMutex.Unlock();

View File

@ -420,7 +420,7 @@ void DeviceToolBar::RepositionCombos()
// as the toolbar's with can extend past this.
GetClientSize(&w, &h);
// FIX-ME: Note that there's some bug in here, in that even if the prefs show the toolbar
// FIXME: Note that there's some bug in here, in that even if the prefs show the toolbar
// docked, on initialization, this call to IsDocked() returns false.
if (IsDocked()) {
// If the toolbar is docked its width can be larger than what is actually viewable

View File

@ -689,7 +689,7 @@ void Ruler::Tick(int pos, double d, bool major, bool minor)
wxCoord strW, strH, strD, strL;
int strPos, strLen, strLeft, strTop;
// FIX-ME: We don't draw a tick if of end of our label arrays
// FIXME: We don't draw a tick if of end of our label arrays
// But we shouldn't have an array of labels.
if( mNumMinorMinor >= mLength )
return;
@ -749,7 +749,7 @@ void Ruler::Tick(int pos, double d, bool major, bool minor)
}
// FIX-ME: we shouldn't even get here if strPos < 0.
// FIXME: we shouldn't even get here if strPos < 0.
// Ruler code currently does not handle very small or
// negative sized windows (i.e. don't draw) properly.
if( strPos < 0 )
@ -801,7 +801,7 @@ void Ruler::TickCustom(int labelIdx, bool major, bool minor)
wxCoord strW, strH, strD, strL;
int strPos, strLen, strLeft, strTop;
// FIX-ME: We don't draw a tick if of end of our label arrays
// FIXME: We don't draw a tick if of end of our label arrays
// But we shouldn't have an array of labels.
if( mNumMinor >= mLength )
return;
@ -863,7 +863,7 @@ void Ruler::TickCustom(int labelIdx, bool major, bool minor)
}
// FIX-ME: we shouldn't even get here if strPos < 0.
// FIXME: we shouldn't even get here if strPos < 0.
// Ruler code currently does not handle very small or
// negative sized windows (i.e. don't draw) properly.
if( strPos < 0 )
@ -978,7 +978,7 @@ void Ruler::Update(TimeTrack* timetrack)// Envelope *speedEnv, long minSpeed, lo
mRect = wxRect(0,0, 0,mLength);
}
// FIX-ME: Surely we do not need to allocate storage for the labels?
// FIXME: Surely we do not need to allocate storage for the labels?
// We can just recompute them as we need them? Yes, but only if
// mCustom is false!!!!