Audacity  3.0.3
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
Effect Class Reference

Base class for many of the effects in Audacity. More...

#include <Effect.h>

Inheritance diagram for Effect:
[legend]
Collaboration diagram for Effect:
[legend]

Classes

class  AddedAnalysisTrack
 
class  ModifiedAnalysisTrack
 

Public Types

enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
using VetoDialogHook = bool(*)(wxDialog *)
 
- Public Types inherited from EffectClientInterface
using EffectDialogFactory = std::function< wxDialog *(wxWindow &parent, EffectHostInterface *, EffectUIClientInterface *) >
 

Public Member Functions

 Effect ()
 
virtual ~Effect ()
 
PluginPath GetPath () override
 
ComponentInterfaceSymbol GetSymbol () override
 
VendorSymbol GetVendor () override
 
wxString GetVersion () override
 
TranslatableString GetDescription () override
 
EffectType GetType () override
 
EffectFamilySymbol GetFamily () override
 
bool IsInteractive () override
 
bool IsDefault () override
 
bool IsLegacy () override
 
bool SupportsRealtime () override
 
bool SupportsAutomation () override
 
bool SetHost (EffectHostInterface *host) override
 
unsigned GetAudioInCount () override
 
unsigned GetAudioOutCount () override
 
int GetMidiInCount () override
 
int GetMidiOutCount () override
 
sampleCount GetLatency () override
 
size_t GetTailSize () override
 
void SetSampleRate (double rate) override
 
size_t SetBlockSize (size_t maxBlockSize) override
 
size_t GetBlockSize () const override
 
bool IsReady () override
 
bool ProcessInitialize (sampleCount totalLen, ChannelNames chanMap=NULL) override
 
bool ProcessFinalize () override
 
size_t ProcessBlock (float **inBlock, float **outBlock, size_t blockLen) override
 
bool RealtimeInitialize () override
 
bool RealtimeAddProcessor (unsigned numChannels, float sampleRate) override
 
bool RealtimeFinalize () override
 
bool RealtimeSuspend () override
 
bool RealtimeResume () override
 
bool RealtimeProcessStart () override
 
size_t RealtimeProcess (int group, float **inbuf, float **outbuf, size_t numSamples) override
 
bool RealtimeProcessEnd () override
 
bool ShowInterface (wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false) override
 
bool GetAutomationParameters (CommandParameters &parms) override
 
bool SetAutomationParameters (CommandParameters &parms) override
 
bool LoadUserPreset (const RegistryPath &name) override
 
bool SaveUserPreset (const RegistryPath &name) override
 
RegistryPaths GetFactoryPresets () override
 
bool LoadFactoryPreset (int id) override
 
bool LoadFactoryDefaults () override
 
void SetHostUI (EffectUIHostInterface *host) override
 
bool PopulateUI (ShuttleGui &S) final
 
bool IsGraphicalUI () override
 
bool ValidateUI () override
 
bool HideUI () override
 
bool CloseUI () override
 
bool CanExportPresets () override
 
void ExportPresets () override
 
void ImportPresets () override
 
bool HasOptions () override
 
void ShowOptions () override
 
double GetDefaultDuration () override
 
double GetDuration () override
 
NumericFormatSymbol GetDurationFormat () override
 
virtual NumericFormatSymbol GetSelectionFormat ()
 
void SetDuration (double duration) override
 
RegistryPath GetUserPresetsGroup (const RegistryPath &name) override
 
RegistryPath GetCurrentSettingsGroup () override
 
RegistryPath GetFactoryDefaultsGroup () override
 
virtual wxString GetSavedStateGroup ()
 
bool HasSharedConfigGroup (const RegistryPath &group) override
 
bool GetSharedConfigSubgroups (const RegistryPath &group, RegistryPaths &subgroups) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval={}) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, int &value, int defval=0) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, bool &value, bool defval=false) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, float &value, float defval=0.0) override
 
bool GetSharedConfig (const RegistryPath &group, const RegistryPath &key, double &value, double defval=0.0) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const wxString &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const int &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const bool &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const float &value) override
 
bool SetSharedConfig (const RegistryPath &group, const RegistryPath &key, const double &value) override
 
bool RemoveSharedConfigSubgroup (const RegistryPath &group) override
 
bool RemoveSharedConfig (const RegistryPath &group, const RegistryPath &key) override
 
bool HasPrivateConfigGroup (const RegistryPath &group) override
 
bool GetPrivateConfigSubgroups (const RegistryPath &group, RegistryPaths &paths) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval={}) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, int &value, int defval=0) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, bool &value, bool defval=false) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, float &value, float defval=0.0) override
 
bool GetPrivateConfig (const RegistryPath &group, const RegistryPath &key, double &value, double defval=0.0) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const wxString &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const int &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const bool &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const float &value) override
 
bool SetPrivateConfig (const RegistryPath &group, const RegistryPath &key, const double &value) override
 
bool RemovePrivateConfigSubgroup (const RegistryPath &group) override
 
bool RemovePrivateConfig (const RegistryPath &group, const RegistryPath &key) override
 
virtual PluginID GetID ()
 
virtual bool Startup (EffectClientInterface *client)
 
virtual bool Startup ()
 
virtual bool GetAutomationParameters (wxString &parms)
 
virtual bool SetAutomationParameters (const wxString &parms)
 
virtual RegistryPaths GetUserPresets ()
 
virtual bool HasCurrentSettings ()
 
virtual bool HasFactoryDefaults ()
 
virtual ManualPageID ManualPage ()
 
virtual FilePath HelpPage ()
 
virtual void SetUIFlags (unsigned flags)
 
virtual unsigned TestUIFlags (unsigned mask)
 
virtual bool IsBatchProcessing ()
 
virtual void SetBatchProcessing (bool start)
 
void SetPresetParameters (const wxArrayString *Names, const wxArrayString *Values)
 
bool DoEffect (double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, wxWindow *pParent=nullptr, const EffectDialogFactory &dialogFactory={})
 
bool Delegate (Effect &delegate, wxWindow &parent, const EffectDialogFactory &factory)
 
virtual bool IsHidden ()
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
- Public Member Functions inherited from EffectClientInterface
virtual ~EffectClientInterface ()
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
virtual EffectType GetClassification ()
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
TranslatableString GetName ()
 
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))
 
- Public Member Functions inherited from EffectUIClientInterface
virtual ~EffectUIClientInterface ()
 
- Public Member Functions inherited from EffectHostInterface
virtual ~EffectHostInterface ()
 
- Public Member Functions inherited from ConfigClientInterface
virtual ~ConfigClientInterface ()
 

Static Public Member Functions

static VetoDialogHook SetVetoDialogHook (VetoDialogHook hook)
 
static CommandID GetSquashedName (wxString name)
 
static void IncEffectCounter ()
 

Static Public Attributes

static const wxString kUserPresetIdent = wxT("User Preset:")
 
static const wxString kFactoryPresetIdent = wxT("Factory Preset:")
 
static const wxString kCurrentSettingsIdent = wxT("<Current Settings>")
 
static const wxString kFactoryDefaultsIdent = wxT("<Factory Defaults>")
 

Protected Member Functions

virtual bool Init ()
 
virtual bool CheckWhetherSkipEffect ()
 
virtual bool Process ()
 
virtual bool ProcessPass ()
 
virtual bool InitPass1 ()
 
virtual bool InitPass2 ()
 
virtual int GetPass ()
 
virtual void End ()
 
virtual double CalcPreviewInputLength (double previewLength)
 
virtual void Preview (bool dryOnly)
 
virtual void PopulateOrExchange (ShuttleGui &S)
 
virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 
virtual bool EnableApply (bool enable=true)
 
virtual bool EnablePreview (bool enable=true)
 
virtual void EnableDebug (bool enable=true)
 
bool TotalProgress (double frac, const TranslatableString &={})
 
bool TrackProgress (int whichTrack, double frac, const TranslatableString &={})
 
bool TrackGroupProgress (int whichGroup, double frac, const TranslatableString &={})
 
int GetNumWaveTracks ()
 
int GetNumWaveGroups ()
 
void GetBounds (const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing ()
 
void IncludeNotSelectedPreviewTracks (bool includeNotSelected)
 
void CopyInputTracks (bool allSyncLockSelected=false)
 
std::shared_ptr< AddedAnalysisTrackAddAnalysisTrack (const wxString &name=wxString())
 
ModifiedAnalysisTrack ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString())
 
void ReplaceProcessedTracks (const bool bGoodResult)
 
TrackAddToOutputTracks (const std::shared_ptr< Track > &t)
 
const TrackListinputTracks () const
 
const AudacityProjectFindProject () const
 

Protected Attributes

ProgressDialogmProgress
 
double mProjectRate
 
double mSampleRate
 
wxWeakRef< NotifyingSelectedRegionmpSelectedRegion {}
 
WaveTrackFactorymFactory
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0
 
double mT1
 
wxArrayString mPresetNames
 
wxArrayString mPresetValues
 
int mPass
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 
int mUIResultID
 
unsigned mUIFlags
 
sampleCount mSampleCnt
 

Static Protected Attributes

static int nEffectsDone =0
 

Private Member Functions

void CountWaveTracks ()
 
bool ProcessTrack (int count, ChannelNames map, WaveTrack *left, WaveTrack *right, sampleCount start, sampleCount len, FloatBuffers &inBuffer, FloatBuffers &outBuffer, ArrayOf< float * > &inBufPos, ArrayOf< float * > &outBufPos)
 

Private Attributes

TrackListmTracks
 
bool mIsBatch
 
bool mIsLinearEffect
 
bool mPreviewWithNotSelected
 
bool mPreviewFullSelection
 
double mDuration
 
NumericFormatSymbol mDurationFormat
 
bool mIsPreview
 
bool mUIDebug
 
std::vector< Track * > mIMap
 
std::vector< Track * > mOMap
 
int mNumTracks
 
int mNumGroups
 
EffectClientInterfacemClient
 
size_t mNumAudioIn
 
size_t mNumAudioOut
 
size_t mBufferSize
 
size_t mBlockSize
 
unsigned mNumChannels
 

Friends

class EffectUIHost
 

Detailed Description

Base class for many of the effects in Audacity.

Definition at line 68 of file Effect.h.

Member Typedef Documentation

◆ VetoDialogHook

using Effect::VetoDialogHook = bool (*) ( wxDialog* )

Definition at line 87 of file Effect.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : long
Enumerator
DefaultMessageBoxStyle 

Definition at line 274 of file Effect.h.

274 : long { DefaultMessageBoxStyle = wxOK | wxCENTRE };

Constructor & Destructor Documentation

◆ Effect()

Effect::Effect ( )

Definition at line 84 of file Effect.cpp.

85 {
86  mClient = NULL;
87 
88  mTracks = NULL;
89  mT0 = 0.0;
90  mT1 = 0.0;
91  mDuration = 0.0;
92  mIsPreview = false;
93  mIsLinearEffect = false;
95  mPreviewFullSelection = false;
96  mNumTracks = 0;
97  mNumGroups = 0;
98  mProgress = NULL;
99 
100  mUIParent = NULL;
101  mUIDialog = NULL;
102  mUIFlags = 0;
103 
104  mNumAudioIn = 0;
105  mNumAudioOut = 0;
106 
107  mBufferSize = 0;
108  mBlockSize = 0;
109  mNumChannels = 0;
110 
111  mUIDebug = false;
112 
113  // PRL: I think this initialization of mProjectRate doesn't matter
114  // because it is always reassigned in DoEffect before it is used
115  // STF: but can't call AudioIOBase::GetOptimalSupportedSampleRate() here.
116  // (Which is called to compute the default-default value.) (Bug 2280)
118 
119  mIsBatch = false;
120 }

References QualitySettings::DefaultSampleRate, mBlockSize, mBufferSize, mClient, mDuration, mIsBatch, mIsLinearEffect, mIsPreview, mNumAudioIn, mNumAudioOut, mNumChannels, mNumGroups, mNumTracks, mPreviewFullSelection, mPreviewWithNotSelected, mProgress, mProjectRate, mT0, mT1, mTracks, mUIDebug, mUIDialog, mUIFlags, mUIParent, and Setting< T >::ReadWithDefault().

Here is the call graph for this function:

◆ ~Effect()

Effect::~Effect ( )
virtual

Definition at line 122 of file Effect.cpp.

123 {
124  if (mUIDialog)
125  {
126  mUIDialog->Close();
127  }
128 }

References mUIDialog.

Member Function Documentation

◆ AddAnalysisTrack()

auto Effect::AddAnalysisTrack ( const wxString &  name = wxString())
protected

Definition at line 2134 of file Effect.cpp.

2135 {
2136  return std::shared_ptr<AddedAnalysisTrack>
2137  { safenew AddedAnalysisTrack{ this, name } };
2138 }

References name, and safenew.

Referenced by EffectFindClipping::Process(), and VampEffect::Process().

Here is the caller graph for this function:

◆ AddToOutputTracks()

Track * Effect::AddToOutputTracks ( const std::shared_ptr< Track > &  t)
protected

Definition at line 2097 of file Effect.cpp.

2098 {
2099  mIMap.push_back(NULL);
2100  mOMap.push_back(t.get());
2101  return mOutputTracks->Add(t);
2102 }

References mIMap, mOMap, and mOutputTracks.

Referenced by NyquistEffect::ProcessOne().

Here is the caller graph for this function:

◆ CalcPreviewInputLength()

double Effect::CalcPreviewInputLength ( double  previewLength)
protectedvirtual

Reimplemented in EffectTruncSilence, EffectTimeScale, EffectPaulstretch, and EffectChangeSpeed.

Definition at line 2284 of file Effect.cpp.

2285 {
2286  return previewLength;
2287 }

Referenced by Preview(), and ProcessTrack().

Here is the caller graph for this function:

◆ CanExportPresets()

bool Effect::CanExportPresets ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 662 of file Effect.cpp.

663 {
664  return true;
665 }

◆ CheckWhetherSkipEffect()

virtual bool Effect::CheckWhetherSkipEffect ( )
inlineprotectedvirtual

Reimplemented in NyquistEffect, EffectNormalize, EffectNoiseRemoval, EffectNoiseReduction, EffectLoudness, EffectClickRemoval, EffectChangeSpeed, and EffectBassTreble.

Definition at line 299 of file Effect.h.

299 { return false; }

Referenced by DoEffect().

Here is the caller graph for this function:

◆ CloseUI()

bool Effect::CloseUI ( )
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in EffectEqualization.

Definition at line 651 of file Effect.cpp.

652 {
653  if (mUIParent)
654  mUIParent->RemoveEventHandler(this);
655 
656  mUIParent = NULL;
657  mUIDialog = NULL;
658 
659  return true;
660 }

References mUIDialog, and mUIParent.

Referenced by EffectEqualization::CloseUI().

Here is the caller graph for this function:

◆ CopyInputTracks()

void Effect::CopyInputTracks ( bool  allSyncLockSelected = false)
protected

Definition at line 2070 of file Effect.cpp.

2071 {
2072  // Reset map
2073  mIMap.clear();
2074  mOMap.clear();
2075 
2077  const_cast<AudacityProject*>( FindProject() ) // how to remove this const_cast?
2078  );
2079 
2080  auto trackRange = mTracks->Any() +
2081  [&] (const Track *pTrack) {
2082  return allSyncLockSelected
2083  ? pTrack->IsSelectedOrSyncLockSelected()
2084  : track_cast<const WaveTrack*>( pTrack ) && pTrack->GetSelected();
2085  };
2086 
2087  t2bHash added;
2088 
2089  for (auto aTrack : trackRange)
2090  {
2091  Track *o = mOutputTracks->Add(aTrack->Duplicate());
2092  mIMap.push_back(aTrack);
2093  mOMap.push_back(o);
2094  }
2095 }

References TrackList::Any(), TrackList::Create(), FindProject(), mIMap, mOMap, mOutputTracks, and mTracks.

Referenced by Process(), EffectAutoDuck::Process(), EffectChangeSpeed::Process(), EffectClickRemoval::Process(), EffectEqualization::Process(), Generator::Process(), EffectLoudness::Process(), EffectNoiseReduction::Process(), EffectNoiseRemoval::Process(), EffectNormalize::Process(), NyquistEffect::Process(), EffectPaulstretch::Process(), EffectRepair::Process(), EffectRepeat::Process(), EffectReverse::Process(), EffectSBSMS::Process(), EffectSimpleMono::Process(), EffectStereoToMono::Process(), EffectTwoPassSimpleMono::Process(), EffectTruncSilence::ProcessAll(), and EffectTruncSilence::ProcessIndependently().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CountWaveTracks()

void Effect::CountWaveTracks ( )
private

Definition at line 2278 of file Effect.cpp.

2279 {
2280  mNumTracks = mTracks->Selected< const WaveTrack >().size();
2281  mNumGroups = mTracks->SelectedLeaders< const WaveTrack >().size();
2282 }

References mNumGroups, mNumTracks, mTracks, TrackList::Selected(), and TrackList::SelectedLeaders().

Referenced by DoEffect(), and Preview().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Delegate()

bool Effect::Delegate ( Effect delegate,
wxWindow &  parent,
const EffectDialogFactory factory 
)

Definition at line 1339 of file Effect.cpp.

1341 {
1342  NotifyingSelectedRegion region;
1343  region.setTimes( mT0, mT1 );
1344 
1345  return delegate.DoEffect( mProjectRate, mTracks, mFactory,
1346  region, &parent, factory );
1347 }

References DoEffect(), factory, mFactory, mProjectRate, mT0, mT1, mTracks, and NotifyingSelectedRegion::setTimes().

Referenced by NyquistEffect::ShowInterface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoEffect()

bool Effect::DoEffect ( double  projectRate,
TrackList list,
WaveTrackFactory factory,
NotifyingSelectedRegion selectedRegion,
wxWindow *  pParent = nullptr,
const EffectDialogFactory dialogFactory = {} 
)

Definition at line 1208 of file Effect.cpp.

1214 {
1215  wxASSERT(selectedRegion.duration() >= 0.0);
1216 
1217  mOutputTracks.reset();
1218 
1219  mpSelectedRegion = &selectedRegion;
1220  mFactory = factory;
1221  mProjectRate = projectRate;
1222  mTracks = list;
1223 
1224  // This is for performance purposes only, no additional recovery implied
1225  auto &pProject = *const_cast<AudacityProject*>(FindProject()); // how to remove this const_cast?
1226  auto &pIO = ProjectFileIO::Get(pProject);
1227  TransactionScope trans(pIO.GetConnection(), "Effect");
1228 
1229  // Update track/group counts
1230  CountWaveTracks();
1231 
1232  bool isSelection = false;
1233 
1234  mDuration = 0.0;
1235  if (GetType() == EffectTypeGenerate)
1236  {
1237  GetPrivateConfig(GetCurrentSettingsGroup(), wxT("LastUsedDuration"), mDuration, GetDefaultDuration());
1238  }
1239 
1240  WaveTrack *newTrack{};
1241  bool success = false;
1242  auto oldDuration = mDuration;
1243 
1244  auto cleanup = finally( [&] {
1245  if (!success) {
1246  if (newTrack) {
1247  mTracks->Remove(newTrack);
1248  }
1249  // LastUsedDuration may have been modified by Preview.
1250  SetDuration(oldDuration);
1251  }
1252  else
1253  trans.Commit();
1254 
1255  End();
1256  ReplaceProcessedTracks( false );
1257  } );
1258 
1259  // We don't yet know the effect type for code in the Nyquist Prompt, so
1260  // assume it requires a track and handle errors when the effect runs.
1261  if ((GetType() == EffectTypeGenerate || GetPath() == NYQUIST_PROMPT_ID) && (mNumTracks == 0)) {
1262  newTrack = mTracks->Add(mFactory->NewWaveTrack());
1263  newTrack->SetSelected(true);
1264  }
1265 
1266  mT0 = selectedRegion.t0();
1267  mT1 = selectedRegion.t1();
1268  if (mT1 > mT0)
1269  {
1270  // there is a selection: let's fit in there...
1271  // MJS: note that this is just for the TTC and is independent of the track rate
1272  // but we do need to make sure we have the right number of samples at the project rate
1273  double quantMT0 = QUANTIZED_TIME(mT0, mProjectRate);
1274  double quantMT1 = QUANTIZED_TIME(mT1, mProjectRate);
1275  mDuration = quantMT1 - quantMT0;
1276  isSelection = true;
1277  mT1 = mT0 + mDuration;
1278  }
1279 
1280  mDurationFormat = isSelection
1282  : NumericConverter::DefaultSelectionFormat();
1283 
1284 #ifdef EXPERIMENTAL_SPECTRAL_EDITING
1285  mF0 = selectedRegion.f0();
1286  mF1 = selectedRegion.f1();
1287  wxArrayString Names;
1289  Names.push_back(wxT("control-f0"));
1291  Names.push_back(wxT("control-f1"));
1292  SetPresetParameters( &Names, NULL );
1293 
1294 #endif
1295  CountWaveTracks();
1296 
1297  // Note: Init may read parameters from preferences
1298  if (!Init())
1299  {
1300  return false;
1301  }
1302 
1303  // Prompting will be bypassed when applying an effect that has already
1304  // been configured, e.g. repeating the last effect on a different selection.
1305  // Prompting may call Effect::Preview
1306  if ( pParent && dialogFactory &&
1307  IsInteractive() &&
1308  !ShowInterface( *pParent, dialogFactory, IsBatchProcessing() ) )
1309  {
1310  return false;
1311  }
1312 
1313  bool returnVal = true;
1314  bool skipFlag = CheckWhetherSkipEffect();
1315  if (skipFlag == false)
1316  {
1317  auto name = GetName();
1318  ProgressDialog progress{
1319  name,
1320  XO("Applying %s...").Format( name ),
1322  };
1323  auto vr = valueRestorer( mProgress, &progress );
1324 
1325  {
1326  returnVal = Process();
1327  }
1328  }
1329 
1330  if (returnVal && (mT1 >= mT0 ))
1331  {
1332  selectedRegion.setTimes(mT0, mT1);
1333  }
1334 
1335  success = returnVal;
1336  return returnVal;
1337 }

References TrackList::Add(), CheckWhetherSkipEffect(), TransactionScope::Commit(), CountWaveTracks(), NumericConverter::DefaultSelectionFormat(), NotifyingSelectedRegion::duration(), EffectTypeGenerate, End(), NotifyingSelectedRegion::f0(), NotifyingSelectedRegion::f1(), factory, FindProject(), ProjectFileIO::Get(), GetCurrentSettingsGroup(), GetDefaultDuration(), ComponentInterface::GetName(), GetPath(), GetPrivateConfig(), GetType(), Init(), IsBatchProcessing(), IsInteractive(), mDuration, mDurationFormat, mFactory, mNumTracks, mOutputTracks, mProgress, mProjectRate, mpSelectedRegion, mT0, mT1, mTracks, name, WaveTrackFactory::NewWaveTrack(), NYQUIST_PROMPT_ID, pdlgHideStopButton, Process(), QUANTIZED_TIME, TrackList::Remove(), ReplaceProcessedTracks(), SetDuration(), SetPresetParameters(), NotifyingSelectedRegion::setTimes(), ShowInterface(), NotifyingSelectedRegion::t0(), NotifyingSelectedRegion::t1(), NumericConverter::TimeAndSampleFormat(), SelectedRegion::UndefinedFrequency, valueRestorer(), and XO.

Referenced by Delegate(), and EffectUI::DoEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnableApply()

bool Effect::EnableApply ( bool  enable = true)
protectedvirtual

Definition at line 1925 of file Effect.cpp.

1926 {
1927  // May be called during initialization, so try to find the dialog
1928  wxWindow *dlg = mUIDialog;
1929  if (!dlg && mUIParent)
1930  {
1931  dlg = wxGetTopLevelParent(mUIParent);
1932  }
1933 
1934  if (dlg)
1935  {
1936  wxWindow *apply = dlg->FindWindow(wxID_APPLY);
1937 
1938  // Don't allow focus to get trapped
1939  if (!enable)
1940  {
1941  wxWindow *focus = dlg->FindFocus();
1942  if (focus == apply)
1943  {
1944  dlg->FindWindow(wxID_CLOSE)->SetFocus();
1945  }
1946  }
1947 
1948  apply->Enable(enable);
1949  }
1950 
1951  EnablePreview(enable);
1952 
1953  return enable;
1954 }

References EnablePreview(), mUIDialog, and mUIParent.

Referenced by EffectAmplify::CheckClip(), EffectRepeat::DisplayNewTime(), EffectAmplify::OnAmpText(), EffectBassTreble::OnBassSlider(), EffectBassTreble::OnBassText(), EffectTruncSilence::OnControlChange(), EffectToneGen::OnControlUpdate(), EffectScienFilter::OnCutoff(), EffectPhaser::OnDepthSlider(), EffectWahwah::OnDepthSlider(), EffectPhaser::OnDepthText(), EffectWahwah::OnDepthText(), EffectPhaser::OnDryWetSlider(), EffectPhaser::OnDryWetText(), EffectPhaser::OnFeedbackSlider(), EffectPhaser::OnFeedbackText(), EffectWahwah::OnFreqOffSlider(), EffectWahwah::OnFreqOffText(), EffectPhaser::OnFreqSlider(), EffectWahwah::OnFreqSlider(), EffectPhaser::OnFreqText(), EffectWahwah::OnFreqText(), EffectBassTreble::OnGainSlider(), EffectPhaser::OnGainSlider(), EffectWahwah::OnGainSlider(), EffectBassTreble::OnGainText(), EffectPhaser::OnGainText(), EffectWahwah::OnGainText(), EffectAmplify::OnPeakText(), EffectPhaser::OnPhaseSlider(), EffectWahwah::OnPhaseSlider(), EffectPhaser::OnPhaseText(), EffectWahwah::OnPhaseText(), EffectWahwah::OnResonanceSlider(), EffectWahwah::OnResonanceText(), EffectScienFilter::OnRipple(), EffectPhaser::OnStagesSlider(), EffectPhaser::OnStagesText(), EffectScienFilter::OnStopbandRipple(), EffectPaulstretch::OnText(), EffectTimeScale::OnText_PitchHalfStepsEnd(), EffectTimeScale::OnText_PitchHalfStepsStart(), EffectTimeScale::OnText_PitchPercentChangeEnd(), EffectTimeScale::OnText_PitchPercentChangeStart(), EffectTimeScale::OnText_RatePercentChangeEnd(), EffectTimeScale::OnText_RatePercentChangeStart(), EffectBassTreble::OnTrebleSlider(), EffectBassTreble::OnTrebleText(), EffectChangeSpeed::UpdateUI(), EffectLoudness::UpdateUI(), and EffectNormalize::UpdateUI().

Here is the call graph for this function:

◆ EnableDebug()

void Effect::EnableDebug ( bool  enable = true)
protectedvirtual

Definition at line 1995 of file Effect.cpp.

1996 {
1997  mUIDebug = enable;
1998 }

References mUIDebug.

Referenced by NyquistEffect::PopulateOrExchange().

Here is the caller graph for this function:

◆ EnablePreview()

bool Effect::EnablePreview ( bool  enable = true)
protectedvirtual

Definition at line 1956 of file Effect.cpp.

1957 {
1958  // May be called during initialization, so try to find the dialog
1959  wxWindow *dlg = mUIDialog;
1960  if (!dlg && mUIParent)
1961  {
1962  dlg = wxGetTopLevelParent(mUIParent);
1963  }
1964 
1965  if (dlg)
1966  {
1967  wxWindow *play = dlg->FindWindow(kPlayID);
1968  if (play)
1969  {
1970  wxWindow *rewind = dlg->FindWindow(kRewindID);
1971  wxWindow *ffwd = dlg->FindWindow(kFFwdID);
1972 
1973  // Don't allow focus to get trapped
1974  if (!enable)
1975  {
1976  wxWindow *focus = dlg->FindFocus();
1977  if (focus && (focus == play || focus == rewind || focus == ffwd))
1978  {
1979  dlg->FindWindow(wxID_CLOSE)->SetFocus();
1980  }
1981  }
1982 
1983  play->Enable(enable);
1984  if (SupportsRealtime())
1985  {
1986  rewind->Enable(enable);
1987  ffwd->Enable(enable);
1988  }
1989  }
1990  }
1991 
1992  return enable;
1993 }

References kFFwdID, kPlayID, kRewindID, mUIDialog, mUIParent, and SupportsRealtime().

Referenced by EnableApply(), and NyquistEffect::TransferDataToWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ End()

void Effect::End ( )
protectedvirtual

Reimplemented in VampEffect, EffectNoiseRemoval, and EffectAutoDuck.

Definition at line 1906 of file Effect.cpp.

1907 {
1908 }

Referenced by DoEffect(), and Preview().

Here is the caller graph for this function:

◆ ExportPresets()

void Effect::ExportPresets ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 676 of file Effect.cpp.

677 {
678  wxString params;
680  wxString commandId = GetSquashedName(GetSymbol().Internal()).GET();
681  params = commandId + ":" + params;
682 
683  auto path = FileNames::SelectFile(FileNames::Operation::Presets,
684  XO("Export Effect Parameters"),
685  wxEmptyString,
686  wxEmptyString,
687  wxEmptyString,
688  PresetTypes(),
689  wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
690  nullptr);
691  if (path.empty()) {
692  return;
693  }
694 
695  // Create/Open the file
696  wxFFile f(path, wxT("wb"));
697  if (!f.IsOpened())
698  {
700  XO("Could not open file: \"%s\"").Format( path ),
701  XO("Error Saving Effect Presets"),
702  wxICON_EXCLAMATION,
703  NULL);
704  return;
705  }
706 
707  f.Write(params);
708  if (f.Error())
709  {
711  XO("Error writing to file: \"%s\"").Format( path ),
712  XO("Error Saving Effect Presets"),
713  wxICON_EXCLAMATION,
714  NULL);
715  }
716 
717  f.Close();
718 
719 
720  //SetWindowTitle();
721 
722 }

References AudacityMessageBox(), Identifier::GET(), GetAutomationParameters(), GetSquashedName(), GetSymbol(), Internal, params, PresetTypes(), FileNames::SelectFile(), and XO.

Here is the call graph for this function:

◆ FindProject()

const AudacityProject * Effect::FindProject ( ) const
protected

Definition at line 2271 of file Effect.cpp.

2272 {
2273  if (!inputTracks())
2274  return nullptr;
2275  return inputTracks()->GetOwner();
2276 }

References TrackList::GetOwner(), and inputTracks().

Referenced by CopyInputTracks(), DoEffect(), GetSelectionFormat(), EffectEqualization::Init(), NyquistEffect::Init(), Generator::Process(), NyquistEffect::Process(), EffectTwoPassSimpleMono::Process(), EffectTruncSilence::ProcessIndependently(), ProcessTrack(), and EffectToneGen::SetAutomationParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAudioInCount()

unsigned Effect::GetAudioInCount ( )
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, VampEffect, EffectStereoToMono, EffectScienFilter, EffectReverb, EffectPhaser, EffectInvert, and EffectFade.

Definition at line 266 of file Effect.cpp.

267 {
268  if (mClient)
269  {
270  return mClient->GetAudioInCount();
271  }
272 
273  return 0;
274 }

References EffectClientInterface::GetAudioInCount(), and mClient.

Referenced by Process(), and Startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAudioOutCount()

unsigned Effect::GetAudioOutCount ( )
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, EffectToneGen, EffectStereoToMono, EffectScienFilter, EffectReverb, EffectPhaser, EffectNoise, EffectInvert, and EffectFade.

Definition at line 276 of file Effect.cpp.

277 {
278  if (mClient)
279  {
280  return mClient->GetAudioOutCount();
281  }
282 
283  return 0;
284 }

References EffectClientInterface::GetAudioOutCount(), and mClient.

Referenced by Process(), and Startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAutomationParameters() [1/2]

bool Effect::GetAutomationParameters ( CommandParameters parms)
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, VampEffect, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectScienFilter, EffectReverb, EffectRepeat, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoise, EffectLoudness, EffectFindClipping, and EffectEqualization.

Definition at line 533 of file Effect.cpp.

534 {
535  if (mClient)
536  {
537  return mClient->GetAutomationParameters(parms);
538  }
539 
540  return true;
541 }

References EffectClientInterface::GetAutomationParameters(), and mClient.

Referenced by ExportPresets(), GetAutomationParameters(), EffectManager::GetEffectParameters(), and SaveUserPreset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAutomationParameters() [2/2]

bool Effect::GetAutomationParameters ( wxString &  parms)
virtual

Definition at line 1066 of file Effect.cpp.

1067 {
1068  CommandParameters eap;
1069 
1071  {
1072  return false;
1073  }
1074 
1076  S.mpEap = &eap;
1077  if( DefineParams( S ) ){
1078  ;// got eap value using DefineParams.
1079  }
1080  // Won't be needed in future
1081  else if (!GetAutomationParameters(eap))
1082  {
1083  return false;
1084  }
1085 
1086  return eap.GetParameters(parms);
1087 }

References ComponentInterface::DefineParams(), GetAutomationParameters(), CommandParameters::GetParameters(), ShuttleParams::mpEap, mUIDialog, and TransferDataFromWindow().

Here is the call graph for this function:

◆ GetBlockSize()

size_t Effect::GetBlockSize ( ) const
overridevirtual

Implements EffectClientInterface.

Definition at line 328 of file Effect.cpp.

329 {
330  if (mClient)
331  {
332  return mClient->GetBlockSize();
333  }
334 
335  return mBlockSize;
336 }

References EffectClientInterface::GetBlockSize(), mBlockSize, and mClient.

Here is the call graph for this function:

◆ GetBounds()

void Effect::GetBounds ( const WaveTrack track,
const WaveTrack pRight,
sampleCount start,
sampleCount len 
)
protected

Definition at line 2040 of file Effect.cpp.

2043 {
2044  auto t0 = std::max( mT0, track.GetStartTime() );
2045  auto t1 = std::min( mT1, track.GetEndTime() );
2046 
2047  if ( pRight ) {
2048  t0 = std::min( t0, std::max( mT0, pRight->GetStartTime() ) );
2049  t1 = std::max( t1, std::min( mT1, pRight->GetEndTime() ) );
2050  }
2051 
2052  if (t1 > t0) {
2053  *start = track.TimeToLongSamples(t0);
2054  auto end = track.TimeToLongSamples(t1);
2055  *len = end - *start;
2056  }
2057  else {
2058  *start = 0;
2059  *len = 0;
2060  }
2061 }

References WaveTrack::GetEndTime(), WaveTrack::GetStartTime(), min(), mT0, mT1, and WaveTrack::TimeToLongSamples().

Referenced by VampEffect::Process(), and ProcessPass().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurrentSettingsGroup()

RegistryPath Effect::GetCurrentSettingsGroup ( )
overridevirtual

◆ GetDefaultDuration()

double Effect::GetDefaultDuration ( )
overridevirtual

Implements EffectHostInterface.

Definition at line 810 of file Effect.cpp.

811 {
812  return 30.0;
813 }

Referenced by DoEffect().

Here is the caller graph for this function:

◆ GetDescription()

TranslatableString Effect::GetDescription ( )
overridevirtual

Implements ComponentInterface.

Reimplemented in EffectWahwah, VampEffect, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectStereoToMono, EffectSilence, EffectScienFilter, EffectReverse, EffectReverb, EffectRepeat, EffectRepair, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoiseRemoval, EffectNoiseReduction, EffectNoise, EffectLoudness, EffectInvert, EffectFindClipping, EffectFade, and EffectEqualization.

Definition at line 182 of file Effect.cpp.

183 {
184  if (mClient)
185  {
186  return mClient->GetDescription();
187  }
188 
189  return {};
190 }

References ComponentInterface::GetDescription(), and mClient.

Referenced by EffectManager::GetCommandTip(), and EffectUIHost::OnMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDuration()

double Effect::GetDuration ( )
overridevirtual

◆ GetDurationFormat()

NumericFormatSymbol Effect::GetDurationFormat ( )
overridevirtual

Implements EffectHostInterface.

Definition at line 825 of file Effect.cpp.

826 {
827  return mDurationFormat;
828 }

References mDurationFormat.

Referenced by EffectDtmf::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), and EffectToneGen::PopulateOrExchange().

Here is the caller graph for this function:

◆ GetFactoryDefaultsGroup()

RegistryPath Effect::GetFactoryDefaultsGroup ( )
overridevirtual

Implements EffectHostInterface.

Definition at line 870 of file Effect.cpp.

871 {
872  return wxT("FactoryDefaults");
873 }

Referenced by HasFactoryDefaults(), LoadFactoryDefaults(), SetAutomationParameters(), and Startup().

Here is the caller graph for this function:

◆ GetFactoryPresets()

RegistryPaths Effect::GetFactoryPresets ( )
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectReverb, and EffectEqualization.

Definition at line 585 of file Effect.cpp.

586 {
587  if (mClient)
588  {
589  return mClient->GetFactoryPresets();
590  }
591 
592  return {};
593 }

References EffectClientInterface::GetFactoryPresets(), and mClient.

Referenced by EffectManager::HasPresets(), EffectUIHost::OnMenu(), and SetAutomationParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFamily()

EffectFamilySymbol Effect::GetFamily ( )
overridevirtual

Implements EffectDefinitionInterface.

Reimplemented in VampEffect, and NyquistEffect.

Definition at line 192 of file Effect.cpp.

193 {
194  if (mClient)
195  {
196  return mClient->GetFamily();
197  }
198 
199  // Unusually, the internal and visible strings differ for the built-in
200  // effect family.
201  return { wxT("Audacity"), XO("Built-in") };
202 }

References EffectDefinitionInterface::GetFamily(), mClient, and XO.

Referenced by EffectUIHost::OnHelp(), EffectUIHost::OnMenu(), and Preview().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetID()

PluginID Effect::GetID ( )
virtual

Definition at line 1023 of file Effect.cpp.

1024 {
1025  if (mClient)
1026  {
1027  return PluginManager::GetID(mClient);
1028  }
1029 
1030  return PluginManager::GetID(this);
1031 }

References PluginManager::GetID(), and mClient.

Referenced by GetPrivateConfig(), GetPrivateConfigSubgroups(), GetSharedConfig(), GetSharedConfigSubgroups(), HasPrivateConfigGroup(), HasSharedConfigGroup(), EffectUIHost::OnApply(), RemovePrivateConfig(), RemovePrivateConfigSubgroup(), RemoveSharedConfig(), RemoveSharedConfigSubgroup(), SetPrivateConfig(), and SetSharedConfig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLatency()

sampleCount Effect::GetLatency ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 338 of file Effect.cpp.

339 {
340  if (mClient)
341  {
342  return mClient->GetLatency();
343  }
344 
345  return 0;
346 }

Referenced by ProcessTrack().

Here is the caller graph for this function:

◆ GetMidiInCount()

int Effect::GetMidiInCount ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 286 of file Effect.cpp.

287 {
288  if (mClient)
289  {
290  return mClient->GetMidiInCount();
291  }
292 
293  return 0;
294 }

References EffectClientInterface::GetMidiInCount(), and mClient.

Here is the call graph for this function:

◆ GetMidiOutCount()

int Effect::GetMidiOutCount ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 296 of file Effect.cpp.

297 {
298  if (mClient)
299  {
300  return mClient->GetMidiOutCount();
301  }
302 
303  return 0;
304 }

References EffectClientInterface::GetMidiOutCount(), and mClient.

Here is the call graph for this function:

◆ GetNumWaveGroups()

int Effect::GetNumWaveGroups ( )
inlineprotected

Definition at line 346 of file Effect.h.

346 { return mNumGroups; }

Referenced by NyquistEffect::Process(), and VampEffect::Process().

Here is the caller graph for this function:

◆ GetNumWaveTracks()

int Effect::GetNumWaveTracks ( )
inlineprotected

Definition at line 345 of file Effect.h.

345 { return mNumTracks; }

Referenced by EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), EffectAutoDuck::ApplyDuckFade(), EffectAutoDuck::Process(), EffectNormalize::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), EffectNoiseRemoval::ShowInterface(), and EffectLoudness::UpdateProgress().

Here is the caller graph for this function:

◆ GetPass()

int Effect::GetPass ( )
protectedvirtual

Definition at line 1355 of file Effect.cpp.

1356 {
1357  return mPass;
1358 }

References mPass.

◆ GetPath()

PluginPath Effect::GetPath ( )
overridevirtual

Implements ComponentInterface.

Reimplemented in VampEffect, and NyquistEffect.

Definition at line 142 of file Effect.cpp.

143 {
144  if (mClient)
145  {
146  return mClient->GetPath();
147  }
148 
150 }

References BUILTIN_EFFECT_PREFIX, ComponentInterface::GetPath(), GetSymbol(), ComponentInterfaceSymbol::Internal(), and mClient.

Referenced by DoEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPrivateConfig() [1/5]

bool Effect::GetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
bool &  value,
bool  defval = false 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 971 of file Effect.cpp.

972 {
973  return PluginManager::Get().GetPrivateConfig(GetID(), group, key, value, defval);
974 }

References PluginManager::Get(), GetID(), PluginManager::GetPrivateConfig(), and key.

Here is the call graph for this function:

◆ GetPrivateConfig() [2/5]

bool Effect::GetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
double &  value,
double  defval = 0.0 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 981 of file Effect.cpp.

982 {
983  return PluginManager::Get().GetPrivateConfig(GetID(), group, key, value, defval);
984 }

References PluginManager::Get(), GetID(), PluginManager::GetPrivateConfig(), and key.

Here is the call graph for this function:

◆ GetPrivateConfig() [3/5]

bool Effect::GetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
float &  value,
float  defval = 0.0 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 976 of file Effect.cpp.

977 {
978  return PluginManager::Get().GetPrivateConfig(GetID(), group, key, value, defval);
979 }

References PluginManager::Get(), GetID(), PluginManager::GetPrivateConfig(), and key.

Here is the call graph for this function:

◆ GetPrivateConfig() [4/5]

bool Effect::GetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
int &  value,
int  defval = 0 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 966 of file Effect.cpp.

967 {
968  return PluginManager::Get().GetPrivateConfig(GetID(), group, key, value, defval);
969 }

References PluginManager::Get(), GetID(), PluginManager::GetPrivateConfig(), and key.

Here is the call graph for this function:

◆ GetPrivateConfig() [5/5]

bool Effect::GetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
wxString &  value,
const wxString &  defval = {} 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 961 of file Effect.cpp.

962 {
963  return PluginManager::Get().GetPrivateConfig(GetID(), group, key, value, defval);
964 }

References PluginManager::Get(), GetID(), PluginManager::GetPrivateConfig(), and key.

Referenced by DoEffect(), LoadUserPreset(), EffectChangeSpeed::PopulateOrExchange(), Startup(), and EffectChangeSpeed::Update_Vinyl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPrivateConfigSubgroups()

bool Effect::GetPrivateConfigSubgroups ( const RegistryPath group,
RegistryPaths paths 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 956 of file Effect.cpp.

957 {
958  return PluginManager::Get().GetPrivateConfigSubgroups(GetID(), group, subgroups);
959 }

References PluginManager::Get(), GetID(), and PluginManager::GetPrivateConfigSubgroups().

Referenced by GetUserPresets(), and EffectUIHost::LoadUserPresets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSavedStateGroup()

wxString Effect::GetSavedStateGroup ( )
virtual

Definition at line 875 of file Effect.cpp.

876 {
877  return wxT("SavedState");
878 }

Referenced by SetBatchProcessing().

Here is the caller graph for this function:

◆ GetSelectionFormat()

NumericFormatSymbol Effect::GetSelectionFormat ( )
virtual

Definition at line 830 of file Effect.cpp.

831 {
832  if( !IsBatchProcessing() && FindProject() )
835 }

References FindProject(), ProjectSettings::Get(), ProjectSettings::GetSelectionFormat(), NumericConverter::HoursMinsSecondsFormat(), and IsBatchProcessing().

Referenced by NyquistEffect::BuildEffectWindow(), and EffectRepeat::DisplayNewTime().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSharedConfig() [1/5]

bool Effect::GetSharedConfig ( const RegistryPath group,
const RegistryPath key,
bool &  value,
bool  defval = false 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 901 of file Effect.cpp.

902 {
903  return PluginManager::Get().GetSharedConfig(GetID(), group, key, value, defval);
904 }

References PluginManager::Get(), GetID(), PluginManager::GetSharedConfig(), and key.

Here is the call graph for this function:

◆ GetSharedConfig() [2/5]

bool Effect::GetSharedConfig ( const RegistryPath group,
const RegistryPath key,
double &  value,
double  defval = 0.0 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 911 of file Effect.cpp.

912 {
913  return PluginManager::Get().GetSharedConfig(GetID(), group, key, value, defval);
914 }

References PluginManager::Get(), GetID(), PluginManager::GetSharedConfig(), and key.

Here is the call graph for this function:

◆ GetSharedConfig() [3/5]

bool Effect::GetSharedConfig ( const RegistryPath group,
const RegistryPath key,
float &  value,
float  defval = 0.0 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 906 of file Effect.cpp.

907 {
908  return PluginManager::Get().GetSharedConfig(GetID(), group, key, value, defval);
909 }

References PluginManager::Get(), GetID(), PluginManager::GetSharedConfig(), and key.

Here is the call graph for this function:

◆ GetSharedConfig() [4/5]

bool Effect::GetSharedConfig ( const RegistryPath group,
const RegistryPath key,
int &  value,
int  defval = 0 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 896 of file Effect.cpp.

897 {
898  return PluginManager::Get().GetSharedConfig(GetID(), group, key, value, defval);
899 }

References PluginManager::Get(), GetID(), PluginManager::GetSharedConfig(), and key.

Here is the call graph for this function:

◆ GetSharedConfig() [5/5]

bool Effect::GetSharedConfig ( const RegistryPath group,
const RegistryPath key,
wxString &  value,
const wxString &  defval = {} 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 891 of file Effect.cpp.

892 {
893  return PluginManager::Get().GetSharedConfig(GetID(), group, key, value, defval);
894 }

References PluginManager::Get(), GetID(), PluginManager::GetSharedConfig(), and key.

Here is the call graph for this function:

◆ GetSharedConfigSubgroups()

bool Effect::GetSharedConfigSubgroups ( const RegistryPath group,
RegistryPaths subgroups 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 886 of file Effect.cpp.

887 {
888  return PluginManager::Get().GetSharedConfigSubgroups(GetID(), group, subgroups);
889 }

References PluginManager::Get(), GetID(), and PluginManager::GetSharedConfigSubgroups().

Here is the call graph for this function:

◆ GetSquashedName()

CommandID Effect::GetSquashedName ( wxString  name)
static

Definition at line 775 of file Effect.cpp.

776 {
777  // Get rid of leading and trailing white space
778  name.Trim(true).Trim(false);
779 
780  if (name.empty())
781  {
782  return name;
783  }
784 
785  wxStringTokenizer st(name, wxT(" "));
786  wxString id;
787 
788  // CamelCase the name
789  while (st.HasMoreTokens())
790  {
791  wxString tok = st.GetNextToken();
792 
793  id += tok.Left(1).MakeUpper() + tok.Mid(1).MakeLower();
794  }
795 
796  return id;
797 }

References TranslatableString::empty(), id, and name.

Referenced by ExportPresets(), EffectManager::GetCommandIdentifier(), and ImportPresets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol Effect::GetSymbol ( )
overridevirtual

Implements ComponentInterface.

Reimplemented in EffectWahwah, VampEffect, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectStereoToMono, EffectSilence, EffectScienFilter, EffectSBSMS, EffectReverse, EffectReverb, EffectRepeat, EffectRepair, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoiseRemoval, EffectNoiseReduction, EffectNoise, EffectLoudness, EffectInvert, EffectFindClipping, EffectFade, and EffectEqualization.

Definition at line 152 of file Effect.cpp.

153 {
154  if (mClient)
155  {
156  return mClient->GetSymbol();
157  }
158 
159  return {};
160 }

References ComponentInterface::GetSymbol(), and mClient.

Referenced by ExportPresets(), GetPath(), and ImportPresets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTailSize()

size_t Effect::GetTailSize ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 348 of file Effect.cpp.

349 {
350  if (mClient)
351  {
352  return mClient->GetTailSize();
353  }
354 
355  return 0;
356 }

References EffectClientInterface::GetTailSize(), and mClient.

Here is the call graph for this function:

◆ GetType()

EffectType Effect::GetType ( )
overridevirtual

Implements EffectDefinitionInterface.

Reimplemented in EffectWahwah, VampEffect, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectStereoToMono, EffectSilence, EffectScienFilter, EffectReverse, EffectReverb, EffectRepeat, EffectRepair, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoiseRemoval, EffectNoiseReduction, EffectNoise, EffectLoudness, EffectInvert, EffectFindClipping, EffectFade, and EffectEqualization.

Definition at line 132 of file Effect.cpp.

133 {
134  if (mClient)
135  {
136  return mClient->GetType();
137  }
138 
139  return EffectTypeNone;
140 }

References EffectTypeNone, EffectDefinitionInterface::GetType(), and mClient.

Referenced by EffectUIHost::BuildButtonBar(), DoEffect(), EffectUIHost::OnApply(), Preview(), ProcessPass(), ProcessTrack(), SetDuration(), and EffectUIHost::UpdateControls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUserPresets()

RegistryPaths Effect::GetUserPresets ( )
virtual

Definition at line 1150 of file Effect.cpp.

1151 {
1152  RegistryPaths presets;
1153 
1154  GetPrivateConfigSubgroups(GetUserPresetsGroup(wxEmptyString), presets);
1155 
1156  std::sort( presets.begin(), presets.end() );
1157 
1158  return presets;
1159 }

References GetPrivateConfigSubgroups(), and GetUserPresetsGroup().

Referenced by EffectManager::HasPresets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUserPresetsGroup()

RegistryPath Effect::GetUserPresetsGroup ( const RegistryPath name)
overridevirtual

Implements EffectHostInterface.

Definition at line 854 of file Effect.cpp.

855 {
856  RegistryPath group = wxT("UserPresets");
857  if (!name.empty())
858  {
859  group += wxCONFIG_PATH_SEPARATOR + name;
860  }
861 
862  return group;
863 }

References TranslatableString::empty(), and name.

Referenced by GetUserPresets(), EffectUIHost::LoadUserPresets(), EffectUIHost::OnDeletePreset(), EffectUIHost::OnSaveAs(), EffectUIHost::OnUserPreset(), SetAutomationParameters(), and EffectReverb::Startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetVendor()

VendorSymbol Effect::GetVendor ( )
overridevirtual

Implements ComponentInterface.

Reimplemented in VampEffect, and NyquistEffect.

Definition at line 162 of file Effect.cpp.

163 {
164  if (mClient)
165  {
166  return mClient->GetVendor();
167  }
168 
169  return XO("Audacity");
170 }

References ComponentInterface::GetVendor(), mClient, and XO.

Referenced by EffectUIHost::OnMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetVersion()

wxString Effect::GetVersion ( )
overridevirtual

Implements ComponentInterface.

Reimplemented in VampEffect, and NyquistEffect.

Definition at line 172 of file Effect.cpp.

173 {
174  if (mClient)
175  {
176  return mClient->GetVersion();
177  }
178 
179  return AUDACITY_VERSION_STRING;
180 }

References ComponentInterface::GetVersion(), and mClient.

Referenced by EffectUIHost::OnMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasCurrentSettings()

bool Effect::HasCurrentSettings ( )
virtual

Definition at line 1161 of file Effect.cpp.

1162 {
1164 }

References GetCurrentSettingsGroup(), and HasPrivateConfigGroup().

Referenced by EffectManager::GetDefaultPreset(), and EffectManager::HasPresets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasFactoryDefaults()

bool Effect::HasFactoryDefaults ( )
virtual

Definition at line 1166 of file Effect.cpp.

1167 {
1169 }

References GetFactoryDefaultsGroup(), and HasPrivateConfigGroup().

Referenced by EffectManager::GetDefaultPreset(), and EffectManager::HasPresets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasOptions()

bool Effect::HasOptions ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 799 of file Effect.cpp.

800 {
801  return false;
802 }

◆ HasPrivateConfigGroup()

bool Effect::HasPrivateConfigGroup ( const RegistryPath group)
overridevirtual

Implements ConfigClientInterface.

Definition at line 951 of file Effect.cpp.

952 {
954 }

References PluginManager::Get(), GetID(), and PluginManager::HasPrivateConfigGroup().

Referenced by HasCurrentSettings(), and HasFactoryDefaults().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasSharedConfigGroup()

bool Effect::HasSharedConfigGroup ( const RegistryPath group)
overridevirtual

Implements ConfigClientInterface.

Definition at line 881 of file Effect.cpp.

882 {
883  return PluginManager::Get().HasSharedConfigGroup(GetID(), group);
884 }

References PluginManager::Get(), GetID(), and PluginManager::HasSharedConfigGroup().

Here is the call graph for this function:

◆ HelpPage()

FilePath Effect::HelpPage ( )
virtual

Reimplemented in NyquistEffect.

Definition at line 1176 of file Effect.cpp.

1177 {
1178  return {};
1179 }

Referenced by EffectUIHost::Initialize(), and EffectUIHost::OnHelp().

Here is the caller graph for this function:

◆ HideUI()

bool Effect::HideUI ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 646 of file Effect.cpp.

647 {
648  return true;
649 }

◆ ImportPresets()

void Effect::ImportPresets ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 724 of file Effect.cpp.

725 {
726  wxString params;
727 
728  auto path = FileNames::SelectFile(FileNames::Operation::Presets,
729  XO("Import Effect Parameters"),
730  wxEmptyString,
731  wxEmptyString,
732  wxEmptyString,
733  PresetTypes(),
734  wxFD_OPEN | wxRESIZE_BORDER,
735  nullptr);
736  if (path.empty()) {
737  return;
738  }
739 
740  wxFFile f(path);
741  if (f.IsOpened()) {
742  if (f.ReadAll(&params)) {
743  wxString ident = params.BeforeFirst(':');
744  params = params.AfterFirst(':');
745 
746  wxString commandId = GetSquashedName(GetSymbol().Internal()).GET();
747 
748  if (ident != commandId) {
749  // effect identifiers are a sensible length!
750  // must also have some params.
751  if ((params.Length() < 2 ) || (ident.Length() < 2) || (ident.Length() > 30))
752  {
754  /* i18n-hint %s will be replaced by a file name */
755  XO("%s: is not a valid presets file.\n")
756  .Format(wxFileNameFromPath(path)));
757  }
758  else
759  {
761  /* i18n-hint %s will be replaced by a file name */
762  XO("%s: is for a different Effect, Generator or Analyzer.\n")
763  .Format(wxFileNameFromPath(path)));
764  }
765  return;
766  }
768  }
769  }
770 
771  //SetWindowTitle();
772 
773 }

References Identifier::GET(), GetSquashedName(), GetSymbol(), ident(), Internal, MessageBox(), params, PresetTypes(), FileNames::SelectFile(), SetAutomationParameters(), and XO.

Here is the call graph for this function:

◆ IncEffectCounter()

static void Effect::IncEffectCounter ( )
inlinestatic

Definition at line 279 of file Effect.h.

279 { nEffectsDone++;};

Referenced by SelectTracksCommand::Apply().

Here is the caller graph for this function:

◆ IncludeNotSelectedPreviewTracks()

void Effect::IncludeNotSelectedPreviewTracks ( bool  includeNotSelected)
protected

Definition at line 2011 of file Effect.cpp.

2012 {
2013  mPreviewWithNotSelected = includeNotSelected;
2014 }

References mPreviewWithNotSelected.

◆ Init()

bool Effect::Init ( )
protectedvirtual

Reimplemented in VampEffect, EffectTimeScale, EffectScienFilter, NyquistEffect, EffectNoiseRemoval, EffectNoiseReduction, Generator, EffectEqualization, EffectDtmf, EffectChangeSpeed, EffectAutoDuck, and EffectAmplify.

Definition at line 1350 of file Effect.cpp.

1351 {
1352  return true;
1353 }

Referenced by DoEffect(), and Preview().

Here is the caller graph for this function:

◆ InitPass1()

bool Effect::InitPass1 ( )
protectedvirtual

Reimplemented in EffectTwoPassSimpleMono, and EffectCompressor.

Definition at line 1360 of file Effect.cpp.

1361 {
1362  return true;
1363 }

Referenced by Process().

Here is the caller graph for this function:

◆ InitPass2()

bool Effect::InitPass2 ( )
protectedvirtual

Reimplemented in EffectTwoPassSimpleMono, and EffectCompressor.

Definition at line 1365 of file Effect.cpp.

1366 {
1367  return false;
1368 }

Referenced by Process().

Here is the caller graph for this function:

◆ inputTracks()

const TrackList* Effect::inputTracks ( ) const
inlineprotected

Definition at line 463 of file Effect.h.

463 { return mTracks; }

Referenced by EffectTruncSilence::CalcPreviewInputLength(), FindProject(), EffectAmplify::Init(), EffectAutoDuck::Init(), EffectScienFilter::Init(), VampEffect::Init(), EffectCompressor::InitPass1(), EffectFindClipping::Process(), VampEffect::Process(), EffectTruncSilence::ProcessAll(), EffectTruncSilence::ProcessIndependently(), and EffectStereoToMono::ProcessOne().

Here is the caller graph for this function:

◆ IsBatchProcessing()

bool Effect::IsBatchProcessing ( )
virtual

◆ IsDefault()

bool Effect::IsDefault ( )
overridevirtual

Implements EffectDefinitionInterface.

Reimplemented in VampEffect, and NyquistEffect.

Definition at line 214 of file Effect.cpp.

215 {
216  if (mClient)
217  {
218  return mClient->IsDefault();
219  }
220 
221  return true;
222 }

References EffectDefinitionInterface::IsDefault(), and mClient.

Here is the call graph for this function:

◆ IsGraphicalUI()

bool Effect::IsGraphicalUI ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 636 of file Effect.cpp.

637 {
638  return false;
639 }

◆ IsHidden()

bool Effect::IsHidden ( )
virtual

Reimplemented in EffectStereoToMono.

Definition at line 2289 of file Effect.cpp.

2290 {
2291  return false;
2292 }

Referenced by EffectManager::IsHidden().

Here is the caller graph for this function:

◆ IsInteractive()

bool Effect::IsInteractive ( )
overridevirtual

Implements EffectDefinitionInterface.

Reimplemented in VampEffect, EffectStereoToMono, EffectReverse, EffectRepair, NyquistEffect, EffectInvert, and EffectFade.

Definition at line 204 of file Effect.cpp.

205 {
206  if (mClient)
207  {
208  return mClient->IsInteractive();
209  }
210 
211  return true;
212 }

References EffectDefinitionInterface::IsInteractive(), and mClient.

Referenced by DoEffect(), and ShowInterface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLegacy()

bool Effect::IsLegacy ( )
overridevirtual

Implements EffectDefinitionInterface.

Definition at line 224 of file Effect.cpp.

225 {
226  if (mClient)
227  {
228  return false;
229  }
230 
231  return true;
232 }

References mClient.

◆ IsPreviewing()

bool Effect::IsPreviewing ( )
inlineprotected

Definition at line 363 of file Effect.h.

363 { return mIsPreview; }

Referenced by NyquistEffect::Process(), and EffectPaulstretch::ProcessOne().

Here is the caller graph for this function:

◆ IsReady()

bool Effect::IsReady ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 358 of file Effect.cpp.

359 {
360  if (mClient)
361  {
362  return mClient->IsReady();
363  }
364 
365  return true;
366 }

References EffectClientInterface::IsReady(), and mClient.

Here is the call graph for this function:

◆ LoadFactoryDefaults()

bool Effect::LoadFactoryDefaults ( )
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectEqualization.

Definition at line 605 of file Effect.cpp.

606 {
607  if (mClient)
608  {
609  return mClient->LoadFactoryDefaults();
610  }
611 
613 }

References GetFactoryDefaultsGroup(), EffectClientInterface::LoadFactoryDefaults(), LoadUserPreset(), and mClient.

Referenced by EffectChangeSpeed::LoadFactoryDefaults(), EffectEqualization::LoadFactoryDefaults(), and EffectUIHost::OnDefaults().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadFactoryPreset()

bool Effect::LoadFactoryPreset ( int  id)
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectReverb, and EffectEqualization.

Definition at line 595 of file Effect.cpp.

596 {
597  if (mClient)
598  {
599  return mClient->LoadFactoryPreset(id);
600  }
601 
602  return true;
603 }

References EffectClientInterface::LoadFactoryPreset(), and mClient.

Referenced by EffectUIHost::OnFactoryPreset(), and SetAutomationParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadUserPreset()

bool Effect::LoadUserPreset ( const RegistryPath name)
overridevirtual

Implements EffectClientInterface.

Definition at line 553 of file Effect.cpp.

554 {
555  if (mClient)
556  {
557  return mClient->LoadUserPreset(name);
558  }
559 
560  wxString parms;
561  if (!GetPrivateConfig(name, wxT("Parameters"), parms))
562  {
563  return false;
564  }
565 
566  return SetAutomationParameters(parms);
567 }

References GetPrivateConfig(), EffectClientInterface::LoadUserPreset(), mClient, name, and SetAutomationParameters().

Referenced by LoadFactoryDefaults(), EffectUIHost::OnUserPreset(), EffectEqualization::PopulateOrExchange(), SetAutomationParameters(), SetBatchProcessing(), and Startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ManualPage()

ManualPageID Effect::ManualPage ( )
virtual

Reimplemented in EffectWahwah, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectSilence, EffectScienFilter, EffectReverb, EffectRepeat, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoise, EffectLoudness, EffectFindClipping, EffectEqualization, EffectEcho, EffectDtmf, EffectDistortion, EffectCompressor, EffectClickRemoval, EffectChangeSpeed, EffectBassTreble, EffectAutoDuck, and EffectAmplify.

Definition at line 1171 of file Effect.cpp.

1172 {
1173  return {};
1174 }

Referenced by EffectManager::GetCommandUrl(), EffectUIHost::Initialize(), and EffectUIHost::OnHelp().

Here is the caller graph for this function:

◆ MessageBox()

int Effect::MessageBox ( const TranslatableString message,
long  style = DefaultMessageBoxStyle,
const TranslatableString titleStr = {} 
)

◆ ModifyAnalysisTrack()

auto Effect::ModifyAnalysisTrack ( const LabelTrack pOrigTrack,
const wxString &  name = wxString() 
)
protected

Definition at line 2184 of file Effect.cpp.

2186 {
2187  return{ this, pOrigTrack, name };
2188 }

References name.

Referenced by EffectFindClipping::Process().

Here is the caller graph for this function:

◆ PopulateOrExchange()

void Effect::PopulateOrExchange ( ShuttleGui S)
protectedvirtual

Reimplemented in EffectWahwah, VampEffect, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectSilence, EffectScienFilter, EffectReverb, EffectRepeat, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoise, EffectLoudness, EffectFindClipping, EffectEqualization, EffectEcho, EffectDtmf, EffectDistortion, EffectCompressor, EffectClickRemoval, EffectChangeSpeed, EffectBassTreble, EffectAutoDuck, and EffectAmplify.

Definition at line 1910 of file Effect.cpp.

1911 {
1912  return;
1913 }

Referenced by PopulateUI().

Here is the caller graph for this function:

◆ PopulateUI()

bool Effect::PopulateUI ( ShuttleGui S)
finalvirtual

Implements EffectUIClientInterface.

Definition at line 621 of file Effect.cpp.

622 {
623  auto parent = S.GetParent();
624  mUIParent = parent;
625  mUIParent->PushEventHandler(this);
626 
627 // LoadUserPreset(GetCurrentSettingsGroup());
628 
630 
631  mUIParent->SetMinSize(mUIParent->GetSizer()->GetMinSize());
632 
633  return true;
634 }

References ShuttleGuiBase::GetParent(), mUIParent, and PopulateOrExchange().

Here is the call graph for this function:

◆ Preview()

void Effect::Preview ( bool  dryOnly)
protectedvirtual

Reimplemented in EffectTimeScale, and EffectAmplify.

Definition at line 2294 of file Effect.cpp.

2295 {
2296  if (mNumTracks == 0) { // nothing to preview
2297  return;
2298  }
2299 
2300  auto gAudioIO = AudioIO::Get();
2301  if (gAudioIO->IsBusy()) {
2302  return;
2303  }
2304 
2305  wxWindow *FocusDialog = wxWindow::FindFocus();
2306 
2307  double previewDuration;
2308  bool isNyquist = GetFamily() == NYQUISTEFFECTS_FAMILY;
2309  bool isGenerator = GetType() == EffectTypeGenerate;
2310 
2311  // Mix a few seconds of audio from all of the tracks
2312  double previewLen;
2313  gPrefs->Read(wxT("/AudioIO/EffectsPreviewLen"), &previewLen, 6.0);
2314 
2315  const double rate = mProjectRate;
2316 
2317  if (isNyquist && isGenerator) {
2318  previewDuration = CalcPreviewInputLength(previewLen);
2319  }
2320  else {
2321  previewDuration = wxMin(mDuration, CalcPreviewInputLength(previewLen));
2322  }
2323 
2324  double t1 = mT0 + previewDuration;
2325 
2326  if ((t1 > mT1) && !isGenerator) {
2327  t1 = mT1;
2328  }
2329 
2330  if (t1 <= mT0)
2331  return;
2332 
2333  bool success = true;
2334 
2335  auto cleanup = finally( [&] {
2336 
2337  // Effect is already inited; we will call Process, End, and then Init
2338  // again, so the state is exactly the way it was before Preview
2339  // was called.
2340  if (!dryOnly) {
2341  End();
2342  GuardedCall( [&]{ Init(); } );
2343  }
2344 
2345  // In case any dialog control depends on mT1 or mDuration:
2346  if ( mUIDialog )
2347  mUIDialog->TransferDataToWindow();
2348  } );
2349 
2350  auto vr0 = valueRestorer( mT0 );
2351  auto vr1 = valueRestorer( mT1 );
2352  // Most effects should stop at t1.
2353  if (!mPreviewFullSelection)
2354  mT1 = t1;
2355 
2356  // In case any dialog control depends on mT1 or mDuration:
2357  if ( mUIDialog ) {
2358  mUIDialog->TransferDataToWindow();
2359  }
2360 
2361  // Save the original track list
2362  TrackList *saveTracks = mTracks;
2363 
2364  auto cleanup2 = finally( [&] {
2365  mTracks = saveTracks;
2366  if (FocusDialog) {
2367  FocusDialog->SetFocus();
2368  }
2369 
2370  // In case of failed effect, be sure to free memory.
2371  ReplaceProcessedTracks( false );
2372  } );
2373 
2374  // Build NEW tracklist from rendering tracks
2375  // Set the same owning project, so FindProject() can see it within Process()
2376  const auto pProject = saveTracks->GetOwner();
2377  auto uTracks = TrackList::Create( pProject );
2378  mTracks = uTracks.get();
2379 
2380  // Linear Effect preview optimised by pre-mixing to one track.
2381  // Generators need to generate per track.
2382  if (mIsLinearEffect && !isGenerator) {
2383  WaveTrack::Holder mixLeft, mixRight;
2384  MixAndRender(saveTracks, mFactory, rate, floatSample, mT0, t1, mixLeft, mixRight);
2385  if (!mixLeft)
2386  return;
2387 
2388  mixLeft->Offset(-mixLeft->GetStartTime());
2389  mixLeft->SetSelected(true);
2390  WaveTrackView::Get( *mixLeft )
2392  auto pLeft = mTracks->Add( mixLeft );
2393  Track *pRight{};
2394  if (mixRight) {
2395  mixRight->Offset(-mixRight->GetStartTime());
2396  mixRight->SetSelected(true);
2397  pRight = mTracks->Add( mixRight );
2398  }
2399  mTracks->GroupChannels(*pLeft, pRight ? 2 : 1);
2400  }
2401  else {
2402  for (auto src : saveTracks->Any< const WaveTrack >()) {
2403  if (src->GetSelected() || mPreviewWithNotSelected) {
2404  auto dest = src->Copy(mT0, t1);
2405  dest->SetSelected(src->GetSelected());
2406  WaveTrackView::Get( *static_cast<WaveTrack*>(dest.get()) )
2408  mTracks->Add( dest );
2409  }
2410  }
2411  }
2412 
2413  // NEW tracks start at time zero.
2414  // Adjust mT0 and mT1 to be the times to process, and to
2415  // play back in these tracks
2416  mT1 -= mT0;
2417  mT0 = 0.0;
2418 
2419  // Update track/group counts
2420  CountWaveTracks();
2421 
2422  // Apply effect
2423  if (!dryOnly) {
2424  ProgressDialog progress{
2425  GetName(),
2426  XO("Preparing preview"),
2428  }; // Have only "Stop" button.
2429  auto vr = valueRestorer( mProgress, &progress );
2430 
2431  auto vr2 = valueRestorer( mIsPreview, true );
2432 
2433  success = Process();
2434  }
2435 
2436  if (success)
2437  {
2438  auto tracks = ProjectAudioManager::GetAllPlaybackTracks(*mTracks, true);
2439 
2440  // Some effects (Paulstretch) may need to generate more
2441  // than previewLen, so take the min.
2442  t1 = std::min(mT0 + previewLen, mT1);
2443 
2444  // Start audio playing
2445  auto options = DefaultPlayOptions(*pProject);
2446  int token =
2447  gAudioIO->StartStream(tracks, mT0, t1, options);
2448 
2449  if (token) {
2450  auto previewing = ProgressResult::Success;
2451  // The progress dialog must be deleted before stopping the stream
2452  // to allow events to flow to the app during StopStream processing.
2453  // The progress dialog blocks these events.
2454  {
2455  ProgressDialog progress
2456  (GetName(), XO("Previewing"), pdlgHideCancelButton);
2457 
2458  while (gAudioIO->IsStreamActive(token) && previewing == ProgressResult::Success) {
2459  ::wxMilliSleep(100);
2460  previewing = progress.Update(gAudioIO->GetStreamTime() - mT0, t1 - mT0);
2461  }
2462  }
2463 
2464  gAudioIO->StopStream();
2465 
2466  while (gAudioIO->IsBusy()) {
2467  ::wxMilliSleep(100);
2468  }
2469  }
2470  else {
2471  using namespace BasicUI;
2473  wxWidgetsWindowPlacement{ FocusDialog }, XO("Error"),
2474  XO("Error opening sound device.\nTry changing the audio host, playback device and the project sample rate."),
2475  wxT("Error_opening_sound_device"),
2476  ErrorDialogOptions{ ErrorDialogType::ModalErrorReport } );
2477  }
2478  }
2479 }

References TrackList::Add(), TrackList::Any(), CalcPreviewInputLength(), CountWaveTracks(), TrackList::Create(), DefaultPlayOptions(), EffectTypeGenerate, End(), floatSample, AudioIO::Get(), WaveTrackView::Get(), ProjectAudioManager::GetAllPlaybackTracks(), GetFamily(), ComponentInterface::GetName(), TrackList::GetOwner(), GetType(), gPrefs, TrackList::GroupChannels(), GuardedCall(), Init(), mDuration, mFactory, min(), mIsLinearEffect, mIsPreview, MixAndRender(), mNumTracks, mPreviewFullSelection, mPreviewWithNotSelected, mProgress, mProjectRate, mT0, mT1, mTracks, mUIDialog, WaveTrackViewConstants::NoDisplay, NYQUISTEFFECTS_FAMILY, Track::Offset(), pdlgHideCancelButton, Process(), ReplaceProcessedTracks(), WaveTrackView::SetDisplay(), BasicUI::ShowErrorDialog(), BasicUI::Success, ProgressDialog::Update(), valueRestorer(), and XO.

Referenced by EffectUIHost::OnPlay(), NoiseRemovalDialog::OnPreview(), EffectAmplify::Preview(), and EffectTimeScale::Preview().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Process()

bool Effect::Process ( )
protectedvirtual

Reimplemented in VampEffect, EffectTwoPassSimpleMono, EffectTruncSilence, EffectTimeScale, EffectStereoToMono, EffectSimpleMono, EffectSBSMS, EffectReverse, EffectRepeat, EffectRepair, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoiseRemoval, EffectNoiseReduction, EffectLoudness, Generator, EffectFindClipping, EffectEqualization, EffectClickRemoval, EffectChangeSpeed, and EffectAutoDuck.

Definition at line 1370 of file Effect.cpp.

1371 {
1372  CopyInputTracks(true);
1373  bool bGoodResult = true;
1374 
1375  // It's possible that the number of channels the effect expects changed based on
1376  // the parameters (the Audacity Reverb effect does when the stereo width is 0).
1379 
1380  mPass = 1;
1381  if (InitPass1())
1382  {
1383  bGoodResult = ProcessPass();
1384  mPass = 2;
1385  if (bGoodResult && InitPass2())
1386  {
1387  bGoodResult = ProcessPass();
1388  }
1389  }
1390 
1391  ReplaceProcessedTracks(bGoodResult);
1392 
1393  return bGoodResult;
1394 }

References CopyInputTracks(), GetAudioInCount(), GetAudioOutCount(), InitPass1(), InitPass2(), mNumAudioIn, mNumAudioOut, mPass, ProcessPass(), and ReplaceProcessedTracks().

Referenced by DoEffect(), and Preview().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessBlock()

size_t Effect::ProcessBlock ( float **  inBlock,
float **  outBlock,
size_t  blockLen 
)
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, EffectToneGen, EffectScienFilter, EffectReverb, EffectPhaser, EffectNoise, EffectInvert, and EffectFade.

Definition at line 388 of file Effect.cpp.

389 {
390  if (mClient)
391  {
392  return mClient->ProcessBlock(inBlock, outBlock, blockLen);
393  }
394 
395  return 0;
396 }

References mClient, and EffectClientInterface::ProcessBlock().

Referenced by ProcessTrack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessFinalize()

bool Effect::ProcessFinalize ( )
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectReverb.

Definition at line 378 of file Effect.cpp.

379 {
380  if (mClient)
381  {
382  return mClient->ProcessFinalize();
383  }
384 
385  return true;
386 }

References mClient, and EffectClientInterface::ProcessFinalize().

Referenced by ProcessTrack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessInitialize()

bool Effect::ProcessInitialize ( sampleCount  totalLen,
ChannelNames  chanMap = NULL 
)
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, EffectToneGen, EffectScienFilter, EffectReverb, EffectPhaser, and EffectFade.

Definition at line 368 of file Effect.cpp.

369 {
370  if (mClient)
371  {
372  return mClient->ProcessInitialize(totalLen, chanMap);
373  }
374 
375  return true;
376 }

References mClient, and EffectClientInterface::ProcessInitialize().

Referenced by ProcessTrack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessPass()

bool Effect::ProcessPass ( )
protectedvirtual

Reimplemented in EffectTwoPassSimpleMono.

Definition at line 1396 of file Effect.cpp.

1397 {
1398  bool bGoodResult = true;
1399  bool isGenerator = GetType() == EffectTypeGenerate;
1400 
1401  FloatBuffers inBuffer, outBuffer;
1402  ArrayOf<float *> inBufPos, outBufPos;
1403 
1404  ChannelName map[3];
1405 
1406  mBufferSize = 0;
1407  mBlockSize = 0;
1408 
1409  int count = 0;
1410  bool clear = false;
1411 
1412  const bool multichannel = mNumAudioIn > 1;
1413  auto range = multichannel
1414  ? mOutputTracks->Leaders()
1415  : mOutputTracks->Any();
1416  range.VisitWhile( bGoodResult,
1417  [&](WaveTrack *left, const Track::Fallthrough &fallthrough) {
1418  if (!left->GetSelected())
1419  return fallthrough();
1420 
1421  sampleCount len = 0;
1422  sampleCount start = 0;
1423 
1424  mNumChannels = 0;
1425  WaveTrack *right{};
1426 
1427  // Iterate either over one track which could be any channel,
1428  // or if multichannel, then over all channels of left,
1429  // which is a leader.
1430  for (auto channel :
1431  TrackList::Channels(left).StartingWith(left)) {
1432  if (channel->GetChannel() == Track::LeftChannel)
1434  else if (channel->GetChannel() == Track::RightChannel)
1436  else
1438 
1439  ++ mNumChannels;
1441 
1442  if (! multichannel)
1443  break;
1444 
1445  if (mNumChannels == 2) {
1446  // TODO: more-than-two-channels
1447  right = channel;
1448  clear = false;
1449  // Ignore other channels
1450  break;
1451  }
1452  }
1453 
1454  if (!isGenerator)
1455  {
1456  GetBounds(*left, right, &start, &len);
1457  mSampleCnt = len;
1458  }
1459  else
1461 
1462  // Let the client know the sample rate
1463  SetSampleRate(left->GetRate());
1464 
1465  // Get the block size the client wants to use
1466  auto max = left->GetMaxBlockSize() * 2;
1467  mBlockSize = SetBlockSize(max);
1468 
1469  // Calculate the buffer size to be at least the max rounded up to the clients
1470  // selected block size.
1471  const auto prevBufferSize = mBufferSize;
1472  mBufferSize = ((max + (mBlockSize - 1)) / mBlockSize) * mBlockSize;
1473 
1474  // If the buffer size has changed, then (re)allocate the buffers
1475  if (prevBufferSize != mBufferSize)
1476  {
1477  // Always create the number of input buffers the client expects even if we don't have
1478  // the same number of channels.
1479  inBufPos.reinit( mNumAudioIn );
1480  inBuffer.reinit( mNumAudioIn, mBufferSize );
1481 
1482  // We won't be using more than the first 2 buffers, so clear the rest (if any)
1483  for (size_t i = 2; i < mNumAudioIn; i++)
1484  {
1485  for (size_t j = 0; j < mBufferSize; j++)
1486  {
1487  inBuffer[i][j] = 0.0;
1488  }
1489  }
1490 
1491  // Always create the number of output buffers the client expects even if we don't have
1492  // the same number of channels.
1493  outBufPos.reinit( mNumAudioOut );
1494  // Output buffers get an extra mBlockSize worth to give extra room if
1495  // the plugin adds latency
1496  outBuffer.reinit( mNumAudioOut, mBufferSize + mBlockSize );
1497  }
1498 
1499  // (Re)Set the input buffer positions
1500  for (size_t i = 0; i < mNumAudioIn; i++)
1501  {
1502  inBufPos[i] = inBuffer[i].get();
1503  }
1504 
1505  // (Re)Set the output buffer positions
1506  for (size_t i = 0; i < mNumAudioOut; i++)
1507  {
1508  outBufPos[i] = outBuffer[i].get();
1509  }
1510 
1511  // Clear unused input buffers
1512  if (!right && !clear && mNumAudioIn > 1)
1513  {
1514  for (size_t j = 0; j < mBufferSize; j++)
1515  {
1516  inBuffer[1][j] = 0.0;
1517  }
1518  clear = true;
1519  }
1520 
1521  // Go process the track(s)
1522  bGoodResult = ProcessTrack(
1523  count, map, left, right, start, len,
1524  inBuffer, outBuffer, inBufPos, outBufPos);
1525  if (!bGoodResult)
1526  return;
1527 
1528  count++;
1529  },
1530  [&](Track *t) {
1531  if (t->IsSyncLockSelected())
1532  t->SyncLockAdjust(mT1, mT0 + mDuration);
1533  }
1534  );
1535 
1536  if (bGoodResult && GetType() == EffectTypeGenerate)
1537  {
1538  mT1 = mT0 + mDuration;
1539  }
1540 
1541  return bGoodResult;
1542 }

References ChannelNameEOL, ChannelNameFrontLeft, ChannelNameFrontRight, ChannelNameMono, TrackList::Channels(), EffectTypeGenerate, GetBounds(), WaveTrack::GetMaxBlockSize(), WaveTrack::GetRate(), Track::GetSelected(), GetType(), Track::LeftChannel, mBlockSize, mBufferSize, mDuration, mNumAudioIn, mNumAudioOut, mNumChannels, mOutputTracks, mSampleCnt, mT0, mT1, ProcessTrack(), ArraysOf< X >::reinit(), ArrayOf< X >::reinit(), Track::RightChannel, SetBlockSize(), SetSampleRate(), and WaveTrack::TimeToLongSamples().

Referenced by Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessTrack()

bool Effect::ProcessTrack ( int  count,
ChannelNames  map,
WaveTrack left,
WaveTrack right,
sampleCount  start,
sampleCount  len,
FloatBuffers inBuffer,
FloatBuffers outBuffer,
ArrayOf< float * > &  inBufPos,
ArrayOf< float * > &  outBufPos 
)
private

Definition at line 1544 of file Effect.cpp.

1554 {
1555  bool rc = true;
1556 
1557  // Give the plugin a chance to initialize
1558  if (!ProcessInitialize(len, map))
1559  {
1560  return false;
1561  }
1562 
1563  { // Start scope for cleanup
1564  auto cleanup = finally( [&] {
1565  // Allow the plugin to cleanup
1566  if (!ProcessFinalize())
1567  {
1568  // In case of non-exceptional flow of control, set rc
1569  rc = false;
1570  }
1571  } );
1572 
1573  // For each input block of samples, we pass it to the effect along with a
1574  // variable output location. This output location is simply a pointer into a
1575  // much larger buffer. This reduces the number of calls required to add the
1576  // samples to the output track.
1577  //
1578  // Upon return from the effect, the output samples are "moved to the left" by
1579  // the number of samples in the current latency setting, effectively removing any
1580  // delay introduced by the effect.
1581  //
1582  // At the same time the total number of delayed samples are gathered and when
1583  // there is no further input data to process, the loop continues to call the
1584  // effect with an empty input buffer until the effect has had a chance to
1585  // return all of the remaining delayed samples.
1586  auto inPos = start;
1587  auto outPos = start;
1588 
1589  auto inputRemaining = len;
1590  decltype(GetLatency()) curDelay = 0, delayRemaining = 0;
1591  decltype(mBlockSize) curBlockSize = 0;
1592 
1593  decltype(mBufferSize) inputBufferCnt = 0;
1594  decltype(mBufferSize) outputBufferCnt = 0;
1595  bool cleared = false;
1596 
1597  auto chans = std::min<unsigned>(mNumAudioOut, mNumChannels);
1598 
1599  std::shared_ptr<WaveTrack> genLeft, genRight;
1600 
1601  decltype(len) genLength = 0;
1602  bool isGenerator = GetType() == EffectTypeGenerate;
1603  bool isProcessor = GetType() == EffectTypeProcess;
1604  double genDur = 0;
1605  if (isGenerator)
1606  {
1607  if (mIsPreview) {
1608  gPrefs->Read(wxT("/AudioIO/EffectsPreviewLen"), &genDur, 6.0);
1609  genDur = wxMin(mDuration, CalcPreviewInputLength(genDur));
1610  }
1611  else {
1612  genDur = mDuration;
1613  }
1614 
1615  genLength = sampleCount((left->GetRate() * genDur) + 0.5); // round to nearest sample
1616  delayRemaining = genLength;
1617  cleared = true;
1618 
1619  // Create temporary tracks
1620  genLeft = left->EmptyCopy();
1621 
1622  if (right)
1623  genRight = right->EmptyCopy();
1624  }
1625 
1626  // Call the effect until we run out of input or delayed samples
1627  while (inputRemaining != 0 || delayRemaining != 0)
1628  {
1629  // Still working on the input samples
1630  if (inputRemaining != 0)
1631  {
1632  // Need to refill the input buffers
1633  if (inputBufferCnt == 0)
1634  {
1635  // Calculate the number of samples to get
1636  inputBufferCnt =
1637  limitSampleBufferSize( mBufferSize, inputRemaining );
1638 
1639  // Fill the input buffers
1640  left->GetFloats(inBuffer[0].get(), inPos, inputBufferCnt);
1641  if (right)
1642  {
1643  right->GetFloats(inBuffer[1].get(), inPos, inputBufferCnt);
1644  }
1645 
1646  // Reset the input buffer positions
1647  for (size_t i = 0; i < mNumChannels; i++)
1648  {
1649  inBufPos[i] = inBuffer[i].get();
1650  }
1651  }
1652 
1653  // Calculate the number of samples to process
1654  curBlockSize = mBlockSize;
1655  if (curBlockSize > inputRemaining)
1656  {
1657  // We've reached the last block...set current block size to what's left
1658  // inputRemaining is positive and bounded by a size_t
1659  curBlockSize = inputRemaining.as_size_t();
1660  inputRemaining = 0;
1661 
1662  // Clear the remainder of the buffers so that a full block can be passed
1663  // to the effect
1664  auto cnt = mBlockSize - curBlockSize;
1665  for (size_t i = 0; i < mNumChannels; i++)
1666  {
1667  for (decltype(cnt) j = 0 ; j < cnt; j++)
1668  {
1669  inBufPos[i][j + curBlockSize] = 0.0;
1670  }
1671  }
1672 
1673  // Might be able to use up some of the delayed samples
1674  if (delayRemaining != 0)
1675  {
1676  // Don't use more than needed
1677  cnt = limitSampleBufferSize(cnt, delayRemaining);
1678  delayRemaining -= cnt;
1679  curBlockSize += cnt;
1680  }
1681  }
1682  }
1683  // We've exhausted the input samples and are now working on the delay
1684  else if (delayRemaining != 0)
1685  {
1686  // Calculate the number of samples to process
1687  curBlockSize = limitSampleBufferSize( mBlockSize, delayRemaining );
1688  delayRemaining -= curBlockSize;
1689 
1690  // From this point on, we only want to feed zeros to the plugin
1691  if (!cleared)
1692  {
1693  // Reset the input buffer positions
1694  for (size_t i = 0; i < mNumChannels; i++)
1695  {
1696  inBufPos[i] = inBuffer[i].get();
1697 
1698  // And clear
1699  for (size_t j = 0; j < mBlockSize; j++)
1700  {
1701  inBuffer[i][j] = 0.0;
1702  }
1703  }
1704  cleared = true;
1705  }
1706  }
1707 
1708  // Finally call the plugin to process the block
1709  decltype(curBlockSize) processed;
1710  try
1711  {
1712  processed = ProcessBlock(inBufPos.get(), outBufPos.get(), curBlockSize);
1713  }
1714  catch( const AudacityException & WXUNUSED(e) )
1715  {
1716  // PRL: Bug 437:
1717  // Pass this along to our application-level handler
1718  throw;
1719  }
1720  catch(...)
1721  {
1722  // PRL:
1723  // Exceptions for other reasons, maybe in third-party code...
1724  // Continue treating them as we used to, but I wonder if these
1725  // should now be treated the same way.
1726  return false;
1727  }
1728  wxASSERT(processed == curBlockSize);
1729  wxUnusedVar(processed);
1730 
1731  // Bump to next input buffer position
1732  if (inputRemaining != 0)
1733  {
1734  for (size_t i = 0; i < mNumChannels; i++)
1735  {
1736  inBufPos[i] += curBlockSize;
1737  }
1738  inputRemaining -= curBlockSize;
1739  inputBufferCnt -= curBlockSize;
1740  }
1741 
1742  // "ls" and "rs" serve as the input sample index for the left and
1743  // right channels when processing the input samples. If we flip
1744  // over to processing delayed samples, they simply become counters
1745  // for the progress display.
1746  inPos += curBlockSize;
1747 
1748  // Get the current number of delayed samples and accumulate
1749  if (isProcessor)
1750  {
1751  {
1752  auto delay = GetLatency();
1753  curDelay += delay;
1754  delayRemaining += delay;
1755  }
1756 
1757  // If the plugin has delayed the output by more samples than our current
1758  // block size, then we leave the output pointers alone. This effectively
1759  // removes those delayed samples from the output buffer.
1760  if (curDelay >= curBlockSize)
1761  {
1762  curDelay -= curBlockSize;
1763  curBlockSize = 0;
1764  }
1765  // We have some delayed samples, at the beginning of the output samples,
1766  // so overlay them by shifting the remaining output samples.
1767  else if (curDelay > 0)
1768  {
1769  // curDelay is bounded by curBlockSize:
1770  auto delay = curDelay.as_size_t();
1771  curBlockSize -= delay;
1772  for (size_t i = 0; i < chans; i++)
1773  {
1774  memmove(outBufPos[i], outBufPos[i] + delay, sizeof(float) * curBlockSize);
1775  }
1776  curDelay = 0;
1777  }
1778  }
1779 
1780  // Adjust the number of samples in the output buffers
1781  outputBufferCnt += curBlockSize;
1782 
1783  // Still have room in the output buffers
1784  if (outputBufferCnt < mBufferSize)
1785  {
1786  // Bump to next output buffer position
1787  for (size_t i = 0; i < chans; i++)
1788  {
1789  outBufPos[i] += curBlockSize;
1790  }
1791  }
1792  // Output buffers have filled
1793  else
1794  {
1795  if (isProcessor)
1796  {
1797  // Write them out
1798  left->Set((samplePtr) outBuffer[0].get(), floatSample, outPos, outputBufferCnt);
1799  if (right)
1800  {
1801  if (chans >= 2)
1802  {
1803  right->Set((samplePtr) outBuffer[1].get(), floatSample, outPos, outputBufferCnt);
1804  }
1805  else
1806  {
1807  right->Set((samplePtr) outBuffer[0].get(), floatSample, outPos, outputBufferCnt);
1808  }
1809  }
1810  }
1811  else if (isGenerator)
1812  {
1813  genLeft->Append((samplePtr) outBuffer[0].get(), floatSample, outputBufferCnt);
1814  if (genRight)
1815  {
1816  genRight->Append((samplePtr) outBuffer[1].get(), floatSample, outputBufferCnt);
1817  }
1818  }
1819 
1820  // Reset the output buffer positions
1821  for (size_t i = 0; i < chans; i++)
1822  {
1823  outBufPos[i] = outBuffer[i].get();
1824  }
1825 
1826  // Bump to the next track position
1827  outPos += outputBufferCnt;
1828  outputBufferCnt = 0;
1829  }
1830 
1831  if (mNumChannels > 1)
1832  {
1833  if (TrackGroupProgress(count,
1834  (inPos - start).as_double() /
1835  (isGenerator ? genLength : len).as_double()))
1836  {
1837  rc = false;
1838  break;
1839  }
1840  }
1841  else
1842  {
1843  if (TrackProgress(count,
1844  (inPos - start).as_double() /
1845  (isGenerator ? genLength : len).as_double()))
1846  {
1847  rc = false;
1848  break;
1849  }
1850  }
1851  }
1852 
1853  // Put any remaining output
1854  if (rc && outputBufferCnt)
1855  {
1856  if (isProcessor)
1857  {
1858  left->Set((samplePtr) outBuffer[0].get(), floatSample, outPos, outputBufferCnt);
1859  if (right)
1860  {
1861  if (chans >= 2)
1862  {
1863  right->Set((samplePtr) outBuffer[1].get(), floatSample, outPos, outputBufferCnt);
1864  }
1865  else
1866  {
1867  right->Set((samplePtr) outBuffer[0].get(), floatSample, outPos, outputBufferCnt);
1868  }
1869  }
1870  }
1871  else if (isGenerator)
1872  {
1873  genLeft->Append((samplePtr) outBuffer[0].get(), floatSample, outputBufferCnt);
1874  if (genRight)
1875  {
1876  genRight->Append((samplePtr) outBuffer[1].get(), floatSample, outputBufferCnt);
1877  }
1878  }
1879  }
1880 
1881  if (rc && isGenerator)
1882  {
1883  auto pProject = FindProject();
1884 
1885  // Transfer the data from the temporary tracks to the actual ones
1886  genLeft->Flush();
1887  // mT1 gives us the NEW selection. We want to replace up to GetSel1().
1888  auto &selectedRegion = ViewInfo::Get( *pProject ).selectedRegion;
1889  auto t1 = selectedRegion.t1();
1890  PasteTimeWarper warper{ t1, mT0 + genLeft->GetEndTime() };
1891  left->ClearAndPaste(mT0, t1, genLeft.get(), true, true,
1892  &warper);
1893 
1894  if (genRight)
1895  {
1896  genRight->Flush();
1897  right->ClearAndPaste(mT0, selectedRegion.t1(),
1898  genRight.get(), true, true, nullptr /* &warper */);
1899  }
1900  }
1901 
1902  } // End scope for cleanup
1903  return rc;
1904 }

References WaveTrack::Append(), CalcPreviewInputLength(), WaveTrack::ClearAndPaste(), EffectTypeGenerate, EffectTypeProcess, WaveTrack::EmptyCopy(), FindProject(), floatSample, WaveTrack::Flush(), ViewInfo::Get(), WaveTrack::GetEndTime(), WaveTrack::GetFloats(), GetLatency(), WaveTrack::GetRate(), GetType(), gPrefs, limitSampleBufferSize(), mBlockSize, mBufferSize, mDuration, mIsPreview, mNumAudioOut, mNumChannels, mT0, ProcessBlock(), ProcessFinalize(), ProcessInitialize(), ViewInfo::selectedRegion, WaveTrack::Set(), NotifyingSelectedRegion::t1(), TrackGroupProgress(), and TrackProgress().

Referenced by ProcessPass().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RealtimeAddProcessor()

bool Effect::RealtimeAddProcessor ( unsigned  numChannels,
float  sampleRate 
)
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, and EffectPhaser.

Definition at line 411 of file Effect.cpp.

412 {
413  if (mClient)
414  {
415  return mClient->RealtimeAddProcessor(numChannels, sampleRate);
416  }
417 
418  return true;
419 }

References mClient, and EffectClientInterface::RealtimeAddProcessor().

Here is the call graph for this function:

◆ RealtimeFinalize()

bool Effect::RealtimeFinalize ( )
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, and EffectPhaser.

Definition at line 421 of file Effect.cpp.

422 {
423  if (mClient)
424  {
425  return mClient->RealtimeFinalize();
426  }
427 
428  return false;
429 }

References mClient, and EffectClientInterface::RealtimeFinalize().

Here is the call graph for this function:

◆ RealtimeInitialize()

bool Effect::RealtimeInitialize ( )
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, and EffectPhaser.

Definition at line 398 of file Effect.cpp.

399 {
400  if (mClient)
401  {
403  return mClient->RealtimeInitialize();
404  }
405 
406  mBlockSize = 512;
407 
408  return false;
409 }

References mBlockSize, mClient, EffectClientInterface::RealtimeInitialize(), and EffectClientInterface::SetBlockSize().

Here is the call graph for this function:

◆ RealtimeProcess()

size_t Effect::RealtimeProcess ( int  group,
float **  inbuf,
float **  outbuf,
size_t  numSamples 
)
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, and EffectPhaser.

Definition at line 457 of file Effect.cpp.

461 {
462  if (mClient)
463  {
464  return mClient->RealtimeProcess(group, inbuf, outbuf, numSamples);
465  }
466 
467  return 0;
468 }

References mClient, and EffectClientInterface::RealtimeProcess().

Here is the call graph for this function:

◆ RealtimeProcessEnd()

bool Effect::RealtimeProcessEnd ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 470 of file Effect.cpp.

471 {
472  if (mClient)
473  {
474  return mClient->RealtimeProcessEnd();
475  }
476 
477  return true;
478 }

References mClient, and EffectClientInterface::RealtimeProcessEnd().

Here is the call graph for this function:

◆ RealtimeProcessStart()

bool Effect::RealtimeProcessStart ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 447 of file Effect.cpp.

448 {
449  if (mClient)
450  {
451  return mClient->RealtimeProcessStart();
452  }
453 
454  return true;
455 }

References mClient, and EffectClientInterface::RealtimeProcessStart().

Here is the call graph for this function:

◆ RealtimeResume()

bool Effect::RealtimeResume ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 439 of file Effect.cpp.

440 {
441  if (mClient)
442  return mClient->RealtimeResume();
443 
444  return true;
445 }

References mClient, and EffectClientInterface::RealtimeResume().

Here is the call graph for this function:

◆ RealtimeSuspend()

bool Effect::RealtimeSuspend ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 431 of file Effect.cpp.

432 {
433  if (mClient)
434  return mClient->RealtimeSuspend();
435 
436  return true;
437 }

References mClient, and EffectClientInterface::RealtimeSuspend().

Here is the call graph for this function:

◆ RemovePrivateConfig()

bool Effect::RemovePrivateConfig ( const RegistryPath group,
const RegistryPath key 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 1016 of file Effect.cpp.

1017 {
1018  return PluginManager::Get().RemovePrivateConfig(GetID(), group, key);
1019 }

References PluginManager::Get(), GetID(), key, and PluginManager::RemovePrivateConfig().

Here is the call graph for this function:

◆ RemovePrivateConfigSubgroup()

bool Effect::RemovePrivateConfigSubgroup ( const RegistryPath group)
overridevirtual

Implements ConfigClientInterface.

Definition at line 1011 of file Effect.cpp.

1012 {
1014 }

References PluginManager::Get(), GetID(), and PluginManager::RemovePrivateConfigSubgroup().

Referenced by EffectUIHost::OnDeletePreset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveSharedConfig()

bool Effect::RemoveSharedConfig ( const RegistryPath group,
const RegistryPath key 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 946 of file Effect.cpp.

947 {
948  return PluginManager::Get().RemoveSharedConfig(GetID(), group, key);
949 }

References PluginManager::Get(), GetID(), key, and PluginManager::RemoveSharedConfig().

Here is the call graph for this function:

◆ RemoveSharedConfigSubgroup()

bool Effect::RemoveSharedConfigSubgroup ( const RegistryPath group)
overridevirtual

Implements ConfigClientInterface.

Definition at line 941 of file Effect.cpp.

942 {
944 }

References PluginManager::Get(), GetID(), and PluginManager::RemoveSharedConfigSubgroup().

Here is the call graph for this function:

◆ ReplaceProcessedTracks()

void Effect::ReplaceProcessedTracks ( const bool  bGoodResult)
protected

Definition at line 2192 of file Effect.cpp.

2193 {
2194  if (!bGoodResult) {
2195  // Free resources, unless already freed.
2196 
2197  // Processing failed or was cancelled so throw away the processed tracks.
2198  if ( mOutputTracks )
2199  mOutputTracks->Clear();
2200 
2201  // Reset map
2202  mIMap.clear();
2203  mOMap.clear();
2204 
2205  //TODO:undo the non-gui ODTask transfer
2206  return;
2207  }
2208 
2209  // Assume resources need to be freed.
2210  wxASSERT(mOutputTracks); // Make sure we at least did the CopyInputTracks().
2211 
2212  auto iterOut = mOutputTracks->ListOfTracks::begin(),
2213  iterEnd = mOutputTracks->ListOfTracks::end();
2214 
2215  size_t cnt = mOMap.size();
2216  size_t i = 0;
2217 
2218  for (; iterOut != iterEnd; ++i) {
2219  ListOfTracks::value_type o = *iterOut;
2220  // If tracks were removed from mOutputTracks, then there will be
2221  // tracks in the map that must be removed from mTracks.
2222  while (i < cnt && mOMap[i] != o.get()) {
2223  const auto t = mIMap[i];
2224  if (t) {
2225  mTracks->Remove(t);
2226  }
2227  i++;
2228  }
2229 
2230  // This should never happen
2231  wxASSERT(i < cnt);
2232 
2233  // Remove the track from the output list...don't DELETE it
2234  iterOut = mOutputTracks->erase(iterOut);
2235 
2236  const auto t = mIMap[i];
2237  if (t == NULL)
2238  {
2239  // This track is a NEW addition to output tracks; add it to mTracks
2240  mTracks->Add( o );
2241  }
2242  else
2243  {
2244  // Replace mTracks entry with the NEW track
2245  mTracks->Replace(t, o);
2246  }
2247  }
2248 
2249  // If tracks were removed from mOutputTracks, then there may be tracks
2250  // left at the end of the map that must be removed from mTracks.
2251  while (i < cnt) {
2252  const auto t = mIMap[i];
2253  if (t) {
2254  mTracks->Remove(t);
2255  }
2256  i++;
2257  }
2258 
2259  // Reset map
2260  mIMap.clear();
2261  mOMap.clear();
2262 
2263  // Make sure we processed everything
2264  wxASSERT(mOutputTracks->empty());
2265 
2266  // The output list is no longer needed
2267  mOutputTracks.reset();
2268  nEffectsDone++;
2269 }

References TrackList::Add(), mIMap, mOMap, mOutputTracks, mTracks, nEffectsDone, TrackList::Remove(), and TrackList::Replace().

Referenced by DoEffect(), EffectTruncSilence::DoRemoval(), EffectTruncSilence::FindSilences(), Preview(), Process(), EffectAutoDuck::Process(), EffectChangeSpeed::Process(), EffectClickRemoval::Process(), EffectEqualization::Process(), Generator::Process(), EffectLoudness::Process(), EffectNoiseReduction::Process(), EffectNoiseRemoval::Process(), EffectNormalize::Process(), NyquistEffect::Process(), EffectPaulstretch::Process(), EffectRepair::Process(), EffectRepeat::Process(), EffectReverse::Process(), EffectSBSMS::Process(), EffectSimpleMono::Process(), EffectStereoToMono::Process(), EffectTruncSilence::Process(), and EffectTwoPassSimpleMono::Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveUserPreset()

bool Effect::SaveUserPreset ( const RegistryPath name)
overridevirtual

Implements EffectClientInterface.

Definition at line 569 of file Effect.cpp.

570 {
571  if (mClient)
572  {
573  return mClient->SaveUserPreset(name);
574  }
575 
576  wxString parms;
577  if (!GetAutomationParameters(parms))
578  {
579  return false;
580  }
581 
582  return SetPrivateConfig(name, wxT("Parameters"), parms);
583 }

References GetAutomationParameters(), mClient, name, EffectClientInterface::SaveUserPreset(), and SetPrivateConfig().

Referenced by EffectUIHost::OnApply(), EffectUIHost::OnSaveAs(), SetBatchProcessing(), EffectAutoDuck::Startup(), EffectChangeSpeed::Startup(), EffectClickRemoval::Startup(), EffectCompressor::Startup(), EffectDtmf::Startup(), EffectEqualization::Startup(), EffectLoudness::Startup(), EffectNoise::Startup(), EffectNormalize::Startup(), EffectReverb::Startup(), EffectScienFilter::Startup(), EffectTruncSilence::Startup(), and Startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAutomationParameters() [1/2]

bool Effect::SetAutomationParameters ( CommandParameters parms)
overridevirtual

Implements EffectClientInterface.

Reimplemented in EffectWahwah, VampEffect, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectScienFilter, EffectReverb, EffectRepeat, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoise, EffectLoudness, EffectFindClipping, and EffectEqualization.

Definition at line 543 of file Effect.cpp.

544 {
545  if (mClient)
546  {
547  return mClient->SetAutomationParameters(parms);
548  }
549 
550  return true;
551 }

References mClient, and EffectClientInterface::SetAutomationParameters().

Referenced by ImportPresets(), LoadUserPreset(), SetAutomationParameters(), and EffectManager::SetEffectParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAutomationParameters() [2/2]

bool Effect::SetAutomationParameters ( const wxString &  parms)
virtual

Definition at line 1089 of file Effect.cpp.

1090 {
1091  wxString preset = parms;
1092  bool success = false;
1093  if (preset.StartsWith(kUserPresetIdent))
1094  {
1095  preset.Replace(kUserPresetIdent, wxEmptyString, false);
1096  success = LoadUserPreset(GetUserPresetsGroup(preset));
1097  }
1098  else if (preset.StartsWith(kFactoryPresetIdent))
1099  {
1100  preset.Replace(kFactoryPresetIdent, wxEmptyString, false);
1101  auto presets = GetFactoryPresets();
1102  success = LoadFactoryPreset( make_iterator_range( presets ).index( preset ) );
1103  }
1104  else if (preset.StartsWith(kCurrentSettingsIdent))
1105  {
1106  preset.Replace(kCurrentSettingsIdent, wxEmptyString, false);
1108  }
1109  else if (preset.StartsWith(kFactoryDefaultsIdent))
1110  {
1111  preset.Replace(kFactoryDefaultsIdent, wxEmptyString, false);
1113  }
1114  else
1115  {
1116  CommandParameters eap(parms);
1118  S.SetForValidating( &eap );
1119  // DefineParams returns false if not defined for this effect.
1120  if( !DefineParams( S ) )
1121  // the old method...
1122  success = SetAutomationParameters(eap);
1123  else if( !S.bOK )
1124  success = false;
1125  else{
1126  success = true;
1127  S.SetForWriting( &eap );
1128  DefineParams( S );
1129  }
1130  }
1131 
1132  if (!success)
1133  {
1135  XO("%s: Could not load settings below. Default settings will be used.\n\n%s")
1136  .Format( GetName(), preset ) );
1137  // We are using default settings and we still wish to continue.
1138  return true;
1139  //return false;
1140  }
1141 
1142  if (!mUIDialog)
1143  {
1144  return true;
1145  }
1146 
1147  return TransferDataToWindow();
1148 }

References ShuttleSetAutomation::bOK, ComponentInterface::DefineParams(), GetCurrentSettingsGroup(), GetFactoryDefaultsGroup(), GetFactoryPresets(), ComponentInterface::GetName(), GetUserPresetsGroup(), kCurrentSettingsIdent, kFactoryDefaultsIdent, kFactoryPresetIdent, kUserPresetIdent, LoadFactoryPreset(), LoadUserPreset(), make_iterator_range(), MessageBox(), mUIDialog, SetAutomationParameters(), ShuttleSetAutomation::SetForValidating(), ShuttleSetAutomation::SetForWriting(), TransferDataToWindow(), and XO.

Here is the call graph for this function:

◆ SetBatchProcessing()

void Effect::SetBatchProcessing ( bool  start)
virtual

Definition at line 1194 of file Effect.cpp.

1195 {
1196  mIsBatch = start;
1197 
1198  if (start)
1199  {
1201  }
1202  else
1203  {
1205  }
1206 }

References GetSavedStateGroup(), LoadUserPreset(), mIsBatch, and SaveUserPreset().

Referenced by EffectManager::SetBatchProcessing(), and NyquistEffect::ShowInterface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetBlockSize()

size_t Effect::SetBlockSize ( size_t  maxBlockSize)
overridevirtual

Implements EffectClientInterface.

Definition at line 316 of file Effect.cpp.

317 {
318  if (mClient)
319  {
320  return mClient->SetBlockSize(maxBlockSize);
321  }
322 
323  mBlockSize = maxBlockSize;
324 
325  return mBlockSize;
326 }

References mBlockSize, mClient, and EffectClientInterface::SetBlockSize().

Referenced by ProcessPass(), EffectBassTreble::RealtimeInitialize(), EffectDistortion::RealtimeInitialize(), EffectPhaser::RealtimeInitialize(), and EffectWahwah::RealtimeInitialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDuration()

void Effect::SetDuration ( double  duration)
overridevirtual

Implements EffectHostInterface.

Definition at line 837 of file Effect.cpp.

838 {
839  if (seconds < 0.0)
840  {
841  seconds = 0.0;
842  }
843 
844  if (GetType() == EffectTypeGenerate)
845  {
846  SetPrivateConfig(GetCurrentSettingsGroup(), wxT("LastUsedDuration"), seconds);
847  }
848 
849  mDuration = seconds;
850 
851  return;
852 }

References EffectTypeGenerate, GetCurrentSettingsGroup(), GetType(), mDuration, and SetPrivateConfig().

Referenced by DoEffect(), EffectDtmf::OnDuration(), EffectDtmf::Recalculate(), EffectDtmf::TransferDataFromWindow(), EffectNoise::TransferDataFromWindow(), EffectSilence::TransferDataFromWindow(), and EffectToneGen::TransferDataFromWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetHost()

bool Effect::SetHost ( EffectHostInterface host)
overridevirtual

Implements EffectClientInterface.

Definition at line 256 of file Effect.cpp.

257 {
258  if (mClient)
259  {
260  return mClient->SetHost(host);
261  }
262 
263  return true;
264 }

References mClient, and EffectClientInterface::SetHost().

Referenced by Startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetHostUI()

void Effect::SetHostUI ( EffectUIHostInterface host)
overridevirtual

Implements EffectUIClientInterface.

Definition at line 617 of file Effect.cpp.

618 {
619 }

◆ SetLinearEffectFlag()

void Effect::SetLinearEffectFlag ( bool  linearEffectFlag)
protected

Definition at line 2000 of file Effect.cpp.

2001 {
2002  mIsLinearEffect = linearEffectFlag;
2003 }

References mIsLinearEffect.

Referenced by EffectEcho::EffectEcho(), EffectLoudness::EffectLoudness(), EffectNoise::EffectNoise(), EffectSilence::EffectSilence(), and NyquistEffect::Parse().

Here is the caller graph for this function:

◆ SetPresetParameters()

void Effect::SetPresetParameters ( const wxArrayString *  Names,
const wxArrayString *  Values 
)
inline

Definition at line 251 of file Effect.h.

251  {
252  if( Names ) mPresetNames = *Names;
253  if( Values ) mPresetValues = *Values;
254  }

Referenced by DoEffect().

Here is the caller graph for this function:

◆ SetPreviewFullSelectionFlag()

void Effect::SetPreviewFullSelectionFlag ( bool  previewDurationFlag)
protected

Definition at line 2005 of file Effect.cpp.

2006 {
2007  mPreviewFullSelection = previewDurationFlag;
2008 }

References mPreviewFullSelection.

Referenced by NyquistEffect::Parse().

Here is the caller graph for this function:

◆ SetPrivateConfig() [1/5]

bool Effect::SetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
const bool &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 996 of file Effect.cpp.

997 {
998  return PluginManager::Get().SetPrivateConfig(GetID(), group, key, value);
999 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetPrivateConfig().

Here is the call graph for this function:

◆ SetPrivateConfig() [2/5]

bool Effect::SetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
const double &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 1006 of file Effect.cpp.

1007 {
1008  return PluginManager::Get().SetPrivateConfig(GetID(), group, key, value);
1009 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetPrivateConfig().

Here is the call graph for this function:

◆ SetPrivateConfig() [3/5]

bool Effect::SetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
const float &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 1001 of file Effect.cpp.

1002 {
1003  return PluginManager::Get().SetPrivateConfig(GetID(), group, key, value);
1004 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetPrivateConfig().

Here is the call graph for this function:

◆ SetPrivateConfig() [4/5]

bool Effect::SetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
const int &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 991 of file Effect.cpp.

992 {
993  return PluginManager::Get().SetPrivateConfig(GetID(), group, key, value);
994 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetPrivateConfig().

Here is the call graph for this function:

◆ SetPrivateConfig() [5/5]

bool Effect::SetPrivateConfig ( const RegistryPath group,
const RegistryPath key,
const wxString &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 986 of file Effect.cpp.

987 {
988  return PluginManager::Get().SetPrivateConfig(GetID(), group, key, value);
989 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetPrivateConfig().

Referenced by EffectChangeSpeed::OnChoice_Vinyl(), SaveUserPreset(), SetDuration(), EffectChangeSpeed::Startup(), EffectEqualization::Startup(), Startup(), EffectChangeSpeed::TransferDataFromWindow(), and EffectEqualization::ValidateUI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSampleRate()

void Effect::SetSampleRate ( double  rate)
overridevirtual

Implements EffectClientInterface.

Definition at line 306 of file Effect.cpp.

307 {
308  if (mClient)
309  {
310  mClient->SetSampleRate(rate);
311  }
312 
313  mSampleRate = rate;
314 }

References mClient, mSampleRate, and EffectClientInterface::SetSampleRate().

Referenced by ProcessPass().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSharedConfig() [1/5]

bool Effect::SetSharedConfig ( const RegistryPath group,
const RegistryPath key,
const bool &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 926 of file Effect.cpp.

927 {
928  return PluginManager::Get().SetSharedConfig(GetID(), group, key, value);
929 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetSharedConfig().

Here is the call graph for this function:

◆ SetSharedConfig() [2/5]

bool Effect::SetSharedConfig ( const RegistryPath group,
const RegistryPath key,
const double &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 936 of file Effect.cpp.

937 {
938  return PluginManager::Get().SetSharedConfig(GetID(), group, key, value);
939 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetSharedConfig().

Here is the call graph for this function:

◆ SetSharedConfig() [3/5]

bool Effect::SetSharedConfig ( const RegistryPath group,
const RegistryPath key,
const float &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 931 of file Effect.cpp.

932 {
933  return PluginManager::Get().SetSharedConfig(GetID(), group, key, value);
934 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetSharedConfig().

Here is the call graph for this function:

◆ SetSharedConfig() [4/5]

bool Effect::SetSharedConfig ( const RegistryPath group,
const RegistryPath key,
const int &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 921 of file Effect.cpp.

922 {
923  return PluginManager::Get().SetSharedConfig(GetID(), group, key, value);
924 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetSharedConfig().

Here is the call graph for this function:

◆ SetSharedConfig() [5/5]

bool Effect::SetSharedConfig ( const RegistryPath group,
const RegistryPath key,
const wxString &  value 
)
overridevirtual

Implements ConfigClientInterface.

Definition at line 916 of file Effect.cpp.

917 {
918  return PluginManager::Get().SetSharedConfig(GetID(), group, key, value);
919 }

References PluginManager::Get(), GetID(), key, and PluginManager::SetSharedConfig().

Here is the call graph for this function:

◆ SetUIFlags()

void Effect::SetUIFlags ( unsigned  flags)
virtual

Definition at line 1181 of file Effect.cpp.

1181  {
1182  mUIFlags = flags;
1183 }

References mUIFlags.

Referenced by EffectUI::DoEffect().

Here is the caller graph for this function:

◆ SetVetoDialogHook()

auto Effect::SetVetoDialogHook ( VetoDialogHook  hook)
static

Definition at line 75 of file Effect.cpp.

77 {
78  auto &theHook = GetVetoDialogHook();
79  auto result = theHook;
80  theHook = hook;
81  return result;
82 }

References anonymous_namespace{Effect.cpp}::GetVetoDialogHook().

Referenced by ScreenshotCommand::ScreenshotCommand().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowInterface()

bool Effect::ShowInterface ( wxWindow &  parent,
const EffectDialogFactory factory,
bool  forceModal = false 
)
overridevirtual

Implements EffectClientInterface.

Reimplemented in NyquistEffect, EffectNoiseRemoval, and EffectNoiseReduction.

Definition at line 480 of file Effect.cpp.

482 {
483  if (!IsInteractive())
484  {
485  return true;
486  }
487 
488  if (mUIDialog)
489  {
490  if ( mUIDialog->Close(true) )
491  mUIDialog = nullptr;
492  return false;
493  }
494 
495  if (mClient)
496  {
497  return mClient->ShowInterface(parent, factory, forceModal);
498  }
499 
500  // mUIDialog is null
501  auto cleanup = valueRestorer( mUIDialog );
502 
503  if ( factory )
504  mUIDialog = factory(parent, this, this);
505  if (!mUIDialog)
506  {
507  return false;
508  }
509 
510 
511  mUIDialog->Layout();
512  mUIDialog->Fit();
513  mUIDialog->SetMinSize(mUIDialog->GetSize());
514 
515  auto hook = GetVetoDialogHook();
516  if( hook && hook( mUIDialog ) )
517  return false;
518 
519  if( SupportsRealtime() && !forceModal )
520  {
521  mUIDialog->Show();
522  cleanup.release();
523 
524  // Return false to bypass effect processing
525  return false;
526  }
527 
528  bool res = mUIDialog->ShowModal() != 0;
529 
530  return res;
531 }

References factory, anonymous_namespace{Effect.cpp}::GetVetoDialogHook(), IsInteractive(), mClient, mUIDialog, EffectClientInterface::ShowInterface(), SupportsRealtime(), and valueRestorer().

Referenced by DoEffect(), EffectManager::PromptUser(), and NyquistEffect::ShowInterface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowOptions()

void Effect::ShowOptions ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 804 of file Effect.cpp.

805 {
806 }

◆ Startup() [1/2]

bool Effect::Startup ( )
virtual

Reimplemented in EffectTruncSilence, EffectScienFilter, EffectReverb, EffectNormalize, EffectNoise, EffectLoudness, EffectEqualization, EffectDtmf, EffectCompressor, EffectClickRemoval, EffectChangeSpeed, and EffectAutoDuck.

Definition at line 1061 of file Effect.cpp.

1062 {
1063  return true;
1064 }

Referenced by Startup().

Here is the caller graph for this function:

◆ Startup() [2/2]

bool Effect::Startup ( EffectClientInterface client)
virtual

Definition at line 1033 of file Effect.cpp.

1034 {
1035  // Let destructor know we need to be shutdown
1036  mClient = client;
1037 
1038  // Set host so client startup can use our services
1039  if (!SetHost(this))
1040  {
1041  // Bail if the client startup fails
1042  mClient = NULL;
1043  return false;
1044  }
1045 
1048 
1049  bool haveDefaults;
1050  GetPrivateConfig(GetFactoryDefaultsGroup(), wxT("Initialized"), haveDefaults, false);
1051  if (!haveDefaults)
1052  {
1054  SetPrivateConfig(GetFactoryDefaultsGroup(), wxT("Initialized"), true);
1055  }
1057 
1058  return Startup();
1059 }

References GetAudioInCount(), GetAudioOutCount(), GetCurrentSettingsGroup(), GetFactoryDefaultsGroup(), GetPrivateConfig(), LoadUserPreset(), mClient, mNumAudioIn, mNumAudioOut, SaveUserPreset(), SetHost(), SetPrivateConfig(), and Startup().

Here is the call graph for this function:

◆ SupportsAutomation()

bool Effect::SupportsAutomation ( )
overridevirtual

Implements EffectDefinitionInterface.

Reimplemented in EffectNoiseRemoval.

Definition at line 244 of file Effect.cpp.

245 {
246  if (mClient)
247  {
248  return mClient->SupportsAutomation();
249  }
250 
251  return true;
252 }

References mClient, and EffectDefinitionInterface::SupportsAutomation().

Here is the call graph for this function:

◆ SupportsRealtime()

bool Effect::SupportsRealtime ( )
overridevirtual

Implements EffectDefinitionInterface.

Reimplemented in EffectWahwah, and EffectPhaser.

Definition at line 234 of file Effect.cpp.

235 {
236  if (mClient)
237  {
238  return mClient->SupportsRealtime();
239  }
240 
241  return false;
242 }

References mClient, and EffectDefinitionInterface::SupportsRealtime().

Referenced by EffectUIHost::BuildButtonBar(), EffectUI::DoEffect(), EnablePreview(), and ShowInterface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestUIFlags()

unsigned Effect::TestUIFlags ( unsigned  mask)
virtual

Definition at line 1185 of file Effect.cpp.

1185  {
1186  return mask & mUIFlags;
1187 }

References mUIFlags.

Referenced by NyquistEffect::ShowInterface().

Here is the caller graph for this function:

◆ TotalProgress()

bool Effect::TotalProgress ( double  frac,
const TranslatableString msg = {} 
)
protected

Definition at line 2016 of file Effect.cpp.

2017 {
2018  auto updateResult = (mProgress ?
2019  mProgress->Update(frac, msg) :
2021  return (updateResult != ProgressResult::Success);
2022 }

References mProgress, BasicUI::Success, and ProgressDialog::Update().

Referenced by EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), EffectAutoDuck::ApplyDuckFade(), EffectTruncSilence::DoRemoval(), NyquistEffect::GetCallback(), EffectAutoDuck::Process(), EffectStereoToMono::ProcessOne(), EffectNormalize::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), NyquistEffect::PutCallback(), and EffectLoudness::UpdateProgress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TrackGroupProgress()

bool Effect::TrackGroupProgress ( int  whichGroup,
double  frac,
const TranslatableString msg = {} 
)
protected

Definition at line 2032 of file Effect.cpp.

2033 {
2034  auto updateResult = (mProgress ?
2035  mProgress->Update(whichGroup + frac, (double) mNumGroups, msg) :
2037  return (updateResult != ProgressResult::Success);
2038 }

References mNumGroups, mProgress, BasicUI::Success, and ProgressDialog::Update().

Referenced by VampEffect::Process(), NyquistEffect::ProcessOne(), and ProcessTrack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TrackProgress()

bool Effect::TrackProgress ( int  whichTrack,
double  frac,
const TranslatableString msg = {} 
)
protected

Definition at line 2024 of file Effect.cpp.

2025 {
2026  auto updateResult = (mProgress ?
2027  mProgress->Update(whichTrack + frac, (double) mNumTracks, msg) :
2029  return (updateResult != ProgressResult::Success);
2030 }

References mNumTracks, mProgress, BasicUI::Success, and ProgressDialog::Update().

Referenced by BlockGenerator::GenerateTrack(), EffectRepeat::Process(), EffectSBSMS::Process(), VampEffect::Process(), NyquistEffect::ProcessOne(), EffectEqualization::ProcessOne(), EffectClickRemoval::ProcessOne(), EffectNoiseRemoval::ProcessOne(), EffectRepair::ProcessOne(), EffectFindClipping::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectSimpleMono::ProcessOne(), EffectPaulstretch::ProcessOne(), EffectReverse::ProcessOneClip(), and ProcessTrack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TransferDataFromWindow()

bool Effect::TransferDataFromWindow ( )
protectedvirtual

◆ TransferDataToWindow()

bool Effect::TransferDataToWindow ( )
protectedvirtual

Reimplemented in EffectWahwah, VampEffect, EffectTruncSilence, EffectToneGen, EffectTimeScale, EffectSilence, EffectScienFilter, EffectReverb, EffectRepeat, EffectPhaser, EffectPaulstretch, NyquistEffect, EffectNormalize, EffectNoise, EffectLoudness, EffectFindClipping, EffectEqualization, EffectEcho, EffectDtmf, EffectDistortion, EffectCompressor, EffectClickRemoval, EffectChangeSpeed, EffectBassTreble, EffectAutoDuck, and EffectAmplify.

Definition at line 1915 of file Effect.cpp.

1916 {
1917  return true;
1918 }

Referenced by SetAutomationParameters(), and EffectUIHost::TransferDataToWindow().

Here is the caller graph for this function:

◆ ValidateUI()

bool Effect::ValidateUI ( )
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in EffectEqualization.

Definition at line 641 of file Effect.cpp.

642 {
643  return mUIParent->Validate();
644 }

References mUIParent.

Friends And Related Function Documentation

◆ EffectUIHost

friend class EffectUIHost
friend

Definition at line 542 of file Effect.h.

Member Data Documentation

◆ kCurrentSettingsIdent

const wxString Effect::kCurrentSettingsIdent = wxT("<Current Settings>")
static

◆ kFactoryDefaultsIdent

const wxString Effect::kFactoryDefaultsIdent = wxT("<Factory Defaults>")
static

◆ kFactoryPresetIdent

const wxString Effect::kFactoryPresetIdent = wxT("Factory Preset:")
static

◆ kUserPresetIdent

const wxString Effect::kUserPresetIdent = wxT("User Preset:")
static

◆ mBlockSize

size_t Effect::mBlockSize
private

◆ mBufferSize

size_t Effect::mBufferSize
private

Definition at line 532 of file Effect.h.

Referenced by Effect(), ProcessPass(), and ProcessTrack().

◆ mClient

EffectClientInterface* Effect::mClient
private

◆ mDuration

double Effect::mDuration
private

Definition at line 514 of file Effect.h.

Referenced by DoEffect(), Effect(), GetDuration(), Preview(), ProcessPass(), ProcessTrack(), and SetDuration().

◆ mDurationFormat

NumericFormatSymbol Effect::mDurationFormat
private

Definition at line 515 of file Effect.h.

Referenced by DoEffect(), and GetDurationFormat().

◆ mFactory

WaveTrackFactory* Effect::mFactory
protected

Definition at line 462 of file Effect.h.

Referenced by Delegate(), DoEffect(), Preview(), and EffectNoiseReduction::Process().

◆ mIMap

std::vector<Track*> Effect::mIMap
private

Definition at line 521 of file Effect.h.

Referenced by AddToOutputTracks(), CopyInputTracks(), and ReplaceProcessedTracks().

◆ mIsBatch

bool Effect::mIsBatch
private

Definition at line 509 of file Effect.h.

Referenced by Effect(), IsBatchProcessing(), and SetBatchProcessing().

◆ mIsLinearEffect

bool Effect::mIsLinearEffect
private

Definition at line 510 of file Effect.h.

Referenced by Effect(), Preview(), and SetLinearEffectFlag().

◆ mIsPreview

bool Effect::mIsPreview
private

Definition at line 517 of file Effect.h.

Referenced by Effect(), Preview(), and ProcessTrack().

◆ mNumAudioIn

size_t Effect::mNumAudioIn
private

Definition at line 529 of file Effect.h.

Referenced by Effect(), Process(), ProcessPass(), and Startup().

◆ mNumAudioOut

size_t Effect::mNumAudioOut
private

Definition at line 530 of file Effect.h.

Referenced by Effect(), Process(), ProcessPass(), ProcessTrack(), and Startup().

◆ mNumChannels

unsigned Effect::mNumChannels
private

Definition at line 534 of file Effect.h.

Referenced by Effect(), ProcessPass(), and ProcessTrack().

◆ mNumGroups

int Effect::mNumGroups
private

Definition at line 525 of file Effect.h.

Referenced by CountWaveTracks(), Effect(), and TrackGroupProgress().

◆ mNumTracks

int Effect::mNumTracks
private

Definition at line 524 of file Effect.h.

Referenced by CountWaveTracks(), DoEffect(), Effect(), Preview(), and TrackProgress().

◆ mOMap

std::vector<Track*> Effect::mOMap
private

Definition at line 522 of file Effect.h.

Referenced by AddToOutputTracks(), CopyInputTracks(), and ReplaceProcessedTracks().

◆ mOutputTracks

std::shared_ptr<TrackList> Effect::mOutputTracks
protected

◆ mPass

int Effect::mPass
protected

Definition at line 474 of file Effect.h.

Referenced by GetPass(), and Process().

◆ mPresetNames

wxArrayString Effect::mPresetNames
protected

Definition at line 472 of file Effect.h.

Referenced by NyquistEffect::Parse().

◆ mPresetValues

wxArrayString Effect::mPresetValues
protected

Definition at line 473 of file Effect.h.

◆ mPreviewFullSelection

bool Effect::mPreviewFullSelection
private

Definition at line 512 of file Effect.h.

Referenced by Effect(), Preview(), and SetPreviewFullSelectionFlag().

◆ mPreviewWithNotSelected

bool Effect::mPreviewWithNotSelected
private

Definition at line 511 of file Effect.h.

Referenced by Effect(), IncludeNotSelectedPreviewTracks(), and Preview().

◆ mProgress

ProgressDialog* Effect::mProgress
protected

◆ mProjectRate

double Effect::mProjectRate
protected

◆ mpSelectedRegion

wxWeakRef<NotifyingSelectedRegion> Effect::mpSelectedRegion {}
protected

Definition at line 461 of file Effect.h.

Referenced by DoEffect().

◆ mSampleCnt

sampleCount Effect::mSampleCnt
protected

Definition at line 482 of file Effect.h.

Referenced by EffectFade::ProcessBlock(), EffectToneGen::ProcessBlock(), and ProcessPass().

◆ mSampleRate

double Effect::mSampleRate
protected

◆ mT0

double Effect::mT0
protected

◆ mT1

double Effect::mT1
protected

◆ mTracks

TrackList* Effect::mTracks
private

◆ mUIDebug

bool Effect::mUIDebug
private

Definition at line 519 of file Effect.h.

Referenced by Effect(), EnableDebug(), and EffectUIHost::Initialize().

◆ mUIDialog

wxDialog* Effect::mUIDialog
protected

◆ mUIFlags

unsigned Effect::mUIFlags
protected

Definition at line 480 of file Effect.h.

Referenced by Effect(), SetUIFlags(), and TestUIFlags().

◆ mUIParent

wxWindow* Effect::mUIParent
protected

Definition at line 478 of file Effect.h.

Referenced by CloseUI(), Effect(), EnableApply(), EnablePreview(), MessageBox(), EffectBassTreble::OnBassSlider(), EffectBassTreble::OnBassText(), EffectTruncSilence::OnControlChange(), EffectToneGen::OnControlUpdate(), EffectScienFilter::OnCutoff(), EffectPhaser::OnDepthSlider(), EffectWahwah::OnDepthSlider(), EffectPhaser::OnDepthText(), EffectWahwah::OnDepthText(), EffectPhaser::OnDryWetSlider(), EffectPhaser::OnDryWetText(), EffectPhaser::OnFeedbackSlider(), EffectPhaser::OnFeedbackText(), NyquistEffect::OnFileButton(), EffectWahwah::OnFreqOffSlider(), EffectWahwah::OnFreqOffText(), EffectPhaser::OnFreqSlider(), EffectWahwah::OnFreqSlider(), EffectPhaser::OnFreqText(), EffectWahwah::OnFreqText(), EffectBassTreble::OnGainSlider(), EffectPhaser::OnGainSlider(), EffectWahwah::OnGainSlider(), EffectBassTreble::OnGainText(), EffectPhaser::OnGainText(), EffectWahwah::OnGainText(), NyquistEffect::OnLoad(), EffectEqualization::OnManage(), EditCurvesDialog::OnOK(), EffectPhaser::OnPhaseSlider(), EffectWahwah::OnPhaseSlider(), EffectPhaser::OnPhaseText(), EffectWahwah::OnPhaseText(), EffectWahwah::OnResonanceSlider(), EffectWahwah::OnResonanceText(), EffectScienFilter::OnRipple(), NyquistEffect::OnSave(), EffectEqualization::OnSize(), EffectScienFilter::OnSize(), NyquistEffect::OnSlider(), EffectPhaser::OnStagesSlider(), EffectPhaser::OnStagesText(), EffectScienFilter::OnStopbandRipple(), NyquistEffect::OnText(), EffectPaulstretch::OnText(), EffectTimeScale::OnText_PitchHalfStepsEnd(), EffectTimeScale::OnText_PitchHalfStepsStart(), EffectTimeScale::OnText_PitchPercentChangeEnd(), EffectTimeScale::OnText_PitchPercentChangeStart(), EffectTimeScale::OnText_RatePercentChangeEnd(), EffectTimeScale::OnText_RatePercentChangeStart(), NyquistEffect::OnTime(), EffectBassTreble::OnTrebleSlider(), EffectBassTreble::OnTrebleText(), EffectEqualization::PopulateOrExchange(), PopulateUI(), NyquistEffect::Process(), NyquistEffect::TransferDataFromEffectWindow(), EffectAmplify::TransferDataFromWindow(), EffectAutoDuck::TransferDataFromWindow(), EffectBassTreble::TransferDataFromWindow(), EffectChangeSpeed::TransferDataFromWindow(), EffectClickRemoval::TransferDataFromWindow(), EffectCompressor::TransferDataFromWindow(), EffectDistortion::TransferDataFromWindow(), EffectDtmf::TransferDataFromWindow(), EffectEcho::TransferDataFromWindow(), EffectFindClipping::TransferDataFromWindow(), EffectLoudness::TransferDataFromWindow(), EffectNoise::TransferDataFromWindow(), EffectNormalize::TransferDataFromWindow(), NyquistEffect::TransferDataFromWindow(), EffectPaulstretch::TransferDataFromWindow(), EffectPhaser::TransferDataFromWindow(), EffectRepeat::TransferDataFromWindow(), EffectReverb::TransferDataFromWindow(), EffectScienFilter::TransferDataFromWindow(), EffectTimeScale::TransferDataFromWindow(), EffectToneGen::TransferDataFromWindow(), EffectTruncSilence::TransferDataFromWindow(), VampEffect::TransferDataFromWindow(), EffectWahwah::TransferDataFromWindow(), NyquistEffect::TransferDataToEffectWindow(), EffectAutoDuck::TransferDataToWindow(), EffectBassTreble::TransferDataToWindow(), EffectChangeSpeed::TransferDataToWindow(), EffectClickRemoval::TransferDataToWindow(), EffectDistortion::TransferDataToWindow(), EffectDtmf::TransferDataToWindow(), EffectEcho::TransferDataToWindow(), EffectEqualization::TransferDataToWindow(), EffectFindClipping::TransferDataToWindow(), EffectLoudness::TransferDataToWindow(), EffectNoise::TransferDataToWindow(), EffectNormalize::TransferDataToWindow(), NyquistEffect::TransferDataToWindow(), EffectPaulstretch::TransferDataToWindow(), EffectPhaser::TransferDataToWindow(), EffectScienFilter::TransferDataToWindow(), EffectTimeScale::TransferDataToWindow(), EffectToneGen::TransferDataToWindow(), EffectTruncSilence::TransferDataToWindow(), VampEffect::TransferDataToWindow(), EffectWahwah::TransferDataToWindow(), EffectScienFilter::TransferGraphLimitsFromWindow(), EffectEqualization::UpdateDraw(), EffectEqualization::UpdateGraphic(), EffectLoudness::UpdateUI(), EffectNormalize::UpdateUI(), and ValidateUI().

◆ mUIResultID

int Effect::mUIResultID
protected

◆ nEffectsDone

int Effect::nEffectsDone =0
staticprotected

Definition at line 376 of file Effect.h.

Referenced by NyquistEffect::Process(), and ReplaceProcessedTracks().


The documentation for this class was generated from the following files:
Effect::mSampleCnt
sampleCount mSampleCnt
Definition: Effect.h:482
Effect::GetAutomationParameters
bool GetAutomationParameters(CommandParameters &parms) override
Definition: Effect.cpp:533
ShuttleSetAutomation
Shuttle that sets parameters to a value (from a string)
Definition: Shuttle.h:106
ViewInfo::Get
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:156
Effect::GetSquashedName
static CommandID GetSquashedName(wxString name)
Definition: Effect.cpp:775
CommandParameters
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
Definition: EffectAutomationParameters.h:67
Effect::DoEffect
bool DoEffect(double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, wxWindow *pParent=nullptr, const EffectDialogFactory &dialogFactory={})
Definition: Effect.cpp:1208
NYQUIST_PROMPT_ID
#define NYQUIST_PROMPT_ID
Definition: PluginManager.h:360
TranslatableString::empty
bool empty() const
Definition: TranslatableString.h:72
ShuttleSetAutomation::SetForValidating
void SetForValidating(CommandParameters *pEap)
Definition: Shuttle.h:113
valueRestorer
ValueRestorer< T > valueRestorer(T &var)
inline functions provide convenient parameter type deduction
Definition: MemoryX.h:354
PluginManager::RemovePrivateConfigSubgroup
bool RemovePrivateConfigSubgroup(const PluginID &ID, const RegistryPath &group) override
Definition: PluginManager.cpp:638
Effect::mNumTracks
int mNumTracks
Definition: Effect.h:524
Effect::FindProject
const AudacityProject * FindProject() const
Definition: Effect.cpp:2271
EffectClientInterface::SetBlockSize
virtual size_t SetBlockSize(size_t maxBlockSize)=0
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
GuardedCall
R GuardedCall(const F1 &body, const F2 &handler=F2::Default(), std::function< void(AudacityException *)> delayedHandler=DefaultDelayedHandlerAction{})
Execute some code on any thread; catch any AudacityException; enqueue error report on the main thread...
Definition: AudacityException.h:202
EffectTypeProcess
@ EffectTypeProcess
Definition: EffectInterface.h:59
Effect::mUIDialog
wxDialog * mUIDialog
Definition: Effect.h:477
EffectClientInterface::RealtimeAddProcessor
virtual bool RealtimeAddProcessor(unsigned numChannels, float sampleRate)=0
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption=XO("Message"), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: AudacityMessageBox.h:20
BasicUI::ProgressResult::Success
@ Success
make_iterator_range
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
Definition: MemoryX.h:549
Track::RightChannel
static const auto RightChannel
Definition: Track.h:267
Effect::mProgress
ProgressDialog * mProgress
Definition: Effect.h:457
PluginManager::GetSharedConfig
bool GetSharedConfig(const PluginID &ID, const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval=_T("")) override
Definition: PluginManager.cpp:506
EffectClientInterface::RealtimeInitialize
virtual bool RealtimeInitialize()=0
WaveTrackViewConstants::NoDisplay
@ NoDisplay
Definition: WaveTrackViewConstants.h:40
Effect::IsInteractive
bool IsInteractive() override
Definition: Effect.cpp:204
NotifyingSelectedRegion::duration
double duration() const
Definition: ViewInfo.h:51
ComponentInterface::GetSymbol
virtual ComponentInterfaceSymbol GetSymbol()=0
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
EffectClientInterface::SetSampleRate
virtual void SetSampleRate(double rate)=0
Effect::MessageBox
int MessageBox(const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
Definition: Effect.cpp:2481
WaveTrack::GetEndTime
double GetEndTime() const override
Get the time at which the last clip in the track ends, plus recorded stuff.
Definition: WaveTrack.cpp:1800
BasicUI::ShowErrorDialog
void ShowErrorDialog(const WindowPlacement &placement, const TranslatableString &dlogTitle, const TranslatableString &message, const ManualPageID &helpPage, const ErrorDialogOptions &options={})
Show an error dialog with a link to the manual for further help.
Definition: BasicUI.h:233
Effect::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: Effect.cpp:1915
Effect::mDuration
double mDuration
Definition: Effect.h:514
Effect::CopyInputTracks
void CopyInputTracks(bool allSyncLockSelected=false)
Definition: Effect.cpp:2070
Effect::SupportsRealtime
bool SupportsRealtime() override
Definition: Effect.cpp:234
DefaultPlayOptions
AudioIOStartStreamOptions DefaultPlayOptions(AudacityProject &project)
Definition: ProjectAudioManager.cpp:1000
Effect::GetID
virtual PluginID GetID()
Definition: Effect.cpp:1023
ident
static CommandHandlerObject & ident(AudacityProject &project)
Definition: ModNullCallback.cpp:65
ChannelNameFrontRight
@ ChannelNameFrontRight
Definition: EffectInterface.h:150
EffectTypeGenerate
@ EffectTypeGenerate
Definition: EffectInterface.h:58
EffectClientInterface::RealtimeFinalize
virtual bool RealtimeFinalize()=0
RegistryPaths
std::vector< RegistryPath > RegistryPaths
Definition: Identifier.h:219
pdlgHideStopButton
@ pdlgHideStopButton
Definition: ProgressDialog.h:38
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1468
EffectClientInterface::ProcessFinalize
virtual bool ProcessFinalize()=0
Format
Abstract base class used in importing a file.
TrackList
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:1264
Effect::GetAudioInCount
unsigned GetAudioInCount() override
Definition: Effect.cpp:266
EffectClientInterface::RealtimeProcessEnd
virtual bool RealtimeProcessEnd()=0
Effect::mT1
double mT1
Definition: Effect.h:467
ArrayOf::reinit
void reinit(Integral count, bool initialize=false)
Definition: MemoryX.h:57
Effect::LoadUserPreset
bool LoadUserPreset(const RegistryPath &name) override
Definition: Effect.cpp:553
BUILTIN_EFFECT_PREFIX
#define BUILTIN_EFFECT_PREFIX
Definition: Effect.h:43
EffectTypeNone
@ EffectTypeNone
Definition: EffectInterface.h:56
EffectDefinitionInterface::IsInteractive
virtual bool IsInteractive()=0
Effect::mDurationFormat
NumericFormatSymbol mDurationFormat
Definition: Effect.h:515
XO
#define XO(s)
Definition: Internat.h:31
Effect::EnablePreview
virtual bool EnablePreview(bool enable=true)
Definition: Effect.cpp:1956
ProjectFileIO::Get
static ProjectFileIO & Get(AudacityProject &project)
Definition: ProjectFileIO.cpp:269
Effect::SetAutomationParameters
bool SetAutomationParameters(CommandParameters &parms) override
Definition: Effect.cpp:543
Effect::mTracks
TrackList * mTracks
Definition: Effect.h:507
Effect::ProcessFinalize
bool ProcessFinalize() override
Definition: Effect.cpp:378
ProjectSettings::Get
static ProjectSettings & Get(AudacityProject &project)
Definition: ProjectSettings.cpp:40
PluginManager::GetSharedConfigSubgroups
bool GetSharedConfigSubgroups(const PluginID &ID, const RegistryPath &group, RegistryPaths &subgroups) override
Definition: PluginManager.cpp:501
Effect::SetPrivateConfig
bool SetPrivateConfig(const RegistryPath &group, const RegistryPath &key, const wxString &value) override
Definition: Effect.cpp:986
TrackList::Add
TrackKind * Add(const std::shared_ptr< TrackKind > &t)
Definition: Track.h:1487
PluginManager::RemoveSharedConfig
bool RemoveSharedConfig(const PluginID &ID, const RegistryPath &group, const RegistryPath &key) override
Definition: PluginManager.cpp:567
Effect::mNumAudioIn
size_t mNumAudioIn
Definition: Effect.h:529
CommandParameters::GetParameters
bool GetParameters(wxString &parms)
Definition: EffectAutomationParameters.h:258
NYQUISTEFFECTS_FAMILY
#define NYQUISTEFFECTS_FAMILY
Definition: Effect.h:60
Effect::IsBatchProcessing
virtual bool IsBatchProcessing()
Definition: Effect.cpp:1189
Effect::mPass
int mPass
Definition: Effect.h:474
ChannelNameFrontLeft
@ ChannelNameFrontLeft
Definition: EffectInterface.h:149
SelectedRegion::UndefinedFrequency
static const int UndefinedFrequency
Definition: SelectedRegion.h:44
EffectClientInterface::ProcessBlock
virtual size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen)=0
Effect::SetHost
bool SetHost(EffectHostInterface *host) override
Definition: Effect.cpp:256
ChannelNameEOL
@ ChannelNameEOL
Definition: EffectInterface.h:145
ChannelName
ChannelName
Definition: EffectInterface.h:143
Effect::GetUserPresetsGroup
RegistryPath GetUserPresetsGroup(const RegistryPath &name) override
Definition: Effect.cpp:854
EffectDefinitionInterface::SupportsRealtime
virtual bool SupportsRealtime()=0
Effect::mPreviewFullSelection
bool mPreviewFullSelection
Definition: Effect.h:512
Effect::InitPass2
virtual bool InitPass2()
Definition: Effect.cpp:1365
EffectClientInterface::ShowInterface
virtual bool ShowInterface(wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false)=0
EffectClientInterface::GetFactoryPresets
virtual RegistryPaths GetFactoryPresets()=0
EffectDefinitionInterface::SupportsAutomation
virtual bool SupportsAutomation()=0
Effect::DefaultMessageBoxStyle
@ DefaultMessageBoxStyle
Definition: Effect.h:274
WaveTrack::ClearAndPaste
void ClearAndPaste(double t0, double t1, const Track *src, bool preserve=true, bool merge=true, const TimeWarper *effectWarper=NULL)
Definition: WaveTrack.cpp:748
Effect::SaveUserPreset
bool SaveUserPreset(const RegistryPath &name) override
Definition: Effect.cpp:569
PresetTypes
static const FileNames::FileTypes & PresetTypes()
Definition: Effect.cpp:667
PluginManager::HasPrivateConfigGroup
bool HasPrivateConfigGroup(const PluginID &ID, const RegistryPath &group)
Definition: PluginManager.cpp:578
TrackList::SelectedLeaders
auto SelectedLeaders() -> TrackIterRange< TrackType >
Definition: Track.h:1406
Effect::GetPrivateConfigSubgroups
bool GetPrivateConfigSubgroups(const RegistryPath &group, RegistryPaths &paths) override
Definition: Effect.cpp:956
PluginManager::RemovePrivateConfig
bool RemovePrivateConfig(const PluginID &ID, const RegistryPath &group, const RegistryPath &key) override
Definition: PluginManager.cpp:649
Effect::TransferDataFromWindow
virtual bool TransferDataFromWindow()
Definition: Effect.cpp:1920
t2bHash
std::unordered_map< void *, bool > t2bHash
Definition: Effect.cpp:63
WaveTrack::EmptyCopy
Holder EmptyCopy(const SampleBlockFactoryPtr &pFactory={}) const
Definition: WaveTrack.cpp:572
Effect::mFactory
WaveTrackFactory * mFactory
Definition: Effect.h:462
NotifyingSelectedRegion::t1
double t1() const
Definition: ViewInfo.h:46
wxWidgetsWindowPlacement
Window placement information for wxWidgetsBasicUI can be constructed from a wxWindow pointer.
Definition: wxWidgetsBasicUI.h:20
Effect::ProcessPass
virtual bool ProcessPass()
Definition: Effect.cpp:1396
ComponentInterface::GetVendor
virtual VendorSymbol GetVendor()=0
Effect::mIsBatch
bool mIsBatch
Definition: Effect.h:509
NotifyingSelectedRegion::setTimes
bool setTimes(double t0, double t1)
Definition: ViewInfo.cpp:57
WaveTrack::Set
void Set(constSamplePtr buffer, sampleFormat format, sampleCount start, size_t len)
Definition: WaveTrack.cpp:1981
floatSample
@ floatSample
Definition: SampleFormat.h:34
NumericConverter::TimeAndSampleFormat
static NumericFormatSymbol TimeAndSampleFormat()
Definition: NumericTextCtrl.cpp:690
ArraysOf::reinit
void reinit(Integral count)
Definition: MemoryX.h:109
WaveTrack::Holder
std::shared_ptr< WaveTrack > Holder
Definition: WaveTrack.h:94
Effect::End
virtual void End()
Definition: Effect.cpp:1906
Effect::GetAudioOutCount
unsigned GetAudioOutCount() override
Definition: Effect.cpp:276
Effect::SetSampleRate
void SetSampleRate(double rate) override
Definition: Effect.cpp:306
Effect::ProcessBlock
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Effect.cpp:388
Effect::mProjectRate
double mProjectRate
Definition: Effect.h:458
Effect::mBufferSize
size_t mBufferSize
Definition: Effect.h:532
AudacityException
Base class for exceptions specially processed by the application.
Definition: AudacityException.h:33
EffectClientInterface::RealtimeSuspend
virtual bool RealtimeSuspend()=0
EffectClientInterface::GetAudioOutCount
virtual unsigned GetAudioOutCount()=0
EffectClientInterface::GetMidiOutCount
virtual int GetMidiOutCount()=0
ViewInfo::selectedRegion
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:200
ShuttleParams::mpEap
CommandParameters * mpEap
Definition: Shuttle.h:66
Effect::inputTracks
const TrackList * inputTracks() const
Definition: Effect.h:463
Effect::PopulateOrExchange
virtual void PopulateOrExchange(ShuttleGui &S)
Definition: Effect.cpp:1910
EffectClientInterface::SetAutomationParameters
virtual bool SetAutomationParameters(CommandParameters &parms)=0
Effect::mT0
double mT0
Definition: Effect.h:466
factory
static RegisteredToolbarFactory factory
Definition: ControlToolBar.cpp:806
Track::Offset
void Offset(double t)
Definition: Track.h:428
anonymous_namespace{Effect.cpp}::GetVetoDialogHook
Effect::VetoDialogHook & GetVetoDialogHook()
Definition: Effect.cpp:67
ArraysOf< float >
EffectClientInterface::LoadFactoryDefaults
virtual bool LoadFactoryDefaults()=0
ShuttleGetAutomation
Shuttle that gets parameter values into a string.
Definition: Shuttle.h:88
Effect::mpSelectedRegion
wxWeakRef< NotifyingSelectedRegion > mpSelectedRegion
Definition: Effect.h:461
Effect::mIsLinearEffect
bool mIsLinearEffect
Definition: Effect.h:510
Effect::GetFactoryPresets
RegistryPaths GetFactoryPresets() override
Definition: Effect.cpp:585
ComponentInterface::GetPath
virtual PluginPath GetPath()=0
EffectClientInterface::GetMidiInCount
virtual int GetMidiInCount()=0
EffectClientInterface::LoadFactoryPreset
virtual bool LoadFactoryPreset(int id)=0
Effect::GetLatency
sampleCount GetLatency() override
Definition: Effect.cpp:338
EffectClientInterface::SetHost
virtual bool SetHost(EffectHostInterface *host)=0
Effect::GetDefaultDuration
double GetDefaultDuration() override
Definition: Effect.cpp:810
Effect::GetType
EffectType GetType() override
Definition: Effect.cpp:132
EffectClientInterface::GetTailSize
virtual size_t GetTailSize()=0
PluginManager::SetPrivateConfig
bool SetPrivateConfig(const PluginID &ID, const RegistryPath &group, const RegistryPath &key, const wxString &value) override
Definition: PluginManager.cpp:613
Effect::CheckWhetherSkipEffect
virtual bool CheckWhetherSkipEffect()
Definition: Effect.h:299
Effect::kCurrentSettingsIdent
static const wxString kCurrentSettingsIdent
Definition: Effect.h:539
Effect::ReplaceProcessedTracks
void ReplaceProcessedTracks(const bool bGoodResult)
Definition: Effect.cpp:2192
name
const TranslatableString name
Definition: Distortion.cpp:98
kPlayID
static const int kPlayID
Definition: Effect.cpp:54
Track::Fallthrough
Continuation<> Fallthrough
Type of arguments passed as optional second parameter to TypeSwitch<void>() cases.
Definition: Track.h:488
PluginManager::GetPrivateConfigSubgroups
bool GetPrivateConfigSubgroups(const PluginID &ID, const RegistryPath &group, RegistryPaths &subgroups) override
Definition: PluginManager.cpp:583
QualitySettings::DefaultSampleRate
AUDACITY_DLL_API IntSetting DefaultSampleRate
Definition: QualitySettings.cpp:15
Effect::mNumAudioOut
size_t mNumAudioOut
Definition: Effect.h:530
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:496
ProjectSettings::GetSelectionFormat
const NumericFormatSymbol & GetSelectionFormat() const
Definition: ProjectSettings.cpp:153
Track::LeftChannel
static const auto LeftChannel
Definition: Track.h:266
Effect::kUserPresetIdent
static const wxString kUserPresetIdent
Definition: Effect.h:537
Effect::InitPass1
virtual bool InitPass1()
Definition: Effect.cpp:1360
TransactionScope
RAII for a database transaction, possibly nested.
Definition: DBConnection.h:136
Effect::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: Effect.cpp:152
EffectDefinitionInterface::GetType
virtual EffectType GetType()=0
Effect::mUIFlags
unsigned mUIFlags
Definition: Effect.h:480
Effect::CalcPreviewInputLength
virtual double CalcPreviewInputLength(double previewLength)
Definition: Effect.cpp:2284
WaveTrack::GetStartTime
double GetStartTime() const override
Get the time at which the first clip in the track starts.
Definition: WaveTrack.cpp:1780
EffectClientInterface::ProcessInitialize
virtual bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL)=0
NumericConverter::HoursMinsSecondsFormat
static NumericFormatSymbol HoursMinsSecondsFormat()
Definition: NumericTextCtrl.cpp:694
Effect::HasPrivateConfigGroup
bool HasPrivateConfigGroup(const RegistryPath &group) override
Definition: Effect.cpp:951
Effect::mNumChannels
unsigned mNumChannels
Definition: Effect.h:534
ComponentInterface::GetDescription
virtual TranslatableString GetDescription()=0
Effect::mUIDebug
bool mUIDebug
Definition: Effect.h:519
Setting::ReadWithDefault
bool ReadWithDefault(T *pVar, const T &defaultValue) const
overload of ReadWithDefault returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:134
Effect::GetFactoryDefaultsGroup
RegistryPath GetFactoryDefaultsGroup() override
Definition: Effect.cpp:870
Effect::mOutputTracks
std::shared_ptr< TrackList > mOutputTracks
Definition: Effect.h:465
title
static const auto title
Definition: UpdateNoticeDialog.cpp:23
BasicUI::ErrorDialogOptions
Options for variations of error dialogs; the default is for modal dialogs.
Definition: BasicUI.h:49
NotifyingSelectedRegion::f0
double f0() const
Definition: ViewInfo.h:47
Effect::GetCurrentSettingsGroup
RegistryPath GetCurrentSettingsGroup() override
Definition: Effect.cpp:865
RegistryPath
wxString RegistryPath
Definition: Identifier.h:218
kFFwdID
static const int kFFwdID
Definition: Effect.cpp:56
Track::GetSelected
bool GetSelected() const
Definition: Track.h:415
Identifier::GET
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
Definition: Identifier.h:66
Effect::mBlockSize
size_t mBlockSize
Definition: Effect.h:533
samplePtr
char * samplePtr
Definition: SampleFormat.h:49
EffectClientInterface::GetLatency
virtual sampleCount GetLatency()=0
Effect::Init
virtual bool Init()
Definition: Effect.cpp:1350
Effect::SetDuration
void SetDuration(double duration) override
Definition: Effect.cpp:837
TrackList::GetOwner
AudacityProject * GetOwner()
Definition: Track.h:1299
id
int id
Definition: WaveTrackControls.cpp:590
WaveTrack::GetMaxBlockSize
size_t GetMaxBlockSize() const
Definition: WaveTrack.cpp:1581
PluginManager::GetPrivateConfig
bool GetPrivateConfig(const PluginID &ID, const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval=_T("")) override
Definition: PluginManager.cpp:588
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
NotifyingSelectedRegion::f1
double f1() const
Definition: ViewInfo.h:48
Effect::mIsPreview
bool mIsPreview
Definition: Effect.h:517
Effect::mSampleRate
double mSampleRate
Definition: Effect.h:460
PluginManager::Get
static PluginManager & Get()
Definition: PluginManager.cpp:695
EffectClientInterface::LoadUserPreset
virtual bool LoadUserPreset(const RegistryPath &name)=0
MixAndRender
void MixAndRender(TrackList *tracks, WaveTrackFactory *trackFactory, double rate, sampleFormat format, double startTime, double endTime, WaveTrack::Holder &uLeft, WaveTrack::Holder &uRight)
Mixes together all input tracks, applying any envelopes, amplitude gain, panning, and real-time effec...
Definition: Mix.cpp:43
Effect::mOMap
std::vector< Track * > mOMap
Definition: Effect.h:522
NumericConverter
NumericConverter provides the advanced formatting control used in the selection bar of Audacity.
Definition: NumericTextCtrl.h:48
BasicUI
Definition: Export.h:39
Effect::GetFamily
EffectFamilySymbol GetFamily() override
Definition: Effect.cpp:192
WaveTrack::TimeToLongSamples
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Definition: WaveTrack.cpp:1770
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: CommandManager.cpp:197
TrackList::GroupChannels
void GroupChannels(Track &track, size_t groupSize, bool resetChannels=true)
Define a group of channels starting at the given track.
Definition: Track.cpp:707
EffectClientInterface::IsReady
virtual bool IsReady()=0
FileNames::SelectFile
AUDACITY_DLL_API FilePath SelectFile(Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
Effect::SetPresetParameters
void SetPresetParameters(const wxArrayString *Names, const wxArrayString *Values)
Definition: Effect.h:251
Track
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:239
Effect::mUIParent
wxWindow * mUIParent
Definition: Effect.h:478
PluginManager::GetID
static PluginID GetID(ModuleInterface *module)
Definition: PluginManager.cpp:1553
Effect::CountWaveTracks
void CountWaveTracks()
Definition: Effect.cpp:2278
Effect::ProcessInitialize
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: Effect.cpp:368
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18
Effect::mNumGroups
int mNumGroups
Definition: Effect.h:525
BasicUI::ProgressDialog
Abstraction of a progress dialog with well defined time-to-completion estimate.
Definition: BasicUI.h:154
Effect::GetPath
PluginPath GetPath() override
Definition: Effect.cpp:142
kRewindID
static const int kRewindID
Definition: Effect.cpp:55
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:113
Effect::GetBounds
void GetBounds(const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
Definition: Effect.cpp:2040
TrackList::Replace
ListOfTracks::value_type Replace(Track *t, const ListOfTracks::value_type &with)
Definition: Track.cpp:758
WaveTrackView::Get
static WaveTrackView & Get(WaveTrack &track)
Definition: WaveTrackView.cpp:771
EffectClientInterface::GetAudioInCount
virtual unsigned GetAudioInCount()=0
Effect::ProcessTrack
bool ProcessTrack(int count, ChannelNames map, WaveTrack *left, WaveTrack *right, sampleCount start, sampleCount len, FloatBuffers &inBuffer, FloatBuffers &outBuffer, ArrayOf< float * > &inBufPos, ArrayOf< float * > &outBufPos)
Definition: Effect.cpp:1544
ComponentInterfaceSymbol::Internal
const wxString & Internal() const
Definition: ComponentInterfaceSymbol.h:55
Effect::nEffectsDone
static int nEffectsDone
Definition: Effect.h:376
EffectClientInterface::GetBlockSize
virtual size_t GetBlockSize() const =0
ExceptionType::Internal
@ Internal
Indicates internal failure from Audacity.
TrackList::Create
static std::shared_ptr< TrackList > Create(AudacityProject *pOwner)
Definition: Track.cpp:512
ShuttleSetAutomation::bOK
bool bOK
Definition: Shuttle.h:108
EffectClientInterface::RealtimeProcess
virtual size_t RealtimeProcess(int group, float **inBuf, float **outBuf, size_t numSamples)=0
ProjectAudioManager::GetAllPlaybackTracks
static TransportTracks GetAllPlaybackTracks(TrackList &trackList, bool selectedOnly, bool useMidi=false)
Definition: ProjectAudioManager.cpp:1036
Effect::mPresetNames
wxArrayString mPresetNames
Definition: Effect.h:472
NotifyingSelectedRegion::t0
double t0() const
Definition: ViewInfo.h:45
PluginManager::RemoveSharedConfigSubgroup
bool RemoveSharedConfigSubgroup(const PluginID &ID, const RegistryPath &group) override
Definition: PluginManager.cpp:556
params
EffectDistortion::Params params
Definition: Distortion.cpp:99
Effect::GetSavedStateGroup
virtual wxString GetSavedStateGroup()
Definition: Effect.cpp:875
Effect::kFactoryDefaultsIdent
static const wxString kFactoryDefaultsIdent
Definition: Effect.h:540
TrackList::Any
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1355
Effect::Startup
virtual bool Startup()
Definition: Effect.cpp:1061
TrackList::Remove
TrackNodePointer Remove(Track *t)
Remove the Track and return an iterator to what followed it.
Definition: Track.cpp:780
EffectClientInterface::GetAutomationParameters
virtual bool GetAutomationParameters(CommandParameters &parms)=0
ComponentInterface::GetName
TranslatableString GetName()
Definition: PluginManager.cpp:2083
ChannelNameMono
@ ChannelNameMono
Definition: EffectInterface.h:147
EffectClientInterface::RealtimeResume
virtual bool RealtimeResume()=0
ComponentInterface::GetVersion
virtual wxString GetVersion()=0
AudioIO::Get
static AudioIO * Get()
Definition: AudioIO.cpp:505
EffectClientInterface::RealtimeProcessStart
virtual bool RealtimeProcessStart()=0
safenew
#define safenew
Definition: MemoryX.h:10
QUANTIZED_TIME
#define QUANTIZED_TIME(time, rate)
Definition: MemoryX.h:626
Effect::GetPrivateConfig
bool GetPrivateConfig(const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval={}) override
Definition: Effect.cpp:961
Effect::kFactoryPresetIdent
static const wxString kFactoryPresetIdent
Definition: Effect.h:538
WaveTrackView::SetDisplay
void SetDisplay(Display display, bool exclusive=true)
Definition: WaveTrackView.cpp:871
limitSampleBufferSize
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition: SampleCount.cpp:21
Effect::ShowInterface
bool ShowInterface(wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false) override
Definition: Effect.cpp:480
ComponentInterface::DefineParams
virtual bool DefineParams(ShuttleParams &WXUNUSED(S))
Definition: ComponentInterface.h:85
EffectDefinitionInterface::GetFamily
virtual EffectFamilySymbol GetFamily()=0
Effect::TrackGroupProgress
bool TrackGroupProgress(int whichGroup, double frac, const TranslatableString &={})
Definition: Effect.cpp:2032
PasteTimeWarper
Unit slope but with either a jump (pasting more) or a flat interval (pasting less)
Definition: TimeWarper.h:181
Effect::SetBlockSize
size_t SetBlockSize(size_t maxBlockSize) override
Definition: Effect.cpp:316
WaveTrack::GetFloats
bool GetFloats(float *buffer, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumWithinClips=nullptr) const
Retrieve samples from a track in floating-point format, regardless of the storage format.
Definition: WaveTrack.h:261
Effect::mPresetValues
wxArrayString mPresetValues
Definition: Effect.h:473
Effect::mIMap
std::vector< Track * > mIMap
Definition: Effect.h:521
TrackList::Selected
auto Selected() -> TrackIterRange< TrackType >
Definition: Track.h:1372
WaveTrackFactory::NewWaveTrack
std::shared_ptr< WaveTrack > NewWaveTrack(sampleFormat format=(sampleFormat) 0, double rate=0)
Definition: WaveTrack.cpp:85
Effect::TrackProgress
bool TrackProgress(int whichTrack, double frac, const TranslatableString &={})
Definition: Effect.cpp:2024
ArrayOf
Memory.h template class for making an array of float, bool, etc.
Definition: MemoryX.h:27
ShuttleSetAutomation::SetForWriting
void SetForWriting(CommandParameters *pEap)
Definition: Shuttle.h:114
Effect::Process
virtual bool Process()
Definition: Effect.cpp:1370
Effect::mPreviewWithNotSelected
bool mPreviewWithNotSelected
Definition: Effect.h:511
PluginManager::SetSharedConfig
bool SetSharedConfig(const PluginID &ID, const RegistryPath &group, const RegistryPath &key, const wxString &value) override
Definition: PluginManager.cpp:531
pdlgHideCancelButton
@ pdlgHideCancelButton
Definition: ProgressDialog.h:39
EffectClientInterface::SaveUserPreset
virtual bool SaveUserPreset(const RegistryPath &name)=0
PluginManager::HasSharedConfigGroup
bool HasSharedConfigGroup(const PluginID &ID, const RegistryPath &group)
Definition: PluginManager.cpp:496
Effect::mClient
EffectClientInterface * mClient
Definition: Effect.h:528
EffectDefinitionInterface::IsDefault
virtual bool IsDefault()=0
Effect::LoadFactoryPreset
bool LoadFactoryPreset(int id) override
Definition: Effect.cpp:595
NotifyingSelectedRegion
Definition: ViewInfo.h:42
WaveTrack::GetRate
double GetRate() const
Definition: WaveTrack.cpp:358