diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index 7f2dc9ca7..7aac82161 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -774,10 +774,10 @@ bool Effect::ProcessTrack(int count, // samples to the output track. // // Upon return from the effect, the output samples are "moved to the left" by - // the number of samples in the current latency setting, effectively removing the + // the number of samples in the current latency setting, effectively removing any // delay introduced by the effect. // - // At the same time the total number of delayed samples are gathered and when the + // At the same time the total number of delayed samples are gathered and when // there is no further input data to process, the loop continues to call the // effect with an empty input buffer until the effect has had a chance to // return all of the remaining delayed samples. @@ -968,7 +968,7 @@ bool Effect::ProcessTrack(int count, // "ls" and "rs" serve as the input sample index for the left and // right channels when processing the input samples. If we flip - // over to processing delayed samples, the simply become counters + // over to processing delayed samples, they simply become counters // for the progress display. inLeftPos += curBlockSize; inRightPos += curBlockSize; diff --git a/src/effects/EffectManager.cpp b/src/effects/EffectManager.cpp index f87eeccc3..ff6eb6a59 100644 --- a/src/effects/EffectManager.cpp +++ b/src/effects/EffectManager.cpp @@ -454,6 +454,8 @@ void EffectManager::RealtimeProcessMono(float *buffer, sampleCount numSamples) return; } + // We only ever have a single input channel + wxMilliClock_t start = wxGetLocalTimeMillis(); float *ib = (float *) alloca(sizeof(float) * numSamples); @@ -461,21 +463,21 @@ void EffectManager::RealtimeProcessMono(float *buffer, sampleCount numSamples) memcpy(ib, buffer, sizeof(float) * numSamples); - float *ibuf[1] = {ib}; - float *obuf[1] = {ob}; + float *ibuf = ib; + float *obuf = ob; mRealtimeMutex.Lock(); for (int i = 0; i < mRealtimeCount; i++) { - mRealtimeEffects[i]->RealtimeProcess(ibuf, obuf, numSamples); + mRealtimeEffects[i]->RealtimeProcess(&ibuf, &obuf, numSamples); - float *tbuf[1] = {ibuf[0]}; - ibuf[0] = obuf[0]; - obuf[0] = tbuf[0]; + float *tbuf = ibuf; + ibuf = obuf; + obuf = tbuf; } mRealtimeMutex.Unlock(); - memcpy(buffer, ibuf[0], sizeof(float) * numSamples); + memcpy(buffer, ibuf, sizeof(float) * numSamples); mRealtimeLatency = (int) (wxGetLocalTimeMillis() - start).GetValue(); } diff --git a/src/effects/EffectRack.h b/src/effects/EffectRack.h index f4fb1b8bf..1f557f61f 100644 --- a/src/effects/EffectRack.h +++ b/src/effects/EffectRack.h @@ -35,7 +35,7 @@ public: EffectRack(); virtual ~EffectRack(); - void Add(Effect *effect, bool active = true, bool favorite = false); + void Add(Effect *effect, bool active = false, bool favorite = false); private: diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp index c8c721e7f..158a603f7 100644 --- a/src/effects/VST/VSTEffect.cpp +++ b/src/effects/VST/VSTEffect.cpp @@ -420,7 +420,7 @@ wxArrayString VSTEffectsModule::FindPlugins(PluginManagerInterface & pm) pathList.push_back(dpath); // Recursively scan for all DLLs - pm.FindFilesInPathList(wxT("*.dll"), pathList, files); + pm.FindFilesInPathList(wxT("*.dll"), pathList, files, true); #else @@ -437,7 +437,7 @@ wxArrayString VSTEffectsModule::FindPlugins(PluginManagerInterface & pm) } // Recursively scan for all shared objects - pm.FindFilesInPathList(wxT("*.so"), pathList, files); + pm.FindFilesInPathList(wxT("*.so"), pathList, files, true); #endif