Audacity  3.0.3
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
EffectTwoPassSimpleMono Class Reference

An Effect base class that implements a two pass process by using EffectSimpleMono. More...

#include <TwoPassSimpleMono.h>

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

Public Member Functions

bool Process () override
 
- Public Member Functions inherited from Effect
 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 wxString ManualPage ()
 
virtual wxString 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 ()
 

Protected Member Functions

bool InitPass1 () override
 
bool InitPass2 () override
 
virtual bool NewTrackPass1 ()
 
virtual bool NewTrackPass2 ()
 
virtual bool ProcessPass1 (float *WXUNUSED(buffer), size_t WXUNUSED(len))
 
virtual bool ProcessPass2 (float *WXUNUSED(buffer), size_t WXUNUSED(len))
 
virtual bool TwoBufferProcessPass1 (float *buffer1, size_t len1, float *WXUNUSED(buffer2), size_t WXUNUSED(len2))
 
virtual bool TwoBufferProcessPass2 (float *buffer1, size_t len1, float *WXUNUSED(buffer2), size_t WXUNUSED(len2))
 
void DisableSecondPass ()
 
- Protected Member Functions inherited from Effect
virtual bool Init ()
 
virtual bool CheckWhetherSkipEffect ()
 
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

int mCurTrackNum
 
double mCurRate
 
double mCurT0
 
double mCurT1
 
int mCurChannel
 
int mPass
 
bool mSecondPassDisabled
 
std::shared_ptr< TrackListmWorkTracks
 
std::shared_ptr< TrackList > * mTrackLists [2]
 
- Protected Attributes inherited from Effect
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
 

Private Member Functions

bool ProcessOne (WaveTrack *t, WaveTrack *outTrack, sampleCount start, sampleCount end)
 
bool ProcessPass () override
 

Additional Inherited Members

- Public Types inherited from Effect
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
using VetoDialogHook = bool(*)(wxDialog *)
 
- Public Types inherited from EffectClientInterface
using EffectDialogFactory = std::function< wxDialog *(wxWindow &parent, EffectHostInterface *, EffectUIClientInterface *) >
 
- Static Public Member Functions inherited from Effect
static VetoDialogHook SetVetoDialogHook (VetoDialogHook hook)
 
static CommandID GetSquashedName (wxString name)
 
static void IncEffectCounter ()
 
- Static Public Attributes inherited from Effect
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>")
 
- Static Protected Attributes inherited from Effect
static int nEffectsDone =0
 

Detailed Description

An Effect base class that implements a two pass process by using EffectSimpleMono.

Inherit from it if your effect needs to pass twice over the data. It does the first pass on all selected tracks before going back and doing the second pass over all selected tracks.

Definition at line 20 of file TwoPassSimpleMono.h.

Member Function Documentation

◆ DisableSecondPass()

void EffectTwoPassSimpleMono::DisableSecondPass ( )
inlineprotected

Definition at line 67 of file TwoPassSimpleMono.h.

67 { mSecondPassDisabled = true; }

References mSecondPassDisabled.

Referenced by EffectCompressor::InitPass1().

Here is the caller graph for this function:

◆ InitPass1()

bool EffectTwoPassSimpleMono::InitPass1 ( )
overrideprotectedvirtual

Reimplemented from Effect.

Definition at line 232 of file TwoPassSimpleMono.cpp.

233 {
234  return true;
235 }

Referenced by Process().

Here is the caller graph for this function:

◆ InitPass2()

bool EffectTwoPassSimpleMono::InitPass2 ( )
overrideprotectedvirtual

Reimplemented from Effect.

Definition at line 239 of file TwoPassSimpleMono.cpp.

240 {
241  return true;
242 }

Referenced by Process().

Here is the caller graph for this function:

◆ NewTrackPass1()

bool EffectTwoPassSimpleMono::NewTrackPass1 ( )
protectedvirtual

Reimplemented in EffectCompressor.

Definition at line 221 of file TwoPassSimpleMono.cpp.

222 {
223  return true;
224 }

Referenced by ProcessPass().

Here is the caller graph for this function:

◆ NewTrackPass2()

bool EffectTwoPassSimpleMono::NewTrackPass2 ( )
protectedvirtual

Definition at line 226 of file TwoPassSimpleMono.cpp.

227 {
228  return true;
229 }

Referenced by ProcessPass().

Here is the caller graph for this function:

◆ Process()

bool EffectTwoPassSimpleMono::Process ( )
overridevirtual

Reimplemented from Effect.

Definition at line 26 of file TwoPassSimpleMono.cpp.

27 {
28  mPass = 0;
29  mSecondPassDisabled = false;
30 
31  InitPass1();
32  this->CopyInputTracks(); // Set up mOutputTracks.
33 
35  const_cast<AudacityProject*>( FindProject() ) );
36  for (auto track : mOutputTracks->Selected< WaveTrack >()) {
37  mWorkTracks->Add(track->EmptyCopy())->ConvertToSampleFormat(floatSample);
38  if( mT0 > 0 )
39  mWorkTracks->back()->InsertSilence(0, mT0);
40  }
41 
44 
45  bool bGoodResult = ProcessPass();
46 
47  if (bGoodResult && !mSecondPassDisabled)
48  {
49  mPass = 1;
50  if (InitPass2())
51  bGoodResult = ProcessPass();
52  }
53 
54  mWorkTracks->Clear();
55  mWorkTracks.reset();
56 
57  this->ReplaceProcessedTracks(bGoodResult);
58  return bGoodResult;
59 }

References Effect::CopyInputTracks(), TrackList::Create(), Effect::FindProject(), floatSample, InitPass1(), InitPass2(), Effect::mOutputTracks, mPass, mSecondPassDisabled, Effect::mT0, mTrackLists, mWorkTracks, ProcessPass(), and Effect::ReplaceProcessedTracks().

Here is the call graph for this function:

◆ ProcessOne()

bool EffectTwoPassSimpleMono::ProcessOne ( WaveTrack t,
WaveTrack outTrack,
sampleCount  start,
sampleCount  end 
)
private

Definition at line 114 of file TwoPassSimpleMono.cpp.

116 {
117  bool ret;
118 
119  //Get the length of the buffer (as double). len is
120  //used simple to calculate a progress meter, so it is easier
121  //to make it a double now than it is to do it later
122  auto len = (end - start).as_double();
123  auto maxblock = track->GetMaxBlockSize();
124 
125  //Initiate a processing buffer. This buffer will (most likely)
126  //be shorter than the length of the track being processed.
127  Floats buffer1{ maxblock };
128  Floats buffer2{ maxblock };
129  auto samples1 = limitSampleBufferSize(
130  std::min( maxblock, track->GetBestBlockSize(start) ), end - start );
131 
132  //Get the samples from the track and put them in the buffer
133  track->Get((samplePtr) buffer1.get(), floatSample, start, samples1);
134 
135  // Process the first buffer with a NULL previous buffer
136  if (mPass == 0)
137  ret = TwoBufferProcessPass1(NULL, 0, buffer1.get(), samples1);
138  else
139  ret = TwoBufferProcessPass2(NULL, 0, buffer1.get(), samples1);
140  if (!ret)
141  //Return false because the effect failed.
142  return false;
143 
144  //Go through the track one buffer at a time. s counts which
145  //sample the current buffer starts at.
146  auto s = start + samples1;
147  while (s < end) {
148  //Get a block of samples (smaller than the size of the buffer)
149  //Adjust the block size if it is the final block in the track
150  auto samples2 = limitSampleBufferSize(
151  std::min( track->GetBestBlockSize(s), maxblock ), end - s
152  );
153 
154  //Get the samples from the track and put them in the buffer
155  track->Get((samplePtr)buffer2.get(), floatSample, s, samples2);
156 
157  //Process the buffer. If it fails, clean up and exit.
158  if (mPass == 0)
159  ret = TwoBufferProcessPass1(buffer1.get(), samples1, buffer2.get(), samples2);
160  else
161  ret = TwoBufferProcessPass2(buffer1.get(), samples1, buffer2.get(), samples2);
162  if (!ret)
163  //Return false because the effect failed.
164  return false;
165 
166  //Processing succeeded. copy the newly-changed samples back
167  //onto the track.
168  if (mSecondPassDisabled || mPass != 0) {
169  outTrack->Set((samplePtr)buffer1.get(), floatSample, s - samples1, samples1);
170  }
171  else {
172  outTrack->Append((samplePtr)buffer1.get(), floatSample, samples1);
173  }
174 
175  //Increment s one blockfull of samples
176  s += samples2;
177 
178  //Update the Progress meter
180  ret = TotalProgress(
181  (mCurTrackNum + (s-start).as_double()/len) /
182  GetNumWaveTracks());
183  else
184  ret = TotalProgress(
185  (mCurTrackNum + (s-start).as_double()/len + GetNumWaveTracks()*mPass) /
186  (GetNumWaveTracks()*2));
187  if (ret)
188  //Return false because the effect failed.
189  return false;
190 
191  // Rotate the buffers
192  buffer1.swap(buffer2);
193 
194  std::swap(samples1, samples2);
195  }
196 
197  // Send the last buffer with a NULL pointer for the current buffer
198  if (mPass == 0)
199  ret = TwoBufferProcessPass1(buffer1.get(), samples1, NULL, 0);
200  else
201  ret = TwoBufferProcessPass2(buffer1.get(), samples1, NULL, 0);
202 
203  if (!ret)
204  //Return false because the effect failed.
205  return false;
206 
207  //Processing succeeded. copy the newly-changed samples back
208  //onto the track.
209  if (mSecondPassDisabled || mPass != 0) {
210  outTrack->Set((samplePtr)buffer1.get(), floatSample, s - samples1, samples1);
211  }
212  else {
213  outTrack->Append((samplePtr)buffer1.get(), floatSample, samples1);
214  outTrack->Flush();
215  }
216 
217  //Return true because the effect processing succeeded.
218  return true;
219 }

References WaveTrack::Append(), floatSample, WaveTrack::Flush(), WaveTrack::Get(), WaveTrack::GetBestBlockSize(), WaveTrack::GetMaxBlockSize(), Effect::GetNumWaveTracks(), limitSampleBufferSize(), mCurTrackNum, min(), mPass, mSecondPassDisabled, WaveTrack::Set(), anonymous_namespace{NoteTrack.cpp}::swap(), Effect::TotalProgress(), TwoBufferProcessPass1(), and TwoBufferProcessPass2().

Referenced by ProcessPass().

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

◆ ProcessPass()

bool EffectTwoPassSimpleMono::ProcessPass ( )
overrideprivatevirtual

Reimplemented from Effect.

Definition at line 61 of file TwoPassSimpleMono.cpp.

62 {
63  //Iterate over each track
64  mCurTrackNum = 0;
65 
66  auto outTracks = (*mTrackLists[1 - mPass])->Selected< WaveTrack >().begin();
67  for( auto track : (*mTrackLists[mPass])->Selected< WaveTrack >() ) {
68  auto outTrack = *outTracks;
69 
70  //Get start and end times from track
71  double trackStart = track->GetStartTime();
72  double trackEnd = track->GetEndTime();
73 
74  //Set the current bounds to whichever left marker is
75  //greater and whichever right marker is less:
76  mCurT0 = mT0 < trackStart? trackStart: mT0;
77  mCurT1 = mT1 > trackEnd? trackEnd: mT1;
78 
79  // Process only if the right marker is to the right of the left marker
80  if (mCurT1 > mCurT0) {
81 
82  //Transform the marker timepoints to samples
83  auto start = track->TimeToLongSamples(mCurT0);
84  auto end = track->TimeToLongSamples(mCurT1);
85 
86  //Get the track rate and samples
87  mCurRate = track->GetRate();
88  mCurChannel = track->GetChannel();
89 
90  //NewTrackPass1/2() returns true by default
91  bool ret;
92  if (mPass == 0)
93  ret = NewTrackPass1();
94  else
95  ret = NewTrackPass2();
96  if (!ret)
97  return false;
98 
99  //ProcessOne() (implemented below) processes a single track
100  if (!ProcessOne(track, outTrack, start, end))
101  return false;
102  }
103 
104  mCurTrackNum++;
105  outTracks++;
106  }
107 
108  return true;
109 }

References mCurChannel, mCurRate, mCurT0, mCurT1, mCurTrackNum, mPass, Effect::mT0, Effect::mT1, mTrackLists, NewTrackPass1(), NewTrackPass2(), and ProcessOne().

Referenced by Process().

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

◆ ProcessPass1()

virtual bool EffectTwoPassSimpleMono::ProcessPass1 ( float *  WXUNUSEDbuffer,
size_t   WXUNUSEDlen 
)
inlineprotectedvirtual

Definition at line 44 of file TwoPassSimpleMono.h.

46  { return false; }

Referenced by TwoBufferProcessPass1().

Here is the caller graph for this function:

◆ ProcessPass2()

virtual bool EffectTwoPassSimpleMono::ProcessPass2 ( float *  WXUNUSEDbuffer,
size_t   WXUNUSEDlen 
)
inlineprotectedvirtual

Definition at line 48 of file TwoPassSimpleMono.h.

50  { return false; }

Referenced by TwoBufferProcessPass2().

Here is the caller graph for this function:

◆ TwoBufferProcessPass1()

virtual bool EffectTwoPassSimpleMono::TwoBufferProcessPass1 ( float *  buffer1,
size_t  len1,
float *  WXUNUSEDbuffer2,
size_t   WXUNUSEDlen2 
)
inlineprotectedvirtual

Definition at line 56 of file TwoPassSimpleMono.h.

58  { if(buffer1 != NULL) return ProcessPass1(buffer1, len1); else return true; }

References ProcessPass1().

Referenced by ProcessOne().

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

◆ TwoBufferProcessPass2()

virtual bool EffectTwoPassSimpleMono::TwoBufferProcessPass2 ( float *  buffer1,
size_t  len1,
float *  WXUNUSEDbuffer2,
size_t   WXUNUSEDlen2 
)
inlineprotectedvirtual

Definition at line 59 of file TwoPassSimpleMono.h.

61  { if(buffer1 != NULL) return ProcessPass2(buffer1, len1); else return true; }

References ProcessPass2().

Referenced by ProcessOne().

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

Member Data Documentation

◆ mCurChannel

int EffectTwoPassSimpleMono::mCurChannel
protected

Definition at line 74 of file TwoPassSimpleMono.h.

Referenced by ProcessPass().

◆ mCurRate

double EffectTwoPassSimpleMono::mCurRate
protected

Definition at line 71 of file TwoPassSimpleMono.h.

Referenced by EffectCompressor::NewTrackPass1(), and ProcessPass().

◆ mCurT0

double EffectTwoPassSimpleMono::mCurT0
protected

Definition at line 72 of file TwoPassSimpleMono.h.

Referenced by ProcessPass().

◆ mCurT1

double EffectTwoPassSimpleMono::mCurT1
protected

Definition at line 73 of file TwoPassSimpleMono.h.

Referenced by ProcessPass().

◆ mCurTrackNum

int EffectTwoPassSimpleMono::mCurTrackNum
protected

Definition at line 70 of file TwoPassSimpleMono.h.

Referenced by ProcessOne(), and ProcessPass().

◆ mPass

int EffectTwoPassSimpleMono::mPass
protected

Definition at line 75 of file TwoPassSimpleMono.h.

Referenced by Process(), ProcessOne(), and ProcessPass().

◆ mSecondPassDisabled

bool EffectTwoPassSimpleMono::mSecondPassDisabled
protected

Definition at line 76 of file TwoPassSimpleMono.h.

Referenced by DisableSecondPass(), Process(), and ProcessOne().

◆ mTrackLists

std::shared_ptr<TrackList>* EffectTwoPassSimpleMono::mTrackLists[2]
protected

Definition at line 79 of file TwoPassSimpleMono.h.

Referenced by Process(), and ProcessPass().

◆ mWorkTracks

std::shared_ptr<TrackList> EffectTwoPassSimpleMono::mWorkTracks
protected

Definition at line 78 of file TwoPassSimpleMono.h.

Referenced by Process().


The documentation for this class was generated from the following files:
EffectTwoPassSimpleMono::InitPass1
bool InitPass1() override
Definition: TwoPassSimpleMono.cpp:232
WaveTrack::Flush
void Flush()
Flush must be called after last Append.
Definition: WaveTrack.cpp:1608
EffectTwoPassSimpleMono::mSecondPassDisabled
bool mSecondPassDisabled
Definition: TwoPassSimpleMono.h:76
Effect::FindProject
const AudacityProject * FindProject() const
Definition: Effect.cpp:2271
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:68
EffectTwoPassSimpleMono::mPass
int mPass
Definition: TwoPassSimpleMono.h:75
EffectTwoPassSimpleMono::TwoBufferProcessPass1
virtual bool TwoBufferProcessPass1(float *buffer1, size_t len1, float *WXUNUSED(buffer2), size_t WXUNUSED(len2))
Definition: TwoPassSimpleMono.h:57
EffectTwoPassSimpleMono::InitPass2
bool InitPass2() override
Definition: TwoPassSimpleMono.cpp:239
EffectTwoPassSimpleMono::ProcessPass
bool ProcessPass() override
Definition: TwoPassSimpleMono.cpp:61
Effect::CopyInputTracks
void CopyInputTracks(bool allSyncLockSelected=false)
Definition: Effect.cpp:2070
EffectTwoPassSimpleMono::mWorkTracks
std::shared_ptr< TrackList > mWorkTracks
Definition: TwoPassSimpleMono.h:78
Effect::mT1
double mT1
Definition: Effect.h:466
EffectTwoPassSimpleMono::mCurT1
double mCurT1
Definition: TwoPassSimpleMono.h:73
EffectTwoPassSimpleMono::ProcessPass2
virtual bool ProcessPass2(float *WXUNUSED(buffer), size_t WXUNUSED(len))
Definition: TwoPassSimpleMono.h:49
floatSample
@ floatSample
Definition: Types.h:714
EffectTwoPassSimpleMono::mCurT0
double mCurT0
Definition: TwoPassSimpleMono.h:72
EffectTwoPassSimpleMono::NewTrackPass2
virtual bool NewTrackPass2()
Definition: TwoPassSimpleMono.cpp:226
limitSampleBufferSize
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition: Types.h:698
WaveTrack::Set
void Set(constSamplePtr buffer, sampleFormat format, sampleCount start, size_t len)
Definition: WaveTrack.cpp:1978
samplePtr
char * samplePtr
Definition: Types.h:729
Effect::mT0
double mT0
Definition: Effect.h:465
EffectTwoPassSimpleMono::NewTrackPass1
virtual bool NewTrackPass1()
Definition: TwoPassSimpleMono.cpp:221
Effect::ReplaceProcessedTracks
void ReplaceProcessedTracks(const bool bGoodResult)
Definition: Effect.cpp:2192
anonymous_namespace{NoteTrack.cpp}::swap
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
Definition: NoteTrack.cpp:733
WaveTrack::Append
bool Append(constSamplePtr buffer, sampleFormat format, size_t len, unsigned int stride=1)
Append the sample data to the WaveTrack. You must call Flush() after the last Append.
Definition: WaveTrack.cpp:1541
Effect::mOutputTracks
std::shared_ptr< TrackList > mOutputTracks
Definition: Effect.h:464
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
EffectTwoPassSimpleMono::mCurTrackNum
int mCurTrackNum
Definition: TwoPassSimpleMono.h:70
EffectTwoPassSimpleMono::mTrackLists
std::shared_ptr< TrackList > * mTrackLists[2]
Definition: TwoPassSimpleMono.h:79
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:112
TrackList::Create
static std::shared_ptr< TrackList > Create(AudacityProject *pOwner)
Definition: Track.cpp:512
Effect::TotalProgress
bool TotalProgress(double frac, const TranslatableString &={})
Definition: Effect.cpp:2016
EffectTwoPassSimpleMono::mCurChannel
int mCurChannel
Definition: TwoPassSimpleMono.h:74
Effect::GetNumWaveTracks
int GetNumWaveTracks()
Definition: Effect.h:344
EffectTwoPassSimpleMono::TwoBufferProcessPass2
virtual bool TwoBufferProcessPass2(float *buffer1, size_t len1, float *WXUNUSED(buffer2), size_t WXUNUSED(len2))
Definition: TwoPassSimpleMono.h:60
EffectTwoPassSimpleMono::ProcessOne
bool ProcessOne(WaveTrack *t, WaveTrack *outTrack, sampleCount start, sampleCount end)
Definition: TwoPassSimpleMono.cpp:114
EffectTwoPassSimpleMono::ProcessPass1
virtual bool ProcessPass1(float *WXUNUSED(buffer), size_t WXUNUSED(len))
Definition: TwoPassSimpleMono.h:45
ArrayOf< float >
EffectTwoPassSimpleMono::mCurRate
double mCurRate
Definition: TwoPassSimpleMono.h:71