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 85 of file Effect.cpp.

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

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 123 of file Effect.cpp.

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

References mUIDialog.

Member Function Documentation

◆ AddAnalysisTrack()

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

Definition at line 2135 of file Effect.cpp.

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

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 2098 of file Effect.cpp.

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

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 2285 of file Effect.cpp.

2286 {
2287  return previewLength;
2288 }

Referenced by Preview(), and ProcessTrack().

Here is the caller graph for this function:

◆ CanExportPresets()

bool Effect::CanExportPresets ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 663 of file Effect.cpp.

664 {
665  return true;
666 }

◆ 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 652 of file Effect.cpp.

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

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 2071 of file Effect.cpp.

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

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 2279 of file Effect.cpp.

2280 {
2281  mNumTracks = mTracks->Selected< const WaveTrack >().size();
2283 }

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

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 1340 of file Effect.cpp.

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

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 1209 of file Effect.cpp.

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

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 1926 of file Effect.cpp.

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

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 1996 of file Effect.cpp.

1997 {
1998  mUIDebug = enable;
1999 }

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 1957 of file Effect.cpp.

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

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 1907 of file Effect.cpp.

1908 {
1909 }

Referenced by DoEffect(), and Preview().

Here is the caller graph for this function:

◆ ExportPresets()

void Effect::ExportPresets ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 677 of file Effect.cpp.

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

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

Here is the call graph for this function:

◆ FindProject()

const AudacityProject * Effect::FindProject ( ) const
protected

Definition at line 2272 of file Effect.cpp.

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

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 267 of file Effect.cpp.

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

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 277 of file Effect.cpp.

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

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 534 of file Effect.cpp.

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

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 1067 of file Effect.cpp.

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

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 329 of file Effect.cpp.

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

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 2041 of file Effect.cpp.

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

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 811 of file Effect.cpp.

812 {
813  return 30.0;
814 }

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 183 of file Effect.cpp.

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

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 826 of file Effect.cpp.

827 {
828  return mDurationFormat;
829 }

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 871 of file Effect.cpp.

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

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 586 of file Effect.cpp.

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

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 193 of file Effect.cpp.

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

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 1024 of file Effect.cpp.

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

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 339 of file Effect.cpp.

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

Referenced by ProcessTrack().

Here is the caller graph for this function:

◆ GetMidiInCount()

int Effect::GetMidiInCount ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 287 of file Effect.cpp.

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

References EffectClientInterface::GetMidiInCount(), and mClient.

Here is the call graph for this function:

◆ GetMidiOutCount()

int Effect::GetMidiOutCount ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 297 of file Effect.cpp.

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

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 1356 of file Effect.cpp.

1357 {
1358  return mPass;
1359 }

References mPass.

◆ GetPath()

PluginPath Effect::GetPath ( )
overridevirtual

Implements ComponentInterface.

Reimplemented in VampEffect, and NyquistEffect.

Definition at line 143 of file Effect.cpp.

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

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 972 of file Effect.cpp.

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

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 982 of file Effect.cpp.

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

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 977 of file Effect.cpp.

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

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 967 of file Effect.cpp.

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

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 962 of file Effect.cpp.

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

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 957 of file Effect.cpp.

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

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 876 of file Effect.cpp.

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

Referenced by SetBatchProcessing().

Here is the caller graph for this function:

◆ GetSelectionFormat()

NumericFormatSymbol Effect::GetSelectionFormat ( )
virtual

Definition at line 831 of file Effect.cpp.

832 {
833  if( !IsBatchProcessing() && FindProject() )
836 }

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 902 of file Effect.cpp.

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

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 912 of file Effect.cpp.

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

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 907 of file Effect.cpp.

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

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 897 of file Effect.cpp.

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

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 892 of file Effect.cpp.

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

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 887 of file Effect.cpp.

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

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 776 of file Effect.cpp.

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

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 153 of file Effect.cpp.

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

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 349 of file Effect.cpp.

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

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 133 of file Effect.cpp.

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

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 1151 of file Effect.cpp.

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

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 855 of file Effect.cpp.

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

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 163 of file Effect.cpp.

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

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 173 of file Effect.cpp.

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

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 1162 of file Effect.cpp.

1163 {
1165 }

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 1167 of file Effect.cpp.

1168 {
1170 }

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 800 of file Effect.cpp.

801 {
802  return false;
803 }

◆ HasPrivateConfigGroup()

bool Effect::HasPrivateConfigGroup ( const RegistryPath group)
overridevirtual

Implements ConfigClientInterface.

Definition at line 952 of file Effect.cpp.

953 {
955 }

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 882 of file Effect.cpp.

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

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 1177 of file Effect.cpp.

1178 {
1179  return {};
1180 }

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 647 of file Effect.cpp.

648 {
649  return true;
650 }

◆ ImportPresets()

void Effect::ImportPresets ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 725 of file Effect.cpp.

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

References Identifier::GET(), GetSquashedName(), GetSymbol(), ident(), Internal, MessageBox(), params, PresetTypes(), 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 2012 of file Effect.cpp.

2013 {
2014  mPreviewWithNotSelected = includeNotSelected;
2015 }

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 1351 of file Effect.cpp.

1352 {
1353  return true;
1354 }

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 1361 of file Effect.cpp.

1362 {
1363  return true;
1364 }

Referenced by Process().

Here is the caller graph for this function:

◆ InitPass2()

bool Effect::InitPass2 ( )
protectedvirtual

Reimplemented in EffectTwoPassSimpleMono, and EffectCompressor.

Definition at line 1366 of file Effect.cpp.

1367 {
1368  return false;
1369 }

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 215 of file Effect.cpp.

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

References EffectDefinitionInterface::IsDefault(), and mClient.

Here is the call graph for this function:

◆ IsGraphicalUI()

bool Effect::IsGraphicalUI ( )
overridevirtual

Implements EffectUIClientInterface.

Definition at line 637 of file Effect.cpp.

638 {
639  return false;
640 }

◆ IsHidden()

bool Effect::IsHidden ( )
virtual

Reimplemented in EffectStereoToMono.

Definition at line 2290 of file Effect.cpp.

2291 {
2292  return false;
2293 }

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 205 of file Effect.cpp.

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

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 225 of file Effect.cpp.

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

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 359 of file Effect.cpp.

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

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 606 of file Effect.cpp.

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

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 596 of file Effect.cpp.

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

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 554 of file Effect.cpp.

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

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 1172 of file Effect.cpp.

1173 {
1174  return {};
1175 }

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 2185 of file Effect.cpp.

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

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 1911 of file Effect.cpp.

1912 {
1913  return;
1914 }

Referenced by PopulateUI().

Here is the caller graph for this function:

◆ PopulateUI()

bool Effect::PopulateUI ( ShuttleGui S)
finalvirtual

Implements EffectUIClientInterface.

Definition at line 622 of file Effect.cpp.

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

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 2295 of file Effect.cpp.

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

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, GuardedCall(), Init(), TrackList::MakeMultiChannelTrack(), 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 1371 of file Effect.cpp.

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

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 389 of file Effect.cpp.

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

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 379 of file Effect.cpp.

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

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 369 of file Effect.cpp.

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

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 1397 of file Effect.cpp.

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

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 1545 of file Effect.cpp.

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

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 412 of file Effect.cpp.

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

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 422 of file Effect.cpp.

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

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 399 of file Effect.cpp.

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

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 458 of file Effect.cpp.

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

References mClient, and EffectClientInterface::RealtimeProcess().

Here is the call graph for this function:

◆ RealtimeProcessEnd()

bool Effect::RealtimeProcessEnd ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 471 of file Effect.cpp.

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

References mClient, and EffectClientInterface::RealtimeProcessEnd().

Here is the call graph for this function:

◆ RealtimeProcessStart()

bool Effect::RealtimeProcessStart ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 448 of file Effect.cpp.

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

References mClient, and EffectClientInterface::RealtimeProcessStart().

Here is the call graph for this function:

◆ RealtimeResume()

bool Effect::RealtimeResume ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 440 of file Effect.cpp.

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

References mClient, and EffectClientInterface::RealtimeResume().

Here is the call graph for this function:

◆ RealtimeSuspend()

bool Effect::RealtimeSuspend ( )
overridevirtual

Implements EffectClientInterface.

Definition at line 432 of file Effect.cpp.

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

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 1017 of file Effect.cpp.

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

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 1012 of file Effect.cpp.

1013 {
1015 }

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 947 of file Effect.cpp.

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

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 942 of file Effect.cpp.

943 {
945 }

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 2193 of file Effect.cpp.

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

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 570 of file Effect.cpp.

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

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 544 of file Effect.cpp.

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

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 1090 of file Effect.cpp.

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

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 1195 of file Effect.cpp.

1196 {
1197  mIsBatch = start;
1198 
1199  if (start)
1200  {
1202  }
1203  else
1204  {
1206  }
1207 }

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 317 of file Effect.cpp.

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

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 838 of file Effect.cpp.

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

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 257 of file Effect.cpp.

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

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 618 of file Effect.cpp.

619 {
620 }

◆ SetLinearEffectFlag()

void Effect::SetLinearEffectFlag ( bool  linearEffectFlag)
protected

Definition at line 2001 of file Effect.cpp.

2002 {
2003  mIsLinearEffect = linearEffectFlag;
2004 }

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 2006 of file Effect.cpp.

2007 {
2008  mPreviewFullSelection = previewDurationFlag;
2009 }

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 997 of file Effect.cpp.

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

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 1007 of file Effect.cpp.

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

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 1002 of file Effect.cpp.

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

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 992 of file Effect.cpp.

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

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 987 of file Effect.cpp.

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

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 307 of file Effect.cpp.

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

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 927 of file Effect.cpp.

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

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 937 of file Effect.cpp.

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

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 932 of file Effect.cpp.

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

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 922 of file Effect.cpp.

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

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 917 of file Effect.cpp.

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

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 1182 of file Effect.cpp.

1182  {
1183  mUIFlags = flags;
1184 }

References mUIFlags.

Referenced by EffectUI::DoEffect().

Here is the caller graph for this function:

◆ SetVetoDialogHook()

auto Effect::SetVetoDialogHook ( VetoDialogHook  hook)
static

Definition at line 76 of file Effect.cpp.

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

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 481 of file Effect.cpp.

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

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 805 of file Effect.cpp.

806 {
807 }

◆ 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 1062 of file Effect.cpp.

1063 {
1064  return true;
1065 }

Referenced by Startup().

Here is the caller graph for this function:

◆ Startup() [2/2]

bool Effect::Startup ( EffectClientInterface client)
virtual

Definition at line 1034 of file Effect.cpp.

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

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 245 of file Effect.cpp.

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

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 235 of file Effect.cpp.

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

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 1186 of file Effect.cpp.

1186  {
1187  return mask & mUIFlags;
1188 }

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 2017 of file Effect.cpp.

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

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 2033 of file Effect.cpp.

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

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 2025 of file Effect.cpp.

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

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 1916 of file Effect.cpp.

1917 {
1918  return true;
1919 }

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 642 of file Effect.cpp.

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

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(), and Preview().

◆ 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:
size
size_t size
Definition: ffmpeg-2.3.6-single-header.h:412
Effect::mSampleCnt
sampleCount mSampleCnt
Definition: Effect.h:482
Effect::GetAutomationParameters
bool GetAutomationParameters(CommandParameters &parms) override
Definition: Effect.cpp:534
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:161
Effect::GetSquashedName
static CommandID GetSquashedName(wxString name)
Definition: Effect.cpp:776
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:1209
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:2272
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
BasicUI::ProgressResult::Success
@ Success
make_iterator_range
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
Definition: MemoryX.h:551
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:205
NotifyingSelectedRegion::duration
double duration() const
Definition: ViewInfo.h:53
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
Definition: AudacityMessageBox.cpp:17
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:2482
ProjectAudioManager::GetAllPlaybackTracks
static TransportTracks GetAllPlaybackTracks(TrackList &trackList, bool selectedOnly, bool nonWaveToo=false)
Definition: ProjectAudioManager.cpp:1035
WaveTrack::GetEndTime
double GetEndTime() const override
Get the time at which the last clip in the track ends, plus recorded stuff.
Definition: WaveTrack.cpp:1895
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:1916
Effect::mDuration
double mDuration
Definition: Effect.h:514
Effect::CopyInputTracks
void CopyInputTracks(bool allSyncLockSelected=false)
Definition: Effect.cpp:2071
Effect::SupportsRealtime
bool SupportsRealtime() override
Definition: Effect.cpp:235
DefaultPlayOptions
AudioIOStartStreamOptions DefaultPlayOptions(AudacityProject &project)
Definition: ProjectAudioManager.cpp:1008
Effect::GetID
virtual PluginID GetID()
Definition: Effect.cpp:1024
ident
static CommandHandlerObject & ident(AudacityProject &project)
Definition: ModNullCallback.cpp:65
ChannelNameFrontRight
@ ChannelNameFrontRight
Definition: EffectInterface.h:150
EffectTypeGenerate
@ EffectTypeGenerate
Definition: EffectInterface.h:58
SelectFile
FilePath SelectFile(FileNames::Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
Definition: SelectFile.cpp:17
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:1484
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:1280
Effect::GetAudioInCount
unsigned GetAudioInCount() override
Definition: Effect.cpp:267
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:554
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:1957
ProjectFileIO::Get
static ProjectFileIO & Get(AudacityProject &project)
Definition: ProjectFileIO.cpp:265
Effect::SetAutomationParameters
bool SetAutomationParameters(CommandParameters &parms) override
Definition: Effect.cpp:544
Effect::mTracks
TrackList * mTracks
Definition: Effect.h:507
Effect::ProcessFinalize
bool ProcessFinalize() override
Definition: Effect.cpp:379
ProjectSettings::Get
static ProjectSettings & Get(AudacityProject &project)
Definition: ProjectSettings.cpp:41
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:987
TrackList::Add
TrackKind * Add(const std::shared_ptr< TrackKind > &t)
Definition: Track.h:1503
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:1190
Effect::mPass
int mPass
Definition: Effect.h:474
ChannelNameFrontLeft
@ ChannelNameFrontLeft
Definition: EffectInterface.h:149
SelectedRegion::UndefinedFrequency
static const int UndefinedFrequency
Definition: SelectedRegion.h:41
EffectClientInterface::ProcessBlock
virtual size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen)=0
Effect::SetHost
bool SetHost(EffectHostInterface *host) override
Definition: Effect.cpp:257
ChannelNameEOL
@ ChannelNameEOL
Definition: EffectInterface.h:145
ChannelName
ChannelName
Definition: EffectInterface.h:143
Effect::GetUserPresetsGroup
RegistryPath GetUserPresetsGroup(const RegistryPath &name) override
Definition: Effect.cpp:855
EffectDefinitionInterface::SupportsRealtime
virtual bool SupportsRealtime()=0
Effect::mPreviewFullSelection
bool mPreviewFullSelection
Definition: Effect.h:512
Effect::InitPass2
virtual bool InitPass2()
Definition: Effect.cpp:1366
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:847
Effect::SaveUserPreset
bool SaveUserPreset(const RegistryPath &name) override
Definition: Effect.cpp:570
PresetTypes
static const FileNames::FileTypes & PresetTypes()
Definition: Effect.cpp:668
PluginManager::HasPrivateConfigGroup
bool HasPrivateConfigGroup(const PluginID &ID, const RegistryPath &group)
Definition: PluginManager.cpp:578
TrackList::SelectedLeaders
auto SelectedLeaders() -> TrackIterRange< TrackType >
Definition: Track.h:1422
Effect::GetPrivateConfigSubgroups
bool GetPrivateConfigSubgroups(const RegistryPath &group, RegistryPaths &paths) override
Definition: Effect.cpp:957
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:1921
t2bHash
std::unordered_map< void *, bool > t2bHash
Definition: Effect.cpp:64
WaveTrack::EmptyCopy
Holder EmptyCopy(const SampleBlockFactoryPtr &pFactory={}) const
Definition: WaveTrack.cpp:666
Effect::mFactory
WaveTrackFactory * mFactory
Definition: Effect.h:462
NotifyingSelectedRegion::t1
double t1() const
Definition: ViewInfo.h:48
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:1397
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:62
WaveTrack::Set
void Set(constSamplePtr buffer, sampleFormat format, sampleCount start, size_t len)
Definition: WaveTrack.cpp:2076
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:96
Effect::End
virtual void End()
Definition: Effect.cpp:1907
Effect::GetAudioOutCount
unsigned GetAudioOutCount() override
Definition: Effect.cpp:277
Effect::SetSampleRate
void SetSampleRate(double rate) override
Definition: Effect.cpp:307
Effect::ProcessBlock
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Effect.cpp:389
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:196
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:1911
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:444
anonymous_namespace{Effect.cpp}::GetVetoDialogHook
Effect::VetoDialogHook & GetVetoDialogHook()
Definition: Effect.cpp:68
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:586
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:339
EffectClientInterface::SetHost
virtual bool SetHost(EffectHostInterface *host)=0
Effect::GetDefaultDuration
double GetDefaultDuration() override
Definition: Effect.cpp:811
TrackList::MakeMultiChannelTrack
bool MakeMultiChannelTrack(Track &first, int nChannels, bool aligned)
Converts channels to a multichannel track.
Definition: Track.cpp:756
Effect::GetType
EffectType GetType() override
Definition: Effect.cpp:133
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:2193
name
const TranslatableString name
Definition: Distortion.cpp:98
kPlayID
static const int kPlayID
Definition: Effect.cpp:55
Track::Fallthrough
Continuation<> Fallthrough
Type of arguments passed as optional second parameter to TypeSwitch<void>() cases.
Definition: Track.h:504
Track::RightChannel
@ RightChannel
Definition: Track.h:277
PluginManager::GetPrivateConfigSubgroups
bool GetPrivateConfigSubgroups(const PluginID &ID, const RegistryPath &group, RegistryPaths &subgroups) override
Definition: PluginManager.cpp:583
QualitySettings::DefaultSampleRate
PROJECT_RATE_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:144
Effect::kUserPresetIdent
static const wxString kUserPresetIdent
Definition: Effect.h:537
Effect::InitPass1
virtual bool InitPass1()
Definition: Effect.cpp:1361
TransactionScope
RAII for a database transaction, possibly nested.
Definition: DBConnection.h:136
Effect::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: Effect.cpp:153
EffectDefinitionInterface::GetType
virtual EffectType GetType()=0
Effect::mUIFlags
unsigned mUIFlags
Definition: Effect.h:480
Effect::CalcPreviewInputLength
virtual double CalcPreviewInputLength(double previewLength)
Definition: Effect.cpp:2285
WaveTrack::GetStartTime
double GetStartTime() const override
Get the time at which the first clip in the track starts.
Definition: WaveTrack.cpp:1875
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:952
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:871
Effect::mOutputTracks
std::shared_ptr< TrackList > mOutputTracks
Definition: Effect.h:465
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:49
Effect::GetCurrentSettingsGroup
RegistryPath GetCurrentSettingsGroup() override
Definition: Effect.cpp:866
RegistryPath
wxString RegistryPath
Definition: Identifier.h:218
kFFwdID
static const int kFFwdID
Definition: Effect.cpp:57
Track::GetSelected
bool GetSelected() const
Definition: Track.h:431
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:1351
Effect::SetDuration
void SetDuration(double duration) override
Definition: Effect.cpp:838
TrackList::GetOwner
AudacityProject * GetOwner()
Definition: Track.h:1315
id
int id
Definition: WaveTrackControls.cpp:591
WaveTrack::GetMaxBlockSize
size_t GetMaxBlockSize() const
Definition: WaveTrack.cpp:1669
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:50
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
title
static const auto title
Definition: NoUpdatesAvailableDialog.cpp:22
Effect::GetFamily
EffectFamilySymbol GetFamily() override
Definition: Effect.cpp:193
WaveTrack::TimeToLongSamples
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Definition: WaveTrack.cpp:1865
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: CommandManager.cpp:201
EffectClientInterface::IsReady
virtual bool IsReady()=0
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:2279
Effect::ProcessInitialize
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: Effect.cpp:369
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:143
kRewindID
static const int kRewindID
Definition: Effect.cpp:56
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
Effect::GetBounds
void GetBounds(const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
Definition: Effect.cpp:2041
TrackList::Replace
ListOfTracks::value_type Replace(Track *t, const ListOfTracks::value_type &with)
Definition: Track.cpp:718
WaveTrackView::Get
static WaveTrackView & Get(WaveTrack &track)
Definition: WaveTrackView.cpp:880
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:1545
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:523
ShuttleSetAutomation::bOK
bool bOK
Definition: Shuttle.h:108
EffectClientInterface::RealtimeProcess
virtual size_t RealtimeProcess(int group, float **inBuf, float **outBuf, size_t numSamples)=0
Effect::mPresetNames
wxArrayString mPresetNames
Definition: Effect.h:472
NotifyingSelectedRegion::t0
double t0() const
Definition: ViewInfo.h:47
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:876
Effect::kFactoryDefaultsIdent
static const wxString kFactoryDefaultsIdent
Definition: Effect.h:540
TrackList::Any
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1371
Effect::Startup
virtual bool Startup()
Definition: Effect.cpp:1062
TrackList::Remove
TrackNodePointer Remove(Track *t)
Remove the Track and return an iterator to what followed it.
Definition: Track.cpp:792
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:138
EffectClientInterface::RealtimeProcessStart
virtual bool RealtimeProcessStart()=0
safenew
#define safenew
Definition: MemoryX.h:10
QUANTIZED_TIME
#define QUANTIZED_TIME(time, rate)
Definition: MemoryX.h:628
Effect::GetPrivateConfig
bool GetPrivateConfig(const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval={}) override
Definition: Effect.cpp:962
Effect::kFactoryPresetIdent
static const wxString kFactoryPresetIdent
Definition: Effect.h:538
WaveTrackView::SetDisplay
void SetDisplay(Display display, bool exclusive=true)
Definition: WaveTrackView.cpp:992
limitSampleBufferSize
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition: SampleCount.cpp:23
Effect::ShowInterface
bool ShowInterface(wxWindow &parent, const EffectDialogFactory &factory, bool forceModal=false) override
Definition: Effect.cpp:481
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:2033
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:317
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:265
Effect::mPresetValues
wxArrayString mPresetValues
Definition: Effect.h:473
Track::LeftChannel
@ LeftChannel
Definition: Track.h:276
Effect::mIMap
std::vector< Track * > mIMap
Definition: Effect.h:521
TrackList::Selected
auto Selected() -> TrackIterRange< TrackType >
Definition: Track.h:1388
WaveTrackFactory::NewWaveTrack
std::shared_ptr< WaveTrack > NewWaveTrack(sampleFormat format=(sampleFormat) 0, double rate=0)
Definition: WaveTrack.cpp:113
Effect::TrackProgress
bool TrackProgress(int whichTrack, double frac, const TranslatableString &={})
Definition: Effect.cpp:2025
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:1371
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:596
NotifyingSelectedRegion
Definition: ViewInfo.h:44
WaveTrack::GetRate
double GetRate() const
Definition: WaveTrack.cpp:452