1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-26 00:58:37 +02:00

Fix bug 1566 differently (signed/unsigned comparison)

This commit is contained in:
Paul Licameli 2017-03-15 13:16:52 -04:00
parent 4744f5cc5e
commit ac246d0468
2 changed files with 6 additions and 6 deletions

View File

@ -942,7 +942,7 @@ bool NyquistEffect::ProcessOne()
float maxPeakLevel = 0.0; // Deprecated as of 2.1.3 float maxPeakLevel = 0.0; // Deprecated as of 2.1.3
wxString clips, peakString, rmsString; wxString clips, peakString, rmsString;
for (int i = 0; i < mCurNumChannels; i++) { for (size_t i = 0; i < mCurNumChannels; i++) {
auto ca = mCurTrack[i]->SortedClipArray(); auto ca = mCurTrack[i]->SortedClipArray();
float maxPeak = 0.0; float maxPeak = 0.0;
@ -1019,7 +1019,7 @@ bool NyquistEffect::ProcessOne()
nyx_set_audio_params(mCurTrack[0]->GetRate(), curLen); nyx_set_audio_params(mCurTrack[0]->GetRate(), curLen);
nyx_set_input_audio(StaticGetCallback, (void *)this, nyx_set_input_audio(StaticGetCallback, (void *)this,
mCurNumChannels, (int)mCurNumChannels,
curLen, mCurTrack[0]->GetRate()); curLen, mCurTrack[0]->GetRate());
} }
@ -1200,7 +1200,7 @@ bool NyquistEffect::ProcessOne()
} }
int outChannels = nyx_get_audio_num_channels(); int outChannels = nyx_get_audio_num_channels();
if (outChannels > mCurNumChannels) { if (outChannels > (int)mCurNumChannels) {
wxMessageBox(_("Nyquist returned too many audio channels.\n"), wxMessageBox(_("Nyquist returned too many audio channels.\n"),
wxT("Nyquist"), wxT("Nyquist"),
wxOK | wxCENTRE, mUIParent); wxOK | wxCENTRE, mUIParent);
@ -1225,7 +1225,7 @@ bool NyquistEffect::ProcessOne()
for (i = 0; i < outChannels; i++) { for (i = 0; i < outChannels; i++) {
sampleFormat format = mCurTrack[i]->GetSampleFormat(); sampleFormat format = mCurTrack[i]->GetSampleFormat();
if (outChannels == mCurNumChannels) { if (outChannels == (int)mCurNumChannels) {
rate = mCurTrack[i]->GetRate(); rate = mCurTrack[i]->GetRate();
} }
@ -1261,7 +1261,7 @@ bool NyquistEffect::ProcessOne()
for (i = 0; i < mCurNumChannels; i++) { for (i = 0; i < mCurNumChannels; i++) {
WaveTrack *out; WaveTrack *out;
if (outChannels == mCurNumChannels) { if (outChannels == (int)mCurNumChannels) {
out = mOutputTrack[i].get(); out = mOutputTrack[i].get();
} }
else { else {

View File

@ -205,7 +205,7 @@ private:
int mVersion; int mVersion;
NyqControlArray mControls; NyqControlArray mControls;
int mCurNumChannels; // See bug 1566 unsigned mCurNumChannels;
WaveTrack *mCurTrack[2]; WaveTrack *mCurTrack[2];
sampleCount mCurStart[2]; sampleCount mCurStart[2];
sampleCount mCurLen; sampleCount mCurLen;