Audacity  2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EffectFindClipping Class Referencefinal

Locates clipping and inserts labels when found. More...

#include <FindClipping.h>

Inheritance diagram for EffectFindClipping:
Effect EffectClientInterface EffectUIClientInterface EffectHostInterface EffectDefinitionInterface ConfigClientInterface IdentInterface ParamsInterface

Public Member Functions

 EffectFindClipping ()
 
virtual ~EffectFindClipping ()
 
IdentInterfaceSymbol GetSymbol () override
 
wxString GetDescription () override
 
wxString ManualPage () override
 
EffectType GetType () override
 
bool DefineParams (ShuttleParams &S) override
 
bool GetAutomationParameters (CommandParameters &parms) override
 
bool SetAutomationParameters (CommandParameters &parms) override
 
bool Process () override
 
void PopulateOrExchange (ShuttleGui &S) override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
- Public Member Functions inherited from Effect
 Effect ()
 
virtual ~Effect ()
 
wxString GetPath () override
 
IdentInterfaceSymbol GetVendor () override
 
wxString GetVersion () override
 
IdentInterfaceSymbol GetFamilyId () 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
 
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, bool forceModal=false) override
 
bool LoadUserPreset (const wxString &name) override
 
bool SaveUserPreset (const wxString &name) override
 
wxArrayString GetFactoryPresets () override
 
bool LoadFactoryPreset (int id) override
 
bool LoadFactoryDefaults () override
 
void SetHostUI (EffectUIHostInterface *host) override
 
bool PopulateUI (wxWindow *parent) override
 
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
 
NumericFormatId GetDurationFormat () override
 
virtual NumericFormatId GetSelectionFormat ()
 
void SetDuration (double duration) override
 
bool Apply () override
 
void Preview () override
 
wxDialog * CreateUI (wxWindow *parent, EffectUIClientInterface *client) override
 
wxString GetUserPresetsGroup (const wxString &name) override
 
wxString GetCurrentSettingsGroup () override
 
wxString GetFactoryDefaultsGroup () override
 
virtual wxString GetSavedStateGroup ()
 
bool HasSharedConfigGroup (const wxString &group) override
 
bool GetSharedConfigSubgroups (const wxString &group, wxArrayString &subgroups) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, wxString &value, const wxString &defval=wxEmptyString) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, int &value, int defval=0) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, bool &value, bool defval=false) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, float &value, float defval=0.0) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, double &value, double defval=0.0) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const wxString &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const int &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const bool &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const float &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const double &value) override
 
bool RemoveSharedConfigSubgroup (const wxString &group) override
 
bool RemoveSharedConfig (const wxString &group, const wxString &key) override
 
bool HasPrivateConfigGroup (const wxString &group) override
 
bool GetPrivateConfigSubgroups (const wxString &group, wxArrayString &subgroups) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, wxString &value, const wxString &defval=wxEmptyString) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, int &value, int defval=0) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, bool &value, bool defval=false) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, float &value, float defval=0.0) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, double &value, double defval=0.0) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const wxString &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const int &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const bool &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const float &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const double &value) override
 
bool RemovePrivateConfigSubgroup (const wxString &group) override
 
bool RemovePrivateConfig (const wxString &group, const wxString &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 wxArrayString GetUserPresets ()
 
virtual bool HasCurrentSettings ()
 
virtual bool HasFactoryDefaults ()
 
virtual wxString GetPreset (wxWindow *parent, const wxString &parms)
 
virtual wxString HelpPage ()
 
virtual bool IsBatchProcessing ()
 
virtual void SetBatchProcessing (bool start)
 
void SetPresetParameters (const wxArrayString *Names, const wxArrayString *Values)
 
bool DoEffect (wxWindow *parent, double projectRate, TrackList *list, TrackFactory *factory, SelectedRegion *selectedRegion, bool shouldPrompt=true)
 
bool Delegate (Effect &delegate, wxWindow *parent, bool shouldPrompt)
 
bool RealtimeAddProcessor (int group, unsigned chans, float rate)
 
size_t RealtimeProcess (int group, unsigned chans, float **inbuf, float **outbuf, size_t numSamples)
 
bool IsRealtimeActive ()
 
virtual bool IsHidden ()
 
int MessageBox (const wxString &message, long style=DefaultMessageBoxStyle, const wxString &titleStr=wxString{})
 
- Public Member Functions inherited from EffectClientInterface
virtual ~EffectClientInterface ()
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
- Public Member Functions inherited from IdentInterface
virtual ~IdentInterface ()
 
const wxString & GetTranslatedName ()
 
- Public Member Functions inherited from ParamsInterface
virtual ~ParamsInterface ()
 
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 ()
 

Private Member Functions

bool ProcessOne (LabelTrack *lt, int count, const WaveTrack *wt, sampleCount start, sampleCount len)
 

Private Attributes

int mStart
 Using int rather than sampleCount because values are only ever small numbers. More...
 
int mStop
 Using int rather than sampleCount because values are only ever small numbers. More...
 

Additional Inherited Members

- Public Types inherited from Effect
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Protected Member Functions inherited from Effect
virtual bool Init ()
 
virtual bool PromptUser (wxWindow *parent)
 
virtual bool CheckWhetherSkipEffect ()
 
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 bool EnableApply (bool enable=true)
 
virtual bool EnablePreview (bool enable=true)
 
virtual void EnableDebug (bool enable=true)
 
bool TotalProgress (double frac)
 
bool TrackProgress (int whichTrack, double frac, const wxString &=wxEmptyString)
 
bool TrackGroupProgress (int whichGroup, double frac, const wxString &=wxEmptyString)
 
int GetNumWaveTracks ()
 
int GetNumWaveGroups ()
 
void GetSamples (const WaveTrack *track, sampleCount *start, sampleCount *len)
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing ()
 
void IncludeNotSelectedPreviewTracks (bool includeNotSelected)
 
void CopyInputTracks ()
 
void CopyInputTracks (int trackType)
 
std::shared_ptr
< AddedAnalysisTrack
AddAnalysisTrack (const wxString &name=wxString())
 
ModifiedAnalysisTrack ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString())
 
void ReplaceProcessedTracks (const bool bGoodResult)
 
TrackAddToOutputTracks (std::unique_ptr< Track > &&t)
 
TrackListinputTracks () const
 
- Protected Attributes inherited from Effect
ProgressDialogmProgress
 
double mProjectRate
 
double mSampleRate
 
SelectedRegionmpSelectedRegion {}
 
TrackFactorymFactory
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0
 
double mT1
 
double mF0
 
double mF1
 
wxArrayString mPresetNames
 
wxArrayString mPresetValues
 
int mPass
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 
int mUIResultID
 
sampleCount mSampleCnt
 
int mOutputTracksType
 

Detailed Description

Locates clipping and inserts labels when found.

Definition at line 25 of file FindClipping.h.

Constructor & Destructor Documentation

EffectFindClipping::EffectFindClipping ( )

Definition at line 43 of file FindClipping.cpp.

References mStart, and mStop.

44 {
45  mStart = DEF_Start;
46  mStop = DEF_Stop;
47 }
int mStart
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:61
int mStop
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:62
EffectFindClipping::~EffectFindClipping ( )
virtual

Definition at line 49 of file FindClipping.cpp.

50 {
51 }

Member Function Documentation

bool EffectFindClipping::DefineParams ( ShuttleParams S)
override

Definition at line 78 of file FindClipping.cpp.

References mStart, and mStop.

78  {
79  S.SHUTTLE_PARAM( mStart, Start );
80  S.SHUTTLE_PARAM( mStop, Stop );
81  return true;
82 }
int mStart
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:61
int mStop
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:62
bool EffectFindClipping::GetAutomationParameters ( CommandParameters parms)
overridevirtual

Reimplemented from Effect.

Definition at line 84 of file FindClipping.cpp.

References mStart, and mStop.

85 {
86  parms.Write(KEY_Start, mStart);
87  parms.Write(KEY_Stop, mStop);
88 
89  return true;
90 }
int mStart
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:61
int mStop
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:62
wxString EffectFindClipping::GetDescription ( )
overridevirtual

Reimplemented from Effect.

Definition at line 60 of file FindClipping.cpp.

References _().

61 {
62  return _("Creates labels where clipping is detected");
63 }
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
IdentInterfaceSymbol EffectFindClipping::GetSymbol ( )
overridevirtual

Reimplemented from Effect.

Definition at line 55 of file FindClipping.cpp.

References FINDCLIPPING_PLUGIN_SYMBOL.

56 {
58 }
#define FINDCLIPPING_PLUGIN_SYMBOL
Definition: FindClipping.h:23
EffectType EffectFindClipping::GetType ( )
overridevirtual

Reimplemented from Effect.

Definition at line 72 of file FindClipping.cpp.

References EffectTypeAnalyze.

73 {
74  return EffectTypeAnalyze;
75 }
wxString EffectFindClipping::ManualPage ( )
overridevirtual

Reimplemented from Effect.

Definition at line 65 of file FindClipping.cpp.

66 {
67  return wxT("Find_Clipping");
68 }
void EffectFindClipping::PopulateOrExchange ( ShuttleGui S)
overridevirtual

Reimplemented from Effect.

Definition at line 245 of file FindClipping.cpp.

References _(), ShuttleGuiBase::EndMultiColumn(), mStart, mStop, ShuttleGuiBase::StartMultiColumn(), and ShuttleGuiBase::TieTextBox().

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

246 {
247  S.StartMultiColumn(2, wxALIGN_CENTER);
248  {
249  IntegerValidator<int> vldStart(&mStart);
250  vldStart.SetMin(MIN_Start);
251  S.TieTextBox(_("Start threshold (samples):"),
252  mStart,
253  10)->SetValidator(vldStart);
254 
255  IntegerValidator<int> vldStop(&mStop);
256  vldStop.SetMin(MIN_Stop);
257  S.TieTextBox(_("Stop threshold (samples):"),
258  mStop,
259  10)->SetValidator(vldStop);
260  }
261  S.EndMultiColumn();
262 }
int mStart
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:61
int mStop
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:62
void EndMultiColumn()
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxTextCtrl * TieTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
bool EffectFindClipping::Process ( )
overridevirtual

Reimplemented from Effect.

Definition at line 105 of file FindClipping.cpp.

References _(), Effect::AddAnalysisTrack(), Effect::ModifiedAnalysisTrack::Commit(), Maybe< X >::create(), TrackListCondIterator::First(), Effect::ModifiedAnalysisTrack::get(), WaveTrack::GetEndTime(), WaveTrack::GetStartTime(), Effect::inputTracks(), Track::Label, Effect::ModifyAnalysisTrack(), Effect::mT0, Effect::mT1, name, TrackListCondIterator::Next(), ProcessOne(), WaveTrack::TimeToLongSamples(), and Track::Wave.

106 {
107  std::shared_ptr<AddedAnalysisTrack> addedTrack;
108  Maybe<ModifiedAnalysisTrack> modifiedTrack;
109  const wxString name{ _("Clipping") };
110 
111  LabelTrack *lt = NULL;
113  for (Track *t = iter.First(); t; t = iter.Next()) {
114  if (t->GetName() == name) {
115  lt = (LabelTrack *)t;
116  break;
117  }
118  }
119 
120  if (!lt)
121  addedTrack = (AddAnalysisTrack(name)), lt = addedTrack->get();
122  else
123  modifiedTrack.create(ModifyAnalysisTrack(lt, name)), lt = modifiedTrack->get();
124 
125  int count = 0;
126 
127  // JC: Only process selected tracks.
129  WaveTrack *t = (WaveTrack *) waves.First();
130  while (t) {
131  double trackStart = t->GetStartTime();
132  double trackEnd = t->GetEndTime();
133  double t0 = mT0 < trackStart ? trackStart : mT0;
134  double t1 = mT1 > trackEnd ? trackEnd : mT1;
135 
136  if (t1 > t0) {
137  auto start = t->TimeToLongSamples(t0);
138  auto end = t->TimeToLongSamples(t1);
139  auto len = end - start;
140 
141  if (!ProcessOne(lt, count, t, start, len)) {
142  return false;
143  }
144  }
145 
146  count++;
147  t = (WaveTrack *) waves.Next();
148  }
149 
150  // No cancellation, so commit the addition of the track.
151  if (addedTrack)
152  addedTrack->Commit();
153  if (modifiedTrack)
154  modifiedTrack->Commit();
155  return true;
156 }
double mT1
Definition: Effect.h:461
Definition: MemoryX.h:204
double GetEndTime() const override
Get the time at which the last clip in the track ends, plus recorded stuff.
Definition: WaveTrack.cpp:1873
std::shared_ptr< AddedAnalysisTrack > AddAnalysisTrack(const wxString &name=wxString())
Definition: Effect.cpp:2104
ModifiedAnalysisTrack ModifyAnalysisTrack(const LabelTrack *pOrigTrack, const wxString &name=wxString())
Definition: Effect.cpp:2155
TrackList * inputTracks() const
Definition: Effect.h:458
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:113
double GetStartTime() const override
Get the time at which the first clip in the track starts.
Definition: WaveTrack.cpp:1853
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:102
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
bool ProcessOne(LabelTrack *lt, int count, const WaveTrack *wt, sampleCount start, sampleCount len)
const wxChar * name
Definition: Distortion.cpp:94
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Definition: WaveTrack.cpp:1843
void create(Args &&...args)
Definition: MemoryX.h:251
double mT0
Definition: Effect.h:460
LabelTrack * get() const
Definition: Effect.h:418
bool EffectFindClipping::ProcessOne ( LabelTrack lt,
int  count,
const WaveTrack wt,
sampleCount  start,
sampleCount  len 
)
private

Definition at line 158 of file FindClipping.cpp.

References _(), LabelTrack::AddLabel(), sampleCount::as_double(), floatSample, WaveTrack::Get(), limitSampleBufferSize(), WaveTrack::LongSamplesToTime(), MAX_AUDIO, Effect::MessageBox(), mStart, mStop, ArrayOf< X >::reinit(), and Effect::TrackProgress().

Referenced by Process().

163 {
164  bool bGoodResult = true;
165  size_t blockSize = (mStart * 1000);
166 
167  if (len < mStart) {
168  return true;
169  }
170 
171  Floats buffer;
172  try {
173  // mStart should be positive.
174  // if we are throwing bad_alloc and mStart is negative, find out why.
175  if (mStart < 0 || (int)blockSize < mStart)
176  // overflow
177  throw std::bad_alloc{};
178  buffer.reinit(blockSize);
179  }
180  catch( const std::bad_alloc & ) {
181  Effect::MessageBox(_("Requested value exceeds memory capacity."));
182  return false;
183  }
184 
185  float *ptr = buffer.get();
186 
187  decltype(len) s = 0, startrun = 0, stoprun = 0, samps = 0;
188  decltype(blockSize) block = 0;
189  double startTime = -1.0;
190 
191  while (s < len) {
192  if (block == 0) {
193  if (TrackProgress(count,
194  s.as_double() /
195  len.as_double() )) {
196  bGoodResult = false;
197  break;
198  }
199 
200  block = limitSampleBufferSize( blockSize, len - s );
201 
202  wt->Get((samplePtr)buffer.get(), floatSample, start + s, block);
203  ptr = buffer.get();
204  }
205 
206  float v = fabs(*ptr++);
207  if (v >= MAX_AUDIO) {
208  if (startrun == 0) {
209  startTime = wt->LongSamplesToTime(start + s);
210  samps = 0;
211  }
212  else {
213  stoprun = 0;
214  }
215  startrun++;
216  samps++;
217  }
218  else {
219  if (startrun >= mStart) {
220  stoprun++;
221  samps++;
222 
223  if (stoprun >= mStop) {
224  lt->AddLabel(SelectedRegion(startTime,
225  wt->LongSamplesToTime(start + s - mStop)),
226  wxString::Format(wxT("%lld of %lld"), startrun.as_long_long(), (samps - mStop).as_long_long()),
227  -2);
228  startrun = 0;
229  stoprun = 0;
230  samps = 0;
231  }
232  }
233  else {
234  startrun = 0;
235  }
236  }
237 
238  s++;
239  block--;
240  }
241 
242  return bGoodResult;
243 }
int MessageBox(const wxString &message, long style=DefaultMessageBoxStyle, const wxString &titleStr=wxString{})
Definition: Effect.cpp:2646
bool TrackProgress(int whichTrack, double frac, const wxString &=wxEmptyString)
Definition: Effect.cpp:1985
int mStart
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:61
void reinit(Integral count, bool initialize=false)
Definition: MemoryX.h:117
int mStop
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:62
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition: Types.h:178
Defines a selected portion of a project.
char * samplePtr
Definition: Types.h:203
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
bool Get(samplePtr buffer, sampleFormat format, sampleCount start, size_t len, fillFormat fill=fillZero, bool mayThrow=true, sampleCount *pNumCopied=nullptr) const
Definition: WaveTrack.cpp:1971
double LongSamplesToTime(sampleCount pos) const
Convert correctly between an number of samples and an (absolute) time in seconds. ...
Definition: WaveTrack.cpp:1848
int AddLabel(const SelectedRegion &region, const wxString &title=wxT(""), int restoreFocus=-1)
#define MAX_AUDIO
Definition: Audacity.h:219
bool EffectFindClipping::SetAutomationParameters ( CommandParameters parms)
overridevirtual

Reimplemented from Effect.

Definition at line 92 of file FindClipping.cpp.

References mStart, mStop, and ReadAndVerifyInt.

93 {
94  ReadAndVerifyInt(Start);
95  ReadAndVerifyInt(Stop);
96 
97  mStart = Start;
98  mStop = Stop;
99 
100  return true;
101 }
int mStart
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:61
int mStop
Using int rather than sampleCount because values are only ever small numbers.
Definition: FindClipping.h:62
#define ReadAndVerifyInt(name)
Definition: Effect.h:797
bool EffectFindClipping::TransferDataFromWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 272 of file FindClipping.cpp.

References eIsGettingFromDialog, Effect::mUIParent, and PopulateOrExchange().

273 {
274  if (!mUIParent->Validate())
275  {
276  return false;
277  }
278 
281 
282  return true;
283 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S) override
wxWindow * mUIParent
Definition: Effect.h:472
bool EffectFindClipping::TransferDataToWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 264 of file FindClipping.cpp.

References eIsSettingToDialog, Effect::mUIParent, and PopulateOrExchange().

265 {
268 
269  return true;
270 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void PopulateOrExchange(ShuttleGui &S) override
wxWindow * mUIParent
Definition: Effect.h:472

Member Data Documentation

int EffectFindClipping::mStart
private

Using int rather than sampleCount because values are only ever small numbers.

Definition at line 61 of file FindClipping.h.

Referenced by DefineParams(), EffectFindClipping(), GetAutomationParameters(), PopulateOrExchange(), ProcessOne(), and SetAutomationParameters().

int EffectFindClipping::mStop
private

Using int rather than sampleCount because values are only ever small numbers.

Definition at line 62 of file FindClipping.h.

Referenced by DefineParams(), EffectFindClipping(), GetAutomationParameters(), PopulateOrExchange(), ProcessOne(), and SetAutomationParameters().


The documentation for this class was generated from the following files: