Previous fix didn't produce the same results as 2.0.6, this one
should.
This commit is contained in:
Leland Lucius 2015-08-16 00:15:55 -05:00
parent 7f7ff3c749
commit b31aad8323
2 changed files with 8 additions and 3 deletions

View File

@ -1282,6 +1282,11 @@ bool Effect::Process()
CopyInputTracks(Track::All);
bool bGoodResult = true;
// It's possible that the number of channels the effect expects changed based on
// the parameters (the Audacity Reverb effect does when the stereo width is 0).
mNumAudioIn = GetAudioInCount();
mNumAudioOut = GetAudioOutCount();
mPass = 1;
if (InitPass1())
{

View File

@ -151,12 +151,12 @@ EffectType EffectReverb::GetType()
int EffectReverb::GetAudioInCount()
{
return 2;
return mParams.mStereoWidth ? 2 : 1;
}
int EffectReverb::GetAudioOutCount()
{
return 2;
return mParams.mStereoWidth ? 2 : 1;
}
#define BLOCK 16384
@ -230,7 +230,7 @@ sampleCount EffectReverb::ProcessBlock(float **inBlock, float **outBlock, sample
reverb_process(&mP[c].reverb, len);
}
if (mNumChans == 2 && mParams.mStereoWidth)
if (mNumChans == 2)
{
for (sampleCount i = 0; i < len; i++)
{