Fix certain compilation warnings from Travis
This commit is contained in:
commit
7e83dc6a4c
|
@ -236,6 +236,7 @@ It handles initialization and termination by subclassing wxApp.
|
|||
DEFINE_EVENT_TYPE(EVT_OPEN_AUDIO_FILE);
|
||||
DEFINE_EVENT_TYPE(EVT_LANGUAGE_CHANGE);
|
||||
|
||||
#if 0
|
||||
#ifdef __WXGTK__
|
||||
static void wxOnAssert(const wxChar *fileName, int lineNumber, const wxChar *msg)
|
||||
{
|
||||
|
@ -252,6 +253,7 @@ static void wxOnAssert(const wxChar *fileName, int lineNumber, const wxChar *msg
|
|||
exit(0);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static bool gInited = false;
|
||||
bool gIsQuitting = false;
|
||||
|
|
|
@ -2332,6 +2332,7 @@ void AudioIO::StopStream()
|
|||
else
|
||||
bResult = track->InsertSilence(mT0, recordingOffset); // put silence in
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
}
|
||||
else
|
||||
{ // recording into a NEW track
|
||||
|
|
|
@ -583,7 +583,9 @@ wxFileName DirManager::MakeBlockFilePath(const wxString &value) {
|
|||
dir.AppendDir(middir);
|
||||
|
||||
if(!dir.DirExists() && !dir.Mkdir(0777,wxPATH_MKDIR_FULL))
|
||||
{ // need braces to avoid compiler warning about ambiguous else, see the macro
|
||||
wxLogSysError(_("mkdir in DirManager::MakeBlockFilePath failed."));
|
||||
}
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
@ -1219,8 +1221,10 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
|
|||
|
||||
wxFile testFile(renamedFileName.GetFullPath(), wxFile::write);
|
||||
if (!testFile.IsOpened()) {
|
||||
wxLogSysError(_("Unable to open/create test file."),
|
||||
{ // need braces to avoid compiler warning about ambiguous else, see the macro
|
||||
wxLogSysError(_("Unable to open/create test file."),
|
||||
renamedFileName.GetFullPath().c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1229,8 +1233,10 @@ bool DirManager::EnsureSafeFilename(wxFileName fName)
|
|||
|
||||
if (!wxRemoveFile(renamedFileName.GetFullPath())) {
|
||||
/* i18n-hint: %s is the name of a file.*/
|
||||
wxLogSysError(_("Unable to remove '%s'."),
|
||||
{ // need braces to avoid compiler warning about ambiguous else, see the macro
|
||||
wxLogSysError(_("Unable to remove '%s'."),
|
||||
renamedFileName.GetFullPath().c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4156,6 +4156,7 @@ void AudacityProject::OnPaste()
|
|||
tmp = mTrackFactory->NewWaveTrack( ((WaveTrack*)n)->GetSampleFormat(), ((WaveTrack*)n)->GetRate());
|
||||
bool bResult = tmp->InsertSilence(0.0, msClipT1 - msClipT0); // MJS: Is this correct?
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
tmp->Flush();
|
||||
|
||||
bPastedSomething |=
|
||||
|
@ -4292,6 +4293,7 @@ bool AudacityProject::HandlePasteNothingSelected()
|
|||
|
||||
bool bResult = pNewTrack->Paste(0.0, pClip);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
mTracks->Add(pNewTrack);
|
||||
pNewTrack->SetSelected(true);
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ void OnMixAndRenderToNewTrack();
|
|||
void HandleMixAndRender(bool toNewTrack);
|
||||
|
||||
private:
|
||||
SelectedRegion mRegionSave;
|
||||
SelectedRegion mRegionSave{};
|
||||
public:
|
||||
void OnSelectionSave();
|
||||
void OnSelectionRestore();
|
||||
|
|
|
@ -789,8 +789,6 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||
const wxPoint & pos,
|
||||
const wxSize & size)
|
||||
: wxFrame(parent, id, wxT("Audacity"), pos, size),
|
||||
mRegionSave(),
|
||||
mLastPlayMode(normalPlay),
|
||||
mRate((double) gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), AudioIO::GetOptimalSupportedSampleRate())),
|
||||
mDefaultFormat((sampleFormat) gPrefs->
|
||||
Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample)),
|
||||
|
@ -799,43 +797,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||
mFrequencySelectionFormatName(gPrefs->Read(wxT("/FrequencySelectionFormatName"), wxT(""))),
|
||||
mBandwidthSelectionFormatName(gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT(""))),
|
||||
mUndoManager(safenew UndoManager),
|
||||
mDirty(false),
|
||||
mRuler(NULL),
|
||||
mTrackPanel(NULL),
|
||||
mTrackFactory(NULL),
|
||||
mAutoScrolling(false),
|
||||
mActive(true),
|
||||
mHistoryWindow(NULL),
|
||||
mLyricsWindow(NULL),
|
||||
mMixerBoard(NULL),
|
||||
mMixerBoardFrame(NULL),
|
||||
mFreqWindow(NULL),
|
||||
mContrastDialog(NULL),
|
||||
mAliasMissingWarningDialog(NULL),
|
||||
mPlaybackMeter(NULL),
|
||||
mCaptureMeter(NULL),
|
||||
mToolManager(NULL),
|
||||
mbBusyImporting(false),
|
||||
mAudioIOToken(-1),
|
||||
mIsDeleting(false),
|
||||
mTracksFitVerticallyZoomed(false), //lda
|
||||
mShowId3Dialog(true), //lda
|
||||
mLastFocusedWindow(NULL),
|
||||
mKeyboardCaptureHandler(NULL),
|
||||
mImportXMLTagHandler(NULL),
|
||||
mAutoSaving(false),
|
||||
mIsRecovered(false),
|
||||
mIsCapturing(false),
|
||||
mRecordingRecoveryHandler(NULL),
|
||||
mImportedDependencies(false),
|
||||
mWantSaveCompressed(false),
|
||||
mLastEffect(wxEmptyString),
|
||||
mTimerRecordCanceled(false),
|
||||
mMenuClose(false),
|
||||
mShownOnce(false),
|
||||
mbInitializingScrollbar(false),
|
||||
mViewInfo(0.0, 1.0, ZoomInfo::GetDefaultZoom()),
|
||||
mIsBeingDeleted(false)
|
||||
mViewInfo(0.0, 1.0, ZoomInfo::GetDefaultZoom())
|
||||
{
|
||||
// Note that the first field of the status bar is a dummy, and it's width is set
|
||||
// to zero latter in the code. This field is needed for wxWidgets 2.8.12 because
|
||||
|
@ -4658,6 +4620,7 @@ void AudacityProject::EditClipboardByLabel( EditDestFunction action )
|
|||
|
||||
bool bResult = merged->Paste( 0.0 , dest );
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
delete dest;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ public:
|
|||
|
||||
void WriteXMLHeader(XMLWriter &xmlFile);
|
||||
|
||||
PlayMode mLastPlayMode;
|
||||
PlayMode mLastPlayMode{ normalPlay };
|
||||
ViewInfo mViewInfo;
|
||||
|
||||
// Audio IO callback methods
|
||||
|
@ -553,7 +553,7 @@ public:
|
|||
|
||||
// History/Undo manager
|
||||
std::unique_ptr<UndoManager> mUndoManager;
|
||||
bool mDirty;
|
||||
bool mDirty{ false };
|
||||
|
||||
// Commands
|
||||
|
||||
|
@ -568,39 +568,39 @@ public:
|
|||
|
||||
wxStatusBar *mStatusBar;
|
||||
|
||||
AdornedRulerPanel *mRuler;
|
||||
TrackPanel *mTrackPanel;
|
||||
TrackFactory *mTrackFactory;
|
||||
AdornedRulerPanel *mRuler{};
|
||||
TrackPanel *mTrackPanel{};
|
||||
TrackFactory *mTrackFactory{};
|
||||
wxPanel * mMainPanel;
|
||||
wxScrollBar *mHsbar;
|
||||
wxScrollBar *mVsbar;
|
||||
bool mAutoScrolling;
|
||||
bool mActive;
|
||||
bool mAutoScrolling{ false };
|
||||
bool mActive{ true };
|
||||
bool mIconized;
|
||||
|
||||
HistoryWindow *mHistoryWindow;
|
||||
LyricsWindow* mLyricsWindow;
|
||||
MixerBoard* mMixerBoard;
|
||||
MixerBoardFrame* mMixerBoardFrame;
|
||||
HistoryWindow *mHistoryWindow{};
|
||||
LyricsWindow* mLyricsWindow{};
|
||||
MixerBoard* mMixerBoard{};
|
||||
MixerBoardFrame* mMixerBoardFrame{};
|
||||
|
||||
FreqWindow *mFreqWindow;
|
||||
ContrastDialog *mContrastDialog;
|
||||
FreqWindow *mFreqWindow{};
|
||||
ContrastDialog *mContrastDialog{};
|
||||
|
||||
// dialog for missing alias warnings
|
||||
wxDialog *mAliasMissingWarningDialog;
|
||||
wxDialog *mAliasMissingWarningDialog{};
|
||||
|
||||
bool mShownOnce;
|
||||
bool mShownOnce{ false };
|
||||
|
||||
// Project owned meters
|
||||
Meter *mPlaybackMeter;
|
||||
Meter *mCaptureMeter;
|
||||
Meter *mPlaybackMeter{};
|
||||
Meter *mCaptureMeter{};
|
||||
|
||||
public:
|
||||
ToolManager *mToolManager;
|
||||
ToolManager *mToolManager{};
|
||||
bool mShowSplashScreen;
|
||||
wxString mHelpPref;
|
||||
wxString mSoloPref;
|
||||
bool mbBusyImporting; // used to fix bug 584
|
||||
bool mbBusyImporting{ false }; // used to fix bug 584
|
||||
|
||||
void SetNormalizedWindowState(wxRect pSizeAndLocation) { mNormalizedWindowState = pSizeAndLocation; }
|
||||
wxRect GetNormalizedWindowState() const { return mNormalizedWindowState; }
|
||||
|
@ -615,12 +615,12 @@ public:
|
|||
#define kAudacitySortByName (1 << 2)
|
||||
void SortTracks(int flags);
|
||||
|
||||
int mAudioIOToken;
|
||||
int mAudioIOToken{ -1 };
|
||||
|
||||
bool mIsDeleting;
|
||||
bool mTracksFitVerticallyZoomed; //lda
|
||||
bool mIsDeleting{ false };
|
||||
bool mTracksFitVerticallyZoomed{ false }; //lda
|
||||
bool mNormalizeOnLoad; //lda
|
||||
bool mShowId3Dialog; //lda
|
||||
bool mShowId3Dialog{ true }; //lda
|
||||
bool mEmptyCanBeDirty;
|
||||
|
||||
bool mSelectAllOnNone;
|
||||
|
@ -630,33 +630,33 @@ public:
|
|||
bool mLockPlayRegion;
|
||||
|
||||
// See AudacityProject::OnActivate() for an explanation of this.
|
||||
wxWindow *mLastFocusedWindow;
|
||||
wxWindow *mLastFocusedWindow{};
|
||||
|
||||
ImportXMLTagHandler* mImportXMLTagHandler;
|
||||
ImportXMLTagHandler* mImportXMLTagHandler{};
|
||||
|
||||
// Last auto-save file name and path (empty if none)
|
||||
wxString mAutoSaveFileName;
|
||||
|
||||
// Are we currently auto-saving or not?
|
||||
bool mAutoSaving;
|
||||
bool mAutoSaving{ false };
|
||||
|
||||
// Has this project been recovered from an auto-saved version
|
||||
bool mIsRecovered;
|
||||
bool mIsRecovered{ false };
|
||||
|
||||
// The auto-save data dir the project has been recovered from
|
||||
wxString mRecoveryAutoSaveDataDir;
|
||||
|
||||
// The handler that handles recovery of <recordingrecovery> tags
|
||||
RecordingRecoveryHandler* mRecordingRecoveryHandler;
|
||||
RecordingRecoveryHandler* mRecordingRecoveryHandler{};
|
||||
|
||||
// Dependencies have been imported and a warning should be shown on save
|
||||
bool mImportedDependencies;
|
||||
bool mImportedDependencies{ false };
|
||||
|
||||
bool mWantSaveCompressed;
|
||||
bool mWantSaveCompressed{ false };
|
||||
wxArrayString mStrOtherNamesArray; // used to make sure compressed file names are unique
|
||||
|
||||
// Last effect applied to this project
|
||||
PluginID mLastEffect;
|
||||
PluginID mLastEffect{};
|
||||
|
||||
// The screenshot class needs to access internals
|
||||
friend class ScreenshotCommand;
|
||||
|
@ -664,18 +664,18 @@ public:
|
|||
wxRect mNormalizedWindowState;
|
||||
|
||||
//flag for cancellation of timer record.
|
||||
bool mTimerRecordCanceled;
|
||||
bool mTimerRecordCanceled{ false };
|
||||
|
||||
// Are we currently closing as the result of a menu command?
|
||||
bool mMenuClose;
|
||||
bool mMenuClose{ false };
|
||||
|
||||
bool mbInitializingScrollbar;
|
||||
bool mbInitializingScrollbar{ false };
|
||||
|
||||
// Flag that we're recoding.
|
||||
bool mIsCapturing;
|
||||
bool mIsCapturing{ false };
|
||||
|
||||
// Keyboard capture
|
||||
wxWindow *mKeyboardCaptureHandler;
|
||||
wxWindow *mKeyboardCaptureHandler{};
|
||||
|
||||
double mSeekShort;
|
||||
double mSeekLong;
|
||||
|
@ -683,7 +683,7 @@ public:
|
|||
wxLongLong mLastSelectionAdjustment;
|
||||
|
||||
// See explanation in OnCloseWindow
|
||||
bool mIsBeingDeleted;
|
||||
bool mIsBeingDeleted{ false };
|
||||
|
||||
// CommandManager needs to use private methods
|
||||
friend class CommandManager;
|
||||
|
|
|
@ -55,10 +55,8 @@ int Sequence::sMaxDiskBlockSize = 1048576;
|
|||
Sequence::Sequence(DirManager * projDirManager, sampleFormat format)
|
||||
: mDirManager(projDirManager)
|
||||
, mSampleFormat(format)
|
||||
, mNumSamples(0)
|
||||
, mMinSamples(sMaxDiskBlockSize / SAMPLE_SIZE(mSampleFormat) / 2)
|
||||
, mMaxSamples(mMinSamples * 2)
|
||||
, mErrorOpening(false)
|
||||
{
|
||||
mDirManager->Ref();
|
||||
}
|
||||
|
@ -68,11 +66,9 @@ Sequence::Sequence(DirManager * projDirManager, sampleFormat format)
|
|||
// from one project to another
|
||||
Sequence::Sequence(const Sequence &orig, DirManager *projDirManager)
|
||||
: mDirManager(projDirManager)
|
||||
, mNumSamples(0)
|
||||
, mSampleFormat(orig.mSampleFormat)
|
||||
, mMinSamples(orig.mMinSamples)
|
||||
, mMaxSamples(orig.mMaxSamples)
|
||||
, mErrorOpening(false)
|
||||
{
|
||||
mDirManager->Ref();
|
||||
|
||||
|
@ -418,11 +414,13 @@ bool Sequence::Copy(sampleCount s0, sampleCount s1, Sequence **dest)
|
|||
return false;
|
||||
|
||||
int numBlocks = mBlock.size();
|
||||
|
||||
int b0 = FindBlock(s0);
|
||||
const int b1 = FindBlock(s1 - 1);
|
||||
wxASSERT(b0 >= 0);
|
||||
wxASSERT(b0 < numBlocks);
|
||||
wxASSERT(b1 < numBlocks);
|
||||
wxUnusedVar(numBlocks);
|
||||
wxASSERT(b0 <= b1);
|
||||
|
||||
*dest = new Sequence(mDirManager, mSampleFormat);
|
||||
|
|
|
@ -222,12 +222,12 @@ class PROFILE_DLL_API Sequence final : public XMLTagHandler{
|
|||
|
||||
BlockArray mBlock;
|
||||
sampleFormat mSampleFormat;
|
||||
sampleCount mNumSamples;
|
||||
sampleCount mNumSamples{ 0 };
|
||||
|
||||
sampleCount mMinSamples; // min samples per block
|
||||
sampleCount mMaxSamples; // max samples per block
|
||||
|
||||
bool mErrorOpening;
|
||||
bool mErrorOpening{ false };
|
||||
|
||||
///To block the Delete() method against the ODCalcSummaryTask::Update() method
|
||||
ODLock mDeleteUpdateMutex;
|
||||
|
|
|
@ -471,6 +471,8 @@ void TrackArtist::DrawTrack(const Track * t,
|
|||
case WaveTrack::Spectrum:
|
||||
DrawSpectrum(wt, dc, rect, selectedRegion, zoomInfo);
|
||||
break;
|
||||
default:
|
||||
wxASSERT(false);
|
||||
}
|
||||
|
||||
#if defined(__WXMAC__)
|
||||
|
@ -835,7 +837,7 @@ void TrackArtist::UpdateVRuler(Track *t, wxRect & rect)
|
|||
float minFreq, maxFreq;
|
||||
wt->GetSpectrumBounds(&minFreq, &maxFreq);
|
||||
|
||||
switch (wt->GetSpectrogramSettings().scaleType) {
|
||||
switch (settings.scaleType) {
|
||||
default:
|
||||
wxASSERT(false);
|
||||
case SpectrogramSettings::stLinear:
|
||||
|
|
|
@ -912,6 +912,7 @@ bool WaveTrack::ClearAndPaste(double t0, // Start of time to clear
|
|||
if (i > 0) {
|
||||
bool bResult = MergeClips(GetClipIndex(clips[i - 1]), GetClipIndex(clip));
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -931,6 +932,7 @@ bool WaveTrack::ClearAndPaste(double t0, // Start of time to clear
|
|||
if (i < clips.GetCount() - 1) {
|
||||
bool bResult = MergeClips(GetClipIndex(clip), GetClipIndex(clips[i + 1]));
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1170,9 +1172,11 @@ bool WaveTrack::SyncLockAdjust(double oldT1, double newT1)
|
|||
|
||||
bool bResult = tmp->InsertSilence(0.0, newT1 - oldT1);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
tmp->Flush();
|
||||
bResult = Paste(oldT1, tmp);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
delete tmp;
|
||||
}
|
||||
}
|
||||
|
@ -1241,6 +1245,7 @@ bool WaveTrack::Paste(double t0, Track *src)
|
|||
Cut(t0, GetEndTime()+1.0/mRate, &tmp);
|
||||
bool bResult = Paste(t0 + insertDuration, tmp);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
delete tmp;
|
||||
}
|
||||
} else
|
||||
|
@ -1545,12 +1550,14 @@ bool WaveTrack::Join(double t0, double t1)
|
|||
//printf("Adding %.6f seconds of silence\n");
|
||||
bool bResult = newClip->InsertSilence(t, addedSilence);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
t += addedSilence;
|
||||
}
|
||||
|
||||
//printf("Pasting at %.6f\n", t);
|
||||
bool bResult = newClip->Paste(t, clip);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
t = newClip->GetEndTime();
|
||||
|
||||
mClips.DeleteObject(clip);
|
||||
|
|
|
@ -339,6 +339,7 @@ int ODDecodeBlockFile::WriteODDecodeBlockFile()
|
|||
mFormat,
|
||||
NULL);//summaryData);
|
||||
wxASSERT(bSuccess); // TODO: Handle failure here by alert to user and undo partial op.
|
||||
wxUnusedVar(bSuccess);
|
||||
|
||||
mFileNameMutex.Unlock();
|
||||
|
||||
|
|
|
@ -111,6 +111,7 @@ SimpleBlockFile::SimpleBlockFile(wxFileName baseFileName,
|
|||
{
|
||||
bool bSuccess = WriteSimpleBlockFile(sampleData, sampleLen, format, NULL);
|
||||
wxASSERT(bSuccess); // TODO: Handle failure here by alert to user and undo partial op.
|
||||
wxUnusedVar(bSuccess);
|
||||
}
|
||||
|
||||
if (useCache) {
|
||||
|
|
|
@ -971,8 +971,6 @@ void CommandManager::Enable(const wxString &name, bool enabled)
|
|||
|
||||
void CommandManager::EnableUsingFlags(wxUint32 flags, wxUint32 mask)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for(const auto &entry : mCommandList) {
|
||||
if (entry->multi && entry->index != 0)
|
||||
continue;
|
||||
|
@ -1158,8 +1156,6 @@ bool CommandManager::HandleMenuID(int id, wxUint32 flags, wxUint32 mask)
|
|||
/// code to run.
|
||||
bool CommandManager::HandleTextualCommand(wxString & Str, wxUint32 flags, wxUint32 mask)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
// Linear search for now...
|
||||
for (const auto &entry : mCommandList)
|
||||
{
|
||||
|
|
|
@ -1731,6 +1731,7 @@ bool Effect::ProcessTrack(int count,
|
|||
return false;
|
||||
}
|
||||
wxASSERT(processed == curBlockSize);
|
||||
wxUnusedVar(processed);
|
||||
|
||||
// Bump to next input buffer position
|
||||
if (inputRemaining)
|
||||
|
|
|
@ -684,6 +684,9 @@ inline long TrapLong(long x, long min, long max)
|
|||
|
||||
#define ReadBasic(type, name) \
|
||||
type name; \
|
||||
wxUnusedVar(MIN_ ##name); \
|
||||
wxUnusedVar(MAX_ ##name); \
|
||||
wxUnusedVar(SCL_ ##name); \
|
||||
if (!parms.ReadAndVerify(KEY_ ## name, &name, DEF_ ## name)) \
|
||||
return false;
|
||||
|
||||
|
|
|
@ -1204,6 +1204,7 @@ bool EffectEqualization::ProcessOne(int count, WaveTrack * t,
|
|||
//put the processed audio in
|
||||
bool bResult = t->Paste(clipStartEndTimes[i].first, toClipOutput);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
//if the clip was only partially selected, the Paste will have created a split line. Join is needed to take care of this
|
||||
//This is not true when the selection is fully contained within one clip (second half of conditional)
|
||||
if( (clipRealStartEndTimes[i].first != clipStartEndTimes[i].first ||
|
||||
|
|
|
@ -1336,6 +1336,7 @@ bool EffectNoiseReduction::Worker::ProcessOne
|
|||
outputTrack->HandleClear(tLen, outputTrack->GetEndTime(), false, false);
|
||||
bool bResult = track->ClearAndPaste(t0, t0 + tLen, &*outputTrack, true, false);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
}
|
||||
|
||||
return bLoopSuccess;
|
||||
|
|
|
@ -416,6 +416,7 @@ bool EffectSBSMS::Process()
|
|||
leftTrack->ClearAndPaste(mCurT0, mCurT1, rb.outputLeftTrack,
|
||||
true, false, GetTimeWarper());
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
|
||||
if(rightTrack)
|
||||
{
|
||||
|
|
|
@ -13,11 +13,13 @@
|
|||
|
||||
#include "VSTControl.h"
|
||||
|
||||
#if 0
|
||||
static int trappedErrorCode = 0;
|
||||
static int X11TrapHandler(Display *, XErrorEvent *err)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
VSTControl::VSTControl()
|
||||
: VSTControlBase()
|
||||
|
|
|
@ -1409,6 +1409,8 @@ bool LadspaEffect::PopulateUI(wxWindow *parent)
|
|||
wxString bound;
|
||||
float lower = 0.0;
|
||||
float upper = 1.0;
|
||||
|
||||
/*
|
||||
bool haslo = false;
|
||||
bool hashi = false;
|
||||
bool forceint = false;
|
||||
|
@ -1431,6 +1433,7 @@ bool LadspaEffect::PopulateUI(wxWindow *parent)
|
|||
upper *= mSampleRate;
|
||||
forceint = true;
|
||||
}
|
||||
*/
|
||||
|
||||
// Limit to the UI precision
|
||||
lower = ceilf(lower * 1000000.0) / 1000000.0;
|
||||
|
|
|
@ -266,7 +266,7 @@ Plugin *VampEffectsModule::FindPlugin(const wxString & path,
|
|||
Plugin *vp = PluginLoader::getInstance()->loadPlugin(key, 48000); // rate doesn't matter here
|
||||
if (!vp)
|
||||
{
|
||||
return false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// We limit the listed plugin outputs to those whose results can
|
||||
|
|
|
@ -589,6 +589,12 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam
|
|||
case AV_SAMPLE_FMT_FLTP:
|
||||
((float*)(frame->data[ch]))[i] = audio_samples[ch + i*avctx->channels] / 32767.;
|
||||
break;
|
||||
case AV_SAMPLE_FMT_NONE:
|
||||
case AV_SAMPLE_FMT_DBL:
|
||||
case AV_SAMPLE_FMT_DBLP:
|
||||
case AV_SAMPLE_FMT_NB:
|
||||
wxASSERT(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,6 +215,9 @@ void MyFLACFile::metadata_callback(const FLAC__StreamMetadata *metadata)
|
|||
case FLAC__METADATA_TYPE_PICTURE: // ignore pictures
|
||||
case FLAC__METADATA_TYPE_UNDEFINED: // do nothing with this either
|
||||
break;
|
||||
|
||||
case FLAC__MAX_METADATA_TYPE: // suppress compiler warning
|
||||
wxASSERT(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -296,7 +299,7 @@ ImportFileHandle *FLACImportPlugin::Open(const wxString &filename)
|
|||
int cnt;
|
||||
wxFile binaryFile;
|
||||
if (!binaryFile.Open(filename)) {
|
||||
return false; // File not found
|
||||
return nullptr; // File not found
|
||||
}
|
||||
|
||||
#ifdef USE_LIBID3TAG
|
||||
|
@ -313,7 +316,7 @@ ImportFileHandle *FLACImportPlugin::Open(const wxString &filename)
|
|||
|
||||
if (cnt == wxInvalidOffset || strncmp(buf, FLAC_HEADER, 4) != 0) {
|
||||
// File is not a FLAC file
|
||||
return false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Open the file for import
|
||||
|
@ -322,7 +325,7 @@ ImportFileHandle *FLACImportPlugin::Open(const wxString &filename)
|
|||
bool success = handle->Init();
|
||||
if (!success) {
|
||||
delete handle;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return handle;
|
||||
|
@ -476,6 +479,7 @@ int FLACImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
if(!useOD)
|
||||
res = (mFile->process_until_end_of_stream() != 0);
|
||||
#endif
|
||||
wxUnusedVar(res);
|
||||
|
||||
//add the task to the ODManager
|
||||
if(useOD)
|
||||
|
|
|
@ -173,6 +173,12 @@ wxString OggImportPlugin::GetPluginFormatDescription()
|
|||
|
||||
ImportFileHandle *OggImportPlugin::Open(const wxString &filename)
|
||||
{
|
||||
// Suppress some compiler warnings about unused global variables in the library header
|
||||
wxUnusedVar(OV_CALLBACKS_DEFAULT);
|
||||
wxUnusedVar(OV_CALLBACKS_NOCLOSE);
|
||||
wxUnusedVar(OV_CALLBACKS_STREAMONLY);
|
||||
wxUnusedVar(OV_CALLBACKS_STREAMONLY_NOCLOSE);
|
||||
|
||||
OggVorbis_File *vorbisFile = new OggVorbis_File;
|
||||
wxFFile *file = new wxFFile(filename, wxT("rb"));
|
||||
|
||||
|
|
|
@ -79,6 +79,9 @@ void ODFLACFile::metadata_callback(const FLAC__StreamMetadata *metadata)
|
|||
case FLAC__METADATA_TYPE_PICTURE: // ignore pictures
|
||||
case FLAC__METADATA_TYPE_UNDEFINED: // do nothing with this either
|
||||
break;
|
||||
|
||||
case FLAC__MAX_METADATA_TYPE: // suppress compiler warning
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -204,8 +204,6 @@ PrefsDialog::PrefsDialog
|
|||
wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
, mFactories(factories)
|
||||
, mCategories(NULL)
|
||||
, mUniquePage(NULL)
|
||||
, mTitlePrefix(titlePrefix)
|
||||
{
|
||||
wxASSERT(factories.size() > 0);
|
||||
|
|
|
@ -76,8 +76,8 @@ class PrefsDialog /* not final */ : public wxDialog
|
|||
|
||||
private:
|
||||
void RecordExpansionState();
|
||||
wxTreebook *mCategories;
|
||||
PrefsPanel *mUniquePage;
|
||||
wxTreebook *mCategories{};
|
||||
PrefsPanel *mUniquePage{};
|
||||
Factories &mFactories;
|
||||
const wxString mTitlePrefix;
|
||||
|
||||
|
|
|
@ -57,10 +57,6 @@ SpectrogramSettings::Globals
|
|||
}
|
||||
|
||||
SpectrogramSettings::SpectrogramSettings()
|
||||
: hFFT(0)
|
||||
, window(0)
|
||||
, dWindow(0)
|
||||
, tWindow(0)
|
||||
{
|
||||
LoadPrefs();
|
||||
}
|
||||
|
@ -93,10 +89,10 @@ SpectrogramSettings::SpectrogramSettings(const SpectrogramSettings &other)
|
|||
#endif
|
||||
|
||||
// Do not copy these!
|
||||
, hFFT(0)
|
||||
, window(0)
|
||||
, tWindow(0)
|
||||
, dWindow(0)
|
||||
, hFFT{}
|
||||
, window{}
|
||||
, tWindow{}
|
||||
, dWindow{}
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -139,12 +139,12 @@ public:
|
|||
|
||||
#ifdef EXPERIMENTAL_USE_REALFFTF
|
||||
// Variables used for computing the spectrum
|
||||
mutable FFTParam *hFFT;
|
||||
mutable float *window;
|
||||
mutable FFTParam *hFFT{};
|
||||
mutable float *window{};
|
||||
|
||||
// Two other windows for computing reassigned spectrogram
|
||||
mutable float *tWindow; // Window times time parameter
|
||||
mutable float *dWindow; // Derivative of window
|
||||
mutable float *tWindow{}; // Window times time parameter
|
||||
mutable float *dWindow{}; // Derivative of window
|
||||
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -70,10 +70,8 @@ WaveformSettings& WaveformSettings::defaults()
|
|||
return instance;
|
||||
}
|
||||
|
||||
bool WaveformSettings::Validate(bool quiet)
|
||||
bool WaveformSettings::Validate(bool /* quiet */)
|
||||
{
|
||||
quiet;
|
||||
|
||||
scaleType = ScaleType(
|
||||
std::max(0, std::min(int(stNumScaleTypes) - 1, int(scaleType)))
|
||||
);
|
||||
|
|
|
@ -889,6 +889,7 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
|
|||
wt->Clear(t1, t0);
|
||||
bool bResult = wt->Paste(t1, newTrack);
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
wxUnusedVar(bResult);
|
||||
delete newTrack;
|
||||
}
|
||||
newRecordingTracks.Add(wt);
|
||||
|
|
|
@ -237,6 +237,11 @@ Meter::Meter(AudacityProject *project,
|
|||
mIcon(NULL),
|
||||
mAccSilent(false)
|
||||
{
|
||||
// Suppress warnings about the header file
|
||||
wxUnusedVar(SpeakerMenu_xpm);
|
||||
wxUnusedVar(MicMenu_xpm);
|
||||
wxUnusedVar(PrefStyles);
|
||||
|
||||
mStyle = mDesiredStyle;
|
||||
|
||||
mIsFocused = false;
|
||||
|
|
Loading…
Reference in New Issue