mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
Fix most of the compile warnings I get on Linux (but not the Audacity Logo
xpm stuff or a few things in FFMPEG export)
This commit is contained in:
parent
e801b39943
commit
a55c20be66
@ -330,7 +330,7 @@ void RealFFT(int NumSamples, float *RealIn, float *RealOut, float *ImagOut)
|
||||
|
||||
delete[]tmpReal;
|
||||
delete[]tmpImag;
|
||||
#endif EXPERIMENTAL_USE_REALFFTF
|
||||
#endif //EXPERIMENTAL_USE_REALFFTF
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_USE_REALFFTF
|
||||
|
@ -245,11 +245,9 @@ void Lyrics::Measure(wxDC *dc) // only for drawn text
|
||||
{
|
||||
this->SetDrawnFont(dc);
|
||||
int width = 0, height = 0;
|
||||
int maxLineWidth = 0; // only for kHighlightLyrics
|
||||
|
||||
const int kIndent = 4;
|
||||
int x = 2*kIndent;
|
||||
int y = kIndent;
|
||||
|
||||
unsigned int i;
|
||||
for(i=0; i<mSyllables.GetCount(); i++) {
|
||||
|
@ -376,7 +376,7 @@ void MixerTrackCluster::UpdateMeter(const double t0, const double t1)
|
||||
const double dFrameInterval = (t1 - t0) / (double)nFramesPerBuffer;
|
||||
double dFrameT0 = t0;
|
||||
double dFrameT1 = t0 + dFrameInterval;
|
||||
unsigned int i = 0;
|
||||
int i = 0;
|
||||
while (bSuccess && (i < nFramesPerBuffer))
|
||||
{
|
||||
bSuccess &=
|
||||
@ -595,7 +595,6 @@ MusicalInstrument::MusicalInstrument(wxBitmap* pBitmap, const wxString strXPMfil
|
||||
{
|
||||
mBitmap = pBitmap;
|
||||
|
||||
size_t nFirstCharIndex = 0;
|
||||
int nUnderscoreIndex;
|
||||
wxString strFilename = strXPMfilename;
|
||||
strFilename.MakeLower(); // Make sure, so we don't have to do case insensitive comparison.
|
||||
|
@ -78,7 +78,7 @@ Track *NoteTrack::Duplicate()
|
||||
if (mSeq) {
|
||||
assert(!mSerializationBuffer);
|
||||
// serialize from this to duplicate's mSerializationBuffer
|
||||
mSeq->serialize(&duplicate->mSerializationBuffer,
|
||||
mSeq->serialize((void**)&duplicate->mSerializationBuffer,
|
||||
&duplicate->mSerializationLength);
|
||||
} else if (mSerializationBuffer) {
|
||||
assert(!mSeq);
|
||||
|
@ -91,7 +91,7 @@ class AUDACITY_DLL_API NoteTrack:public Track {
|
||||
// mSeq variable. (TrackArtist should check to make sure this
|
||||
// flip-flop from mSeq to mSerializationBuffer happened an
|
||||
// even number of times, otherwise mSeq will be NULL).
|
||||
void *mSerializationBuffer; // NULL means no buffer
|
||||
char *mSerializationBuffer; // NULL means no buffer
|
||||
long mSerializationLength;
|
||||
double mLen;
|
||||
|
||||
|
@ -663,7 +663,6 @@ void GetNextWindowPlacement(wxRect *nextRect, bool *pMaximized, bool *pIconized)
|
||||
nextRect->y -= inc;
|
||||
bottomRight = nextRect->GetBottomRight();
|
||||
if (bottomRight.y > screenRect.GetBottom()) {
|
||||
int newheight = screenRect.GetHeight() - nextRect->GetBottom();
|
||||
nextRect->SetBottom(screenRect.GetBottom());
|
||||
}
|
||||
}
|
||||
@ -724,7 +723,6 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
||||
const wxSize & size)
|
||||
: wxFrame(parent, id, wxT("Audacity"), pos, size),
|
||||
mLastPlayMode(normalPlay),
|
||||
mFreqWindow(NULL),
|
||||
mRate((double) gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), AudioIO::GetOptimalSupportedSampleRate())),
|
||||
mDefaultFormat((sampleFormat) gPrefs->
|
||||
Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample)),
|
||||
@ -742,6 +740,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
||||
mMixerBoard(NULL),
|
||||
mMixerBoardFrame(NULL),
|
||||
#endif
|
||||
mFreqWindow(NULL),
|
||||
mToolManager(NULL),
|
||||
mAudioIOToken(-1),
|
||||
mIsDeleting(false),
|
||||
|
@ -1489,7 +1489,6 @@ void TrackArtist::DrawClipSpectrum(WaveTrack *track,
|
||||
double sel0 = viewInfo->sel0;
|
||||
double sel1 = viewInfo->sel1;
|
||||
|
||||
sampleCount numSamples = clip->GetNumSamples();
|
||||
double tOffset = clip->GetOffset();
|
||||
double rate = clip->GetRate();
|
||||
double sps = 1./rate;
|
||||
@ -1657,10 +1656,11 @@ void TrackArtist::DrawClipSpectrum(WaveTrack *track,
|
||||
|
||||
const float
|
||||
// e=exp(1.0f),
|
||||
log2=log(2.0f),
|
||||
f=rate/2.0f/half,
|
||||
lmin=log(float(minFreq)),
|
||||
lmax=log(float(maxFreq)),
|
||||
#ifdef EXPERIMENTAL_FIND_NOTES
|
||||
log2=log(2.0f),
|
||||
#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
|
||||
lmins=log(float(minFreq)/(mFftSkipPoints+1)),
|
||||
lmaxs=log(float(maxFreq)/(mFftSkipPoints+1)),
|
||||
@ -1668,12 +1668,15 @@ void TrackArtist::DrawClipSpectrum(WaveTrack *track,
|
||||
lmins=lmin,
|
||||
lmaxs=lmax,
|
||||
#endif //EXPERIMENTAL_FFT_SKIP_POINTS
|
||||
scale=lmax-lmin,
|
||||
scale2=(lmax-lmin)/log2,
|
||||
lmin2=lmin/log2 /*,
|
||||
#endif //EXPERIMENTAL_FIND_NOTES
|
||||
scale=lmax-lmin /*,
|
||||
expo=exp(scale)*/ ;
|
||||
|
||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||
const float
|
||||
scale2=(lmax-lmin)/log2,
|
||||
lmin2=lmin/log2;
|
||||
|
||||
bool *yGrid;
|
||||
yGrid=new bool[mid.height];
|
||||
for (int y = 0; y < mid.height; y++) {
|
||||
@ -2293,7 +2296,7 @@ void TrackArtist::DrawNoteTrack(NoteTrack *track,
|
||||
//for every event
|
||||
Alg_event_ptr evt;
|
||||
printf ("go time\n");
|
||||
while (evt = iterator.next()) {
|
||||
while ( (evt = iterator.next()) ) {
|
||||
|
||||
//printf ("one note");
|
||||
|
||||
|
@ -42,9 +42,9 @@ ODDecodeBlockFile::ODDecodeBlockFile(wxFileName baseFileName,wxFileName audioFil
|
||||
sampleCount aliasLen, int aliasChannel,unsigned int decodeType):
|
||||
SimpleBlockFile(baseFileName,NULL,aliasLen,floatSample,true,true), //floatSample has no effect. last two bools - bypass writing of blockfile and cache
|
||||
|
||||
mType(decodeType),
|
||||
mAliasStart(aliasStart),
|
||||
mAliasChannel(aliasChannel),
|
||||
mType(decodeType)
|
||||
mAliasChannel(aliasChannel)
|
||||
{
|
||||
mDataAvailable=false;
|
||||
mAudioFileName = audioFileName;
|
||||
@ -56,9 +56,9 @@ ODDecodeBlockFile::ODDecodeBlockFile(wxFileName existingFile, wxFileName audioFi
|
||||
float min, float max, float rms, bool dataAvailable):
|
||||
SimpleBlockFile(existingFile,aliasLen,min,max,rms),
|
||||
|
||||
mType(decodeType),
|
||||
mAliasStart(aliasStart),
|
||||
mAliasChannel(aliasChannel),
|
||||
mType(decodeType)
|
||||
mAliasChannel(aliasChannel)
|
||||
{
|
||||
mDataAvailable=dataAvailable;
|
||||
mAudioFileName = audioFileName;
|
||||
|
@ -455,8 +455,8 @@ void CommandManager::AddCheck(const wxChar *name,
|
||||
const wxChar *label,
|
||||
CommandFunctor *callback,
|
||||
int checkmark,
|
||||
int flags,
|
||||
int mask)
|
||||
unsigned int flags,
|
||||
unsigned int mask)
|
||||
{
|
||||
AddItem(name, label, callback, wxT(""), flags, mask, checkmark);
|
||||
}
|
||||
@ -464,8 +464,8 @@ void CommandManager::AddCheck(const wxChar *name,
|
||||
void CommandManager::AddItem(const wxChar *name,
|
||||
const wxChar *label,
|
||||
CommandFunctor *callback,
|
||||
int flags,
|
||||
int mask)
|
||||
unsigned int flags,
|
||||
unsigned int mask)
|
||||
{
|
||||
AddItem(name, label, callback, wxT(""), flags, mask);
|
||||
}
|
||||
@ -474,8 +474,8 @@ void CommandManager::AddItem(const wxChar *name,
|
||||
const wxChar *label_in,
|
||||
CommandFunctor *callback,
|
||||
const wxChar *accel,
|
||||
int flags,
|
||||
int mask,
|
||||
unsigned int flags,
|
||||
unsigned int mask,
|
||||
int checkmark)
|
||||
{
|
||||
wxString label(label_in);
|
||||
@ -582,8 +582,8 @@ void CommandManager::AddItemList(wxString name, wxArrayString labels,
|
||||
void CommandManager::AddCommand(const wxChar *name,
|
||||
const wxChar *label,
|
||||
CommandFunctor *callback,
|
||||
int flags,
|
||||
int mask)
|
||||
unsigned int flags,
|
||||
unsigned int mask)
|
||||
{
|
||||
AddCommand(name, label, callback, wxT(""), flags, mask);
|
||||
}
|
||||
@ -592,8 +592,8 @@ void CommandManager::AddCommand(const wxChar *name,
|
||||
const wxChar *label_in,
|
||||
CommandFunctor *callback,
|
||||
const wxChar *accel,
|
||||
int flags,
|
||||
int mask)
|
||||
unsigned int flags,
|
||||
unsigned int mask)
|
||||
{
|
||||
wxString label(label_in);
|
||||
label += wxT("\t");
|
||||
|
@ -106,21 +106,21 @@ class AUDACITY_DLL_API CommandManager: public XMLTagHandler
|
||||
const wxChar *label,
|
||||
CommandFunctor *callback,
|
||||
int checkmark,
|
||||
int flags,
|
||||
int mask);
|
||||
unsigned int flags,
|
||||
unsigned int mask);
|
||||
|
||||
void AddItem(const wxChar *name,
|
||||
const wxChar *label,
|
||||
CommandFunctor *callback,
|
||||
int flags = NoFlagsSpecifed,
|
||||
int mask = NoFlagsSpecifed);
|
||||
unsigned int flags = NoFlagsSpecifed,
|
||||
unsigned int mask = NoFlagsSpecifed);
|
||||
|
||||
void AddItem(const wxChar *name,
|
||||
const wxChar *label_in,
|
||||
CommandFunctor *callback,
|
||||
const wxChar *accel,
|
||||
int flags = NoFlagsSpecifed,
|
||||
int mask = NoFlagsSpecifed,
|
||||
unsigned int flags = NoFlagsSpecifed,
|
||||
unsigned int mask = NoFlagsSpecifed,
|
||||
int checkmark = -1);
|
||||
|
||||
void AddSeparator();
|
||||
@ -130,15 +130,15 @@ class AUDACITY_DLL_API CommandManager: public XMLTagHandler
|
||||
void AddCommand(const wxChar *name,
|
||||
const wxChar *label,
|
||||
CommandFunctor *callback,
|
||||
int flags = NoFlagsSpecifed,
|
||||
int mask = NoFlagsSpecifed);
|
||||
unsigned int flags = NoFlagsSpecifed,
|
||||
unsigned int mask = NoFlagsSpecifed);
|
||||
|
||||
void AddCommand(const wxChar *name,
|
||||
const wxChar *label,
|
||||
CommandFunctor *callback,
|
||||
const wxChar *accel,
|
||||
int flags = NoFlagsSpecifed,
|
||||
int mask = NoFlagsSpecifed);
|
||||
unsigned int flags = NoFlagsSpecifed,
|
||||
unsigned int mask = NoFlagsSpecifed);
|
||||
|
||||
//
|
||||
// Command masks
|
||||
|
@ -57,11 +57,11 @@ bool GetProjectInfoCommand::Apply(CommandExecutionContext context)
|
||||
}
|
||||
else if (mode.IsSameAs(wxT("FocusedTrackID")))
|
||||
{
|
||||
int FocusedTrackID = SendFocusedTrackIndex(context);
|
||||
SendFocusedTrackIndex(context);
|
||||
}
|
||||
else if (mode.IsSameAs(wxT("NumberOfTracks")))
|
||||
{
|
||||
int NumberOfTracks = SendNumberOfTracks(context);
|
||||
SendNumberOfTracks(context);
|
||||
}
|
||||
else if (mode.IsSameAs(wxT("SelectedTracks")))
|
||||
{
|
||||
|
@ -247,7 +247,6 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
|
||||
|
||||
if (mForegroundEndT == NULL)
|
||||
{
|
||||
AudacityProject *p = GetActiveProject();
|
||||
mForegroundEndT = new
|
||||
TimeTextCtrl(this,
|
||||
ID_FOREGROUNDEND_T,
|
||||
@ -271,7 +270,6 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
|
||||
S.AddFixedText(_("Background:"));
|
||||
if (mBackgroundStartT == NULL)
|
||||
{
|
||||
AudacityProject *p = GetActiveProject();
|
||||
mBackgroundStartT = new
|
||||
TimeTextCtrl(this,
|
||||
ID_BACKGROUNDSTART_T,
|
||||
@ -289,7 +287,6 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
|
||||
|
||||
if (mBackgroundEndT == NULL)
|
||||
{
|
||||
AudacityProject *p = GetActiveProject();
|
||||
mBackgroundEndT = new
|
||||
TimeTextCtrl(this,
|
||||
ID_BACKGROUNDEND_T,
|
||||
|
@ -144,8 +144,6 @@ bool EffectFindClipping::ProcessOne(LabelTrack * l,
|
||||
|
||||
float *ptr = buffer;
|
||||
|
||||
bool first = true;
|
||||
|
||||
sampleCount startrun = 0;
|
||||
sampleCount stoprun = 0;
|
||||
sampleCount samps = 0;
|
||||
|
@ -188,11 +188,8 @@ bool EffectSBSMS::Process()
|
||||
for (t = iter.First(); t->GetKind() != Track::Wave; t = iter.Next());
|
||||
if (!t)
|
||||
return false;
|
||||
WaveTrack* leftTrack = (WaveTrack*)t;
|
||||
WaveTrack* saveLeft = leftTrack;
|
||||
mCurTrackNum = 0;
|
||||
|
||||
double len = leftTrack->GetEndTime() - leftTrack->GetStartTime();
|
||||
double maxDuration = 0.0;
|
||||
|
||||
if(rateStart == rateEnd)
|
||||
@ -347,7 +344,6 @@ bool EffectSBSMS::Process()
|
||||
long pos = 0;
|
||||
long lastPos = 0;
|
||||
long ret = 0;
|
||||
bool stopped = false;
|
||||
while(lastPos<samplesToProcess) {
|
||||
ret = sbsms_pre_analyze(&samplesCB,&si,rb.sbsmser);
|
||||
lastPos = pos;
|
||||
|
@ -54,8 +54,6 @@ bool EffectSoundTouch::Process()
|
||||
mCurTrackNum = 0;
|
||||
m_maxNewLength = 0.0;
|
||||
|
||||
double len = leftTrack->GetEndTime() - leftTrack->GetStartTime();
|
||||
|
||||
// we only do a "group change" in the first selected track of the group.
|
||||
// ClearAndPaste has a call to Paste that does changes to the group tracks
|
||||
bool first = true;
|
||||
|
@ -57,7 +57,7 @@ wxString EffectToneGen::GetEffectDescription() {
|
||||
// Note: This is useful only after values have been set.
|
||||
/// \todo update to include *all* chirp parameters??
|
||||
const wxChar* waveformNames[] = {wxT("sine"), wxT("square"), wxT("sawtooth"), wxT("square, no alias")};
|
||||
const wxChar* interpolationNames[] = {wxT("linear"), wxT("logarithmic")};
|
||||
//const wxChar* interpolationNames[] = {wxT("linear"), wxT("logarithmic")};
|
||||
return wxString::Format(_("Applied effect: Generate %s wave %s, frequency = %.2f Hz, amplitude = %.2f, %.6lf seconds"),
|
||||
waveformNames[waveform], mbChirp ? wxT("chirp") : wxT("tone"), frequency[0], amplitude[0], mDuration);
|
||||
}
|
||||
|
@ -180,10 +180,10 @@ void LoadLadspaPlugins()
|
||||
wxSortedArrayString uniq;
|
||||
wxString pathVar;
|
||||
unsigned int i;
|
||||
EffectManager& em = EffectManager::Get();
|
||||
|
||||
#if defined(USE_LIBLRDF) && defined(EFFECT_CATEGORIES)
|
||||
|
||||
EffectManager& em = EffectManager::Get();
|
||||
wxArrayString rdfPathList;
|
||||
wxString rdfPathVar;
|
||||
wxArrayString rdfFiles;
|
||||
|
@ -473,7 +473,7 @@ VampEffectDialog::VampEffectDialog(VampEffect *effect,
|
||||
for (size_t i = 0; i < mParameters[p].valueNames.size(); ++i) {
|
||||
wxString choice = wxString
|
||||
(mParameters[p].valueNames[i].c_str(), wxConvISO8859_1);
|
||||
if (int(value - mParameters[p].minValue + 0.5) == i) {
|
||||
if (size_t(value - mParameters[p].minValue + 0.5) == i) {
|
||||
selected = choice;
|
||||
}
|
||||
choices.Add(choice);
|
||||
@ -707,7 +707,7 @@ void VampEffectDialog::UpdateFromPlugin()
|
||||
for (size_t i = 0; i < mParameters[p].valueNames.size(); ++i) {
|
||||
wxString choice = wxString
|
||||
(mParameters[p].valueNames[i].c_str(), wxConvISO8859_1);
|
||||
if (int(value - mParameters[p].minValue + 0.5) == i) {
|
||||
if (size_t(value - mParameters[p].minValue + 0.5) == i) {
|
||||
selected = choice;
|
||||
break;
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ int ExportCL::Export(AudacityProject *project,
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
|
||||
ShuttleGui S(&dlg, eIsCreating);
|
||||
wxTextCtrl *tc = S.AddTextWindow(output);
|
||||
S.AddTextWindow(output);
|
||||
S.StartHorizontalLay(wxALIGN_CENTER, false);
|
||||
{
|
||||
S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
|
||||
|
@ -242,7 +242,6 @@ int OggImportFileHandle::Import(TrackFactory *trackFactory, Track ***outTracks,
|
||||
}
|
||||
|
||||
vorbis_info *vi = ov_info(mVorbisFile, i);
|
||||
vorbis_comment *vc = ov_comment(mVorbisFile, i);
|
||||
|
||||
mChannels[i] = new WaveTrack *[vi->channels];
|
||||
|
||||
|
@ -27,12 +27,6 @@ extern "C" {
|
||||
|
||||
#define DESC _("FLAC files")
|
||||
|
||||
static const wxChar *exts[] =
|
||||
{
|
||||
wxT("flac"),
|
||||
wxT("flc")
|
||||
};
|
||||
|
||||
ODDecodeFlacTask::~ODDecodeFlacTask()
|
||||
{
|
||||
}
|
||||
|
@ -50,8 +50,8 @@ END_EVENT_TABLE()
|
||||
|
||||
DirectoriesPrefs::DirectoriesPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Directories")),
|
||||
mTempDir(NULL),
|
||||
mFreeSpace(NULL)
|
||||
mFreeSpace(NULL),
|
||||
mTempDir(NULL)
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "FileHistory.h"
|
||||
|
||||
FileHistory::FileHistory(int maxfiles, wxWindowID base)
|
||||
FileHistory::FileHistory(size_t maxfiles, wxWindowID base)
|
||||
{
|
||||
mMaxFiles = maxfiles;
|
||||
mIDBase = base;
|
||||
|
@ -22,7 +22,7 @@
|
||||
class AUDACITY_DLL_API FileHistory
|
||||
{
|
||||
public:
|
||||
FileHistory(int maxfiles = 9, wxWindowID idbase = wxID_FILE);
|
||||
FileHistory(size_t maxfiles = 9, wxWindowID idbase = wxID_FILE);
|
||||
virtual ~FileHistory();
|
||||
|
||||
void AddFileToHistory(const wxString & file, bool update = true);
|
||||
@ -40,7 +40,7 @@ class AUDACITY_DLL_API FileHistory
|
||||
wxString GetHistoryFile(size_t i) const;
|
||||
|
||||
private:
|
||||
int mMaxFiles;
|
||||
size_t mMaxFiles;
|
||||
wxWindowID mIDBase;
|
||||
|
||||
wxArrayPtrVoid mMenus;
|
||||
|
@ -630,8 +630,10 @@ void Meter::OnMeterUpdate(wxTimerEvent &evt)
|
||||
{
|
||||
MeterUpdateMsg msg;
|
||||
int numChanges = 0;
|
||||
#ifdef AUTOMATED_INPUT_LEVEL_ADJUSTMENT
|
||||
double maxPeak = 0.0;
|
||||
bool discarded = false;
|
||||
#endif
|
||||
// There may have been several update messages since the last
|
||||
// time we got to this function. Catch up to real-time by
|
||||
// popping them off until there are none left. It is necessary
|
||||
|
@ -1002,8 +1002,8 @@ ProgressDialog::ProgressDialog(const wxString & title, const wxString & message,
|
||||
wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE |
|
||||
wxFRAME_FLOAT_ON_PARENT),
|
||||
mDisable(NULL),
|
||||
mLastValue(0)
|
||||
mLastValue(0),
|
||||
mDisable(NULL)
|
||||
{
|
||||
wxBoxSizer *v;
|
||||
wxWindow *w;
|
||||
|
@ -1111,7 +1111,6 @@ void Ruler::Update( Envelope *speedEnv, long minSpeed, long maxSpeed )
|
||||
double hiLog = log10(mMax);
|
||||
double scale = mLength/(hiLog - loLog);
|
||||
int loDecade = (int) floor(loLog);
|
||||
int hiDecade = (int) ceil(hiLog);
|
||||
|
||||
int pos;
|
||||
double val;
|
||||
|
Loading…
x
Reference in New Issue
Block a user