1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 08:29:27 +02:00

Fixing some typos and makes effects added to rack OFF by default

That's going to solve some doubling up of effects while playing I think.
This commit is contained in:
lllucius 2014-10-29 03:46:53 +00:00
parent 7f8270a5c8
commit d48f03518f
4 changed files with 15 additions and 13 deletions

View File

@ -774,10 +774,10 @@ bool Effect::ProcessTrack(int count,
// samples to the output track. // samples to the output track.
// //
// Upon return from the effect, the output samples are "moved to the left" by // 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. // 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 // 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 // effect with an empty input buffer until the effect has had a chance to
// return all of the remaining delayed samples. // 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 // "ls" and "rs" serve as the input sample index for the left and
// right channels when processing the input samples. If we flip // 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. // for the progress display.
inLeftPos += curBlockSize; inLeftPos += curBlockSize;
inRightPos += curBlockSize; inRightPos += curBlockSize;

View File

@ -454,6 +454,8 @@ void EffectManager::RealtimeProcessMono(float *buffer, sampleCount numSamples)
return; return;
} }
// We only ever have a single input channel
wxMilliClock_t start = wxGetLocalTimeMillis(); wxMilliClock_t start = wxGetLocalTimeMillis();
float *ib = (float *) alloca(sizeof(float) * numSamples); float *ib = (float *) alloca(sizeof(float) * numSamples);
@ -461,21 +463,21 @@ void EffectManager::RealtimeProcessMono(float *buffer, sampleCount numSamples)
memcpy(ib, buffer, sizeof(float) * numSamples); memcpy(ib, buffer, sizeof(float) * numSamples);
float *ibuf[1] = {ib}; float *ibuf = ib;
float *obuf[1] = {ob}; float *obuf = ob;
mRealtimeMutex.Lock(); mRealtimeMutex.Lock();
for (int i = 0; i < mRealtimeCount; i++) for (int i = 0; i < mRealtimeCount; i++)
{ {
mRealtimeEffects[i]->RealtimeProcess(ibuf, obuf, numSamples); mRealtimeEffects[i]->RealtimeProcess(&ibuf, &obuf, numSamples);
float *tbuf[1] = {ibuf[0]}; float *tbuf = ibuf;
ibuf[0] = obuf[0]; ibuf = obuf;
obuf[0] = tbuf[0]; obuf = tbuf;
} }
mRealtimeMutex.Unlock(); mRealtimeMutex.Unlock();
memcpy(buffer, ibuf[0], sizeof(float) * numSamples); memcpy(buffer, ibuf, sizeof(float) * numSamples);
mRealtimeLatency = (int) (wxGetLocalTimeMillis() - start).GetValue(); mRealtimeLatency = (int) (wxGetLocalTimeMillis() - start).GetValue();
} }

View File

@ -35,7 +35,7 @@ public:
EffectRack(); EffectRack();
virtual ~EffectRack(); virtual ~EffectRack();
void Add(Effect *effect, bool active = true, bool favorite = false); void Add(Effect *effect, bool active = false, bool favorite = false);
private: private:

View File

@ -420,7 +420,7 @@ wxArrayString VSTEffectsModule::FindPlugins(PluginManagerInterface & pm)
pathList.push_back(dpath); pathList.push_back(dpath);
// Recursively scan for all DLLs // Recursively scan for all DLLs
pm.FindFilesInPathList(wxT("*.dll"), pathList, files); pm.FindFilesInPathList(wxT("*.dll"), pathList, files, true);
#else #else
@ -437,7 +437,7 @@ wxArrayString VSTEffectsModule::FindPlugins(PluginManagerInterface & pm)
} }
// Recursively scan for all shared objects // Recursively scan for all shared objects
pm.FindFilesInPathList(wxT("*.so"), pathList, files); pm.FindFilesInPathList(wxT("*.so"), pathList, files, true);
#endif #endif