Audacity  3.0.3
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BrushHandle Class Reference

#include <BrushHandle.h>

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

Classes

class  StateSaver
 

Public Member Functions

 BrushHandle (std::shared_ptr< StateSaver > pStateSaver, const std::shared_ptr< TrackView > &pTrackView, const TrackList &trackList, const TrackPanelMouseState &st, const ViewInfo &viewInfo, const std::shared_ptr< SpectralData > &pSpectralData, const ProjectSettings &pSettings)
 
BrushHandleoperator= (const BrushHandle &)=default
 
virtual ~BrushHandle ()
 
bool IsClicked () const
 
void Enter (bool forward, AudacityProject *pProject) override
 
bool Escape (AudacityProject *pProject) override
 
void HandleHopBinData (int hopNum, int freqBinNum)
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
HitTestPreview Preview (const TrackPanelMouseState &state, AudacityProject *pProject) override
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
Result Cancel (AudacityProject *) override
 
- Public Member Functions inherited from UIHandle
virtual ~UIHandle ()=0
 
virtual bool HasRotation () const
 
virtual bool Rotate (bool forward)
 
virtual bool HasEscape () const
 
virtual bool HandlesRightClick ()
 Whether the handle has any special right-button handling. More...
 
virtual bool StopsOnKeystroke ()
 
virtual void OnProjectChange (AudacityProject *pProject)
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 
- Public Member Functions inherited from TrackPanelDrawable
virtual ~TrackPanelDrawable ()=0
 
virtual wxRect DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass)
 

Private Member Functions

 BrushHandle (const BrushHandle &)
 
std::weak_ptr< TrackFindTrack ()
 
void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
 

Private Attributes

std::shared_ptr< StateSavermpStateSaver
 
std::shared_ptr< SpectralDatampSpectralData
 
std::weak_ptr< TrackViewmpView
 
wxRect mRect {}
 
double mFreqSnappingRatio { 0.01 }
 
double mOvertonesThreshold { 0.999 }
 
bool mIsSmartSelection
 
bool mIsOvertones
 
long long mSampleCountUpperBound
 
long long mSampleCountLowerBound
 
wxInt64 mFreqUpperBound
 
wxInt64 mFreqLowerBound
 
int mMostRecentX { -1 }
 
int mMostRecentY { -1 }
 
int mBrushRadius
 
bool mbCtrlDown
 
std::shared_ptr< SelectionStateChangermSelectionStateChanger
 

Additional Inherited Members

- Public Types inherited from UIHandle
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 
- Static Public Member Functions inherited from TrackPanelDrawable
static wxRect MaximizeWidth (const wxRect &rect, const wxRect &panelRect)
 
static wxRect MaximizeHeight (const wxRect &rect, const wxRect &panelRect)
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description

Definition at line 30 of file BrushHandle.h.

Constructor & Destructor Documentation

◆ BrushHandle() [1/2]

BrushHandle::BrushHandle ( const BrushHandle )
private

◆ BrushHandle() [2/2]

BrushHandle::BrushHandle ( std::shared_ptr< StateSaver pStateSaver,
const std::shared_ptr< TrackView > &  pTrackView,
const TrackList trackList,
const TrackPanelMouseState st,
const ViewInfo viewInfo,
const std::shared_ptr< SpectralData > &  pSpectralData,
const ProjectSettings pSettings 
)
explicit

Definition at line 142 of file BrushHandle.cpp.

149  : mpStateSaver{ move(pStateSaver) }
150  , mpView{ pTrackView }
151  , mpSpectralData(pSpectralData)
152 {
153  const wxMouseState &state = st.state;
154  auto pTrack = pTrackView->FindTrack().get();
155  auto wt = dynamic_cast<WaveTrack *>(pTrack);
156  double rate = mpSpectralData->GetSR();
157 
158  mRect = st.rect;
159  mBrushRadius = pSettings.GetBrushRadius();
160  mFreqUpperBound = wt->GetSpectrogramSettings().maxFreq - 1;
161  mFreqLowerBound = wt->GetSpectrogramSettings().minFreq + 1;
162  mIsSmartSelection = pSettings.IsSmartSelection();
163  mIsOvertones = pSettings.IsOvertones();
164  // Borrowed from TimeToLongSample
165  mSampleCountLowerBound = floor( pTrack->GetStartTime() * rate + 0.5);
166  mSampleCountUpperBound = floor( pTrack->GetEndTime() * rate + 0.5);
167 }

◆ ~BrushHandle()

BrushHandle::~BrushHandle ( )
virtual

Definition at line 169 of file BrushHandle.cpp.

170 {
171 }

Member Function Documentation

◆ Cancel()

UIHandle::Result BrushHandle::Cancel ( AudacityProject pProject)
overridevirtual

Implements UIHandle.

Definition at line 400 of file BrushHandle.cpp.

401 {
402  mpStateSaver.reset();
404 }

References mpStateSaver, and RefreshCode::RefreshAll.

◆ Click()

UIHandle::Result BrushHandle::Click ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 219 of file BrushHandle.cpp.

221 {
222  if (mpStateSaver)
223  // Clear all unless there is a modifier key down
224  mpStateSaver->Init( *pProject, !evt.event.HasAnyModifiers() );
225 
226  using namespace RefreshCode;
227 
228  const auto pView = mpView.lock();
229  if ( !pView )
230  return Cancelled;
231 
232  wxMouseEvent &event = evt.event;
233  const auto sTrack = TrackList::Get( *pProject ).Lock( FindTrack() );
234  const auto pTrack = sTrack.get();
235  const WaveTrack *const wt =
236  static_cast<const WaveTrack*>(pTrack);
237  auto &trackPanel = TrackPanel::Get( *pProject );
238  auto &viewInfo = ViewInfo::Get( *pProject );
239 
240  return RefreshAll;
241 }

References RefreshCode::Cancelled, TrackPanelMouseEvent::event, FindTrack(), ViewInfo::Get(), TrackList::Get(), TrackPanel::Get(), TrackList::Lock(), mpStateSaver, mpView, and RefreshCode::RefreshAll.

Here is the call graph for this function:

◆ Drag()

UIHandle::Result BrushHandle::Drag ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 243 of file BrushHandle.cpp.

245 {
246  using namespace RefreshCode;
247 
248  const auto pView = mpView.lock();
249  if ( !pView )
250  return Cancelled;
251 
252  wxMouseEvent &event = evt.event;
253  const auto sTrack = TrackList::Get( *pProject ).Lock( FindTrack() );
254  const auto pTrack = sTrack.get();
255  WaveTrack *const wt =
256  static_cast<WaveTrack*>(pTrack);
257  auto &trackPanel = TrackPanel::Get( *pProject );
258  auto &viewInfo = ViewInfo::Get( *pProject );
259 
260  auto posXToHopNum = [&](int x0){
261  double posTime = viewInfo.PositionToTime(x0, mRect.x);
262  sampleCount sc = wt->TimeToLongSamples(posTime);
263  auto hopSize = mpSpectralData->GetHopSize();
264  return (sc.as_long_long() + hopSize / 2) / hopSize;
265  };
266 
267  auto posYToFreqBin = [&](int y0){
268  int resFreq = PositionToFrequency(wt, 0, y0, mRect.y, mRect.height);
269  double resFreqBin = resFreq / (mpSpectralData->GetSR() / mpSpectralData->GetWindowSize());
270  return static_cast<int>(std::round(resFreqBin));
271  };
272 
273  auto drawCircle = [&](int h0, int bm){
274  // For each (h0, b0), draw circle
275  int h2 = mBrushRadius;
276  int b2 = 0;
277  int hChange = 1 - (mBrushRadius << 1);
278  int bChange = 0;
279  int radiusError = 0;
280  while (h2 >= b2) {
281  for (int i = h0 - h2; i <= h0 + h2; i++)
282  {
283  HandleHopBinData(i, bm + b2);
284  HandleHopBinData(i, bm - b2);
285  }
286  for (int i = h0 - b2; i <= h0 + b2; i++)
287  {
288  HandleHopBinData(i, bm + h2);
289  HandleHopBinData(i, bm - h2);
290  }
291 
292  b2++;
293  radiusError += bChange;
294  bChange += 2;
295  if (((radiusError << 1) + hChange) > 0)
296  {
297  h2--;
298  radiusError += hChange;
299  hChange += 2;
300  }
301  } // End of full circle drawing
302  };
303 
304  // Clip the coordinates
305  // TODO: Find ways to access the ClipParameters (for the mid)
306  int dest_xcoord = std::clamp(event.m_x, mRect.x + 10, mRect.x + mRect.width);
307  int dest_ycoord = std::clamp(event.m_y, mRect.y + 10, mRect.y + mRect.height);
308 
309  int h1 = posXToHopNum(dest_xcoord);
310  int b1 = posYToFreqBin(dest_ycoord);
311 
312  mbCtrlDown = event.ControlDown() || event.AltDown();
313 
314  // Use the hop and bin number to calculate the brush stroke, instead of the mouse coordinates
315  // For mouse coordinate:
316  // (src_xcoord, src_ycoord) -> (dest_xcoord, dest_ycoord)
317 
318  const auto &hopSize = mpSpectralData->GetHopSize();
319  if(!mpSpectralData->coordHistory.empty()){
320  int src_xcoord = mpSpectralData->coordHistory.back().first;
321  int src_ycoord = mpSpectralData->coordHistory.back().second;
322 
323  int h0 = posXToHopNum(src_xcoord);
324  int b0 = posYToFreqBin(src_ycoord);
325  int wd = mBrushRadius * 2;
326 
327  int dh = abs(h1-h0), sh = h0<h1 ? 1 : -1;
328  int db = -abs(b1-b0), sb = b0<b1 ? 1 : -1;
329  int err = dh+db, err2;
330 
331  // Line drawing (draw points until the start coordinate reaches the end)
332  while(true){
333  if (h0 == h1 && b0 == b1)
334  break;
335  err2 = err * 2;
336  if (err2 * 2 >= db) { err += db; h0 += sh; }
337  if (err2 * 2 <= dh) { err += dh; b0 += sb; }
338 
339 
340  int bm = b0;
341  if(mIsSmartSelection){
342  // Correct the y coord (snap to highest energy freq. bin)
343  if(auto *sView = dynamic_cast<SpectrumView*>(pView.get())){
345  h0 * hopSize, hopSize, mFreqSnappingRatio, bm);
346  if(resFreqBin != - 1)
347  bm = resFreqBin;
348  }
349  }
350 
351  if(mIsOvertones){
352  // take bm and calculate the highest energy
353  std::vector<int> binsToWork = SpectralDataManager::FindHighestFrequencyBins(wt,
354  h0 * hopSize, hopSize, mOvertonesThreshold, bm);
355  for(auto & bins: binsToWork)
356  drawCircle(h0, bins);
357  }
358 
359  drawCircle(h0, bm);
360  } // End of line connecting
361  }
362  mpSpectralData->coordHistory.push_back(std::make_pair(dest_xcoord, dest_ycoord));
363  return RefreshAll;
364 }

References sampleCount::as_long_long(), RefreshCode::Cancelled, TrackPanelMouseEvent::event, SpectralDataManager::FindFrequencySnappingBin(), SpectralDataManager::FindHighestFrequencyBins(), FindTrack(), ViewInfo::Get(), TrackList::Get(), TrackPanel::Get(), HandleHopBinData(), TrackList::Lock(), mbCtrlDown, mBrushRadius, mFreqSnappingRatio, mIsOvertones, mIsSmartSelection, mOvertonesThreshold, mpSpectralData, mpView, mRect, anonymous_namespace{BrushHandle.cpp}::PositionToFrequency(), RefreshCode::RefreshAll, and WaveTrack::TimeToLongSamples().

Here is the call graph for this function:

◆ Draw()

void BrushHandle::Draw ( TrackPanelDrawingContext context,
const wxRect &  rect,
unsigned  iPass 
)
overrideprivatevirtual

Reimplemented from TrackPanelDrawable.

Definition at line 406 of file BrushHandle.cpp.

409 {
410  if ( iPass == TrackArtist::PassTracks ) {
411  auto& dc = context.dc;
412  wxPoint coord;
413  coord.x = mMostRecentX;
414  coord.y = mMostRecentY;
415  dc.SetBrush( *wxTRANSPARENT_BRUSH );
416  dc.SetPen( *wxYELLOW_PEN );
417  dc.DrawCircle(coord, mBrushRadius);
418  }
419 }

References TrackPanelDrawingContext::dc, mBrushRadius, mMostRecentX, mMostRecentY, and TrackArtist::PassTracks.

◆ Enter()

void BrushHandle::Enter ( bool  forward,
AudacityProject pProject 
)
overridevirtual

Reimplemented from UIHandle.

Definition at line 192 of file BrushHandle.cpp.

193 {
194 
195 }

◆ Escape()

bool BrushHandle::Escape ( AudacityProject pProject)
overridevirtual

Reimplemented from UIHandle.

Definition at line 197 of file BrushHandle.cpp.

198 {
199  return false;
200 }

◆ FindTrack()

std::weak_ptr< Track > BrushHandle::FindTrack ( )
private

Definition at line 421 of file BrushHandle.cpp.

422 {
423  auto pView = mpView.lock();
424  if (!pView)
425  return {};
426  else
427  return pView->FindTrack();
428 }

References mpView.

Referenced by Click(), and Drag().

Here is the caller graph for this function:

◆ HandleHopBinData()

void BrushHandle::HandleHopBinData ( int  hopNum,
int  freqBinNum 
)

Definition at line 203 of file BrushHandle.cpp.

203  {
204  // Ignore the mouse dragging outside valid area
205  // We should also check for the available freq. range that is visible to user
206  long long sampleCount = hopNum * mpSpectralData->GetHopSize();
207  wxInt64 freq = freqBinNum * mpSpectralData->GetSR() / mpSpectralData->GetWindowSize();
208 
210  freq < mFreqLowerBound || freq > mFreqUpperBound)
211  return;
212 
213  if(mbCtrlDown)
214  mpSpectralData->removeHopBinData(hopNum, freqBinNum);
215  else
216  mpSpectralData->addHopBinData(hopNum, freqBinNum);
217 }

References mbCtrlDown, mFreqUpperBound, mpSpectralData, and mSampleCountUpperBound.

Referenced by Drag().

Here is the caller graph for this function:

◆ IsClicked()

bool BrushHandle::IsClicked ( ) const

Definition at line 57 of file BrushHandle.cpp.

58 {
59  return mSelectionStateChanger.get() != NULL;
60 }

References mSelectionStateChanger.

◆ operator=()

BrushHandle& BrushHandle::operator= ( const BrushHandle )
default

◆ Preview()

HitTestPreview BrushHandle::Preview ( const TrackPanelMouseState state,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 366 of file BrushHandle.cpp.

368 {
369  TranslatableString tip;
370  wxCursor *pCursor = CrosshairCursor();
371  return { tip, pCursor };
372 }

References anonymous_namespace{BrushHandle.cpp}::CrosshairCursor().

Here is the call graph for this function:

◆ Release()

UIHandle::Result BrushHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
overridevirtual

Implements UIHandle.

Definition at line 374 of file BrushHandle.cpp.

377 {
378  using namespace RefreshCode;
379  mpSpectralData->saveAndClearBuffer();
380  if (mpStateSaver) {
381  mpStateSaver->Commit();
382  mpStateSaver.reset();
383  }
384  if(mbCtrlDown){
385  ProjectHistory::Get( *pProject ).PushState(
386  XO( "Erased selected area" ),
387  XO( "Erased selected area" ) );
388  ProjectHistory::Get( *pProject ).ModifyState(true);
389  }
390  else{
391  ProjectHistory::Get( *pProject ).PushState(
392  XO( "Selected area using Brush Tool" ),
393  XO( "Brush tool selection" ) );
394  ProjectHistory::Get( *pProject ).ModifyState(true);
395  }
396 
397  return RefreshNone;
398 }

References ProjectHistory::Get(), mbCtrlDown, ProjectHistory::ModifyState(), mpSpectralData, mpStateSaver, ProjectHistory::PushState(), RefreshCode::RefreshNone, and XO.

Here is the call graph for this function:

Member Data Documentation

◆ mbCtrlDown

bool BrushHandle::mbCtrlDown
private

Definition at line 113 of file BrushHandle.h.

Referenced by Drag(), HandleHopBinData(), and Release().

◆ mBrushRadius

int BrushHandle::mBrushRadius
private

Definition at line 112 of file BrushHandle.h.

Referenced by Drag(), and Draw().

◆ mFreqLowerBound

wxInt64 BrushHandle::mFreqLowerBound
private

Definition at line 110 of file BrushHandle.h.

◆ mFreqSnappingRatio

double BrushHandle::mFreqSnappingRatio { 0.01 }
private

Definition at line 103 of file BrushHandle.h.

Referenced by Drag().

◆ mFreqUpperBound

wxInt64 BrushHandle::mFreqUpperBound
private

Definition at line 110 of file BrushHandle.h.

Referenced by HandleHopBinData().

◆ mIsOvertones

bool BrushHandle::mIsOvertones
private

Definition at line 108 of file BrushHandle.h.

Referenced by Drag().

◆ mIsSmartSelection

bool BrushHandle::mIsSmartSelection
private

Definition at line 108 of file BrushHandle.h.

Referenced by Drag().

◆ mMostRecentX

int BrushHandle::mMostRecentX { -1 }
private

Definition at line 111 of file BrushHandle.h.

Referenced by Draw().

◆ mMostRecentY

int BrushHandle::mMostRecentY { -1 }
private

Definition at line 111 of file BrushHandle.h.

Referenced by Draw().

◆ mOvertonesThreshold

double BrushHandle::mOvertonesThreshold { 0.999 }
private

Definition at line 106 of file BrushHandle.h.

Referenced by Drag().

◆ mpSpectralData

std::shared_ptr<SpectralData> BrushHandle::mpSpectralData
private

Definition at line 89 of file BrushHandle.h.

Referenced by Drag(), HandleHopBinData(), and Release().

◆ mpStateSaver

std::shared_ptr<StateSaver> BrushHandle::mpStateSaver
private

Definition at line 88 of file BrushHandle.h.

Referenced by Cancel(), Click(), and Release().

◆ mpView

std::weak_ptr<TrackView> BrushHandle::mpView
private

Definition at line 98 of file BrushHandle.h.

Referenced by Click(), Drag(), and FindTrack().

◆ mRect

wxRect BrushHandle::mRect {}
private

Definition at line 99 of file BrushHandle.h.

Referenced by Drag().

◆ mSampleCountLowerBound

long long BrushHandle::mSampleCountLowerBound
private

Definition at line 109 of file BrushHandle.h.

◆ mSampleCountUpperBound

long long BrushHandle::mSampleCountUpperBound
private

Definition at line 109 of file BrushHandle.h.

Referenced by HandleHopBinData().

◆ mSelectionStateChanger

std::shared_ptr<SelectionStateChanger> BrushHandle::mSelectionStateChanger
private

Definition at line 115 of file BrushHandle.h.

Referenced by IsClicked().


The documentation for this class was generated from the following files:
BrushHandle::mBrushRadius
int mBrushRadius
Definition: BrushHandle.h:112
ProjectHistory::ModifyState
void ModifyState(bool bWantsAutoSave)
Definition: ProjectHistory.cpp:124
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
ViewInfo::Get
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:241
BrushHandle::mbCtrlDown
bool mbCtrlDown
Definition: BrushHandle.h:113
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
RefreshCode::RefreshAll
@ RefreshAll
Definition: RefreshCode.h:26
RefreshCode::RefreshNone
@ RefreshNone
Definition: RefreshCode.h:21
TrackList::Lock
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
Definition: Track.h:1542
CommonTrackPanelCell::FindTrack
std::shared_ptr< Track > FindTrack()
Definition: CommonTrackPanelCell.h:46
RefreshCode::Cancelled
@ Cancelled
Definition: RefreshCode.h:23
TrackPanel::Get
static TrackPanel & Get(AudacityProject &project)
Definition: TrackPanel.cpp:227
XO
#define XO(s)
Definition: Internat.h:31
ProjectSettings::IsOvertones
bool IsOvertones() const
Definition: ProjectSettings.h:104
BrushHandle::mOvertonesThreshold
double mOvertonesThreshold
Definition: BrushHandle.h:106
BrushHandle::mpStateSaver
std::shared_ptr< StateSaver > mpStateSaver
Definition: BrushHandle.h:88
TrackPanelDrawingContext::dc
wxDC & dc
Definition: TrackPanelDrawingContext.h:23
BrushHandle::mFreqLowerBound
wxInt64 mFreqLowerBound
Definition: BrushHandle.h:110
TrackPanelMouseState::rect
const wxRect & rect
Definition: TrackPanelMouseEvent.h:39
BrushHandle::mpSpectralData
std::shared_ptr< SpectralData > mpSpectralData
Definition: BrushHandle.h:89
SpectrumView
Definition: SpectrumView.h:114
BrushHandle::mMostRecentX
int mMostRecentX
Definition: BrushHandle.h:111
BrushHandle::mIsSmartSelection
bool mIsSmartSelection
Definition: BrushHandle.h:108
BrushHandle::mFreqSnappingRatio
double mFreqSnappingRatio
Definition: BrushHandle.h:103
sampleCount::as_long_long
long long as_long_long() const
Definition: SampleCount.h:47
BrushHandle::mRect
wxRect mRect
Definition: BrushHandle.h:99
BrushHandle::FindTrack
std::weak_ptr< Track > FindTrack()
Definition: BrushHandle.cpp:421
anonymous_namespace{BrushHandle.cpp}::CrosshairCursor
wxCursor * CrosshairCursor()
Definition: BrushHandle.cpp:134
BrushHandle::mIsOvertones
bool mIsOvertones
Definition: BrushHandle.h:108
BrushHandle::HandleHopBinData
void HandleHopBinData(int hopNum, int freqBinNum)
Definition: BrushHandle.cpp:203
BrushHandle::mSampleCountLowerBound
long long mSampleCountLowerBound
Definition: BrushHandle.h:109
BrushHandle::mpView
std::weak_ptr< TrackView > mpView
Definition: BrushHandle.h:98
anonymous_namespace{BrushHandle.cpp}::PositionToFrequency
double PositionToFrequency(const WaveTrack *wt, bool maySnap, wxInt64 mouseYCoordinate, wxInt64 trackTopEdge, int trackHeight)
Definition: BrushHandle.cpp:80
ProjectHistory::PushState
void PushState(const TranslatableString &desc, const TranslatableString &shortDesc)
Definition: ProjectHistory.cpp:90
WaveTrack::TimeToLongSamples
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Definition: WaveTrack.cpp:1857
BrushHandle::mMostRecentY
int mMostRecentY
Definition: BrushHandle.h:111
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:506
BrushHandle::mSelectionStateChanger
std::shared_ptr< SelectionStateChanger > mSelectionStateChanger
Definition: BrushHandle.h:115
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18
BrushHandle::mFreqUpperBound
wxInt64 mFreqUpperBound
Definition: BrushHandle.h:110
TrackArtist::PassTracks
@ PassTracks
Definition: TrackArtist.h:81
SpectralDataManager::FindFrequencySnappingBin
static int FindFrequencySnappingBin(WaveTrack *wt, long long startSC, int hopSize, double threshold, int targetFreqBin)
Definition: SpectralDataManager.cpp:71
SpectralDataManager::FindHighestFrequencyBins
static std::vector< int > FindHighestFrequencyBins(WaveTrack *wt, long long int startSC, int hopSize, double threshold, int targetFreqBin)
Definition: SpectralDataManager.cpp:84
RefreshCode
Namespace containing an enum 'what to do on a refresh?'.
Definition: RefreshCode.h:16
ProjectSettings::GetBrushRadius
int GetBrushRadius() const
Definition: ProjectSettings.h:98
BrushHandle::mSampleCountUpperBound
long long mSampleCountUpperBound
Definition: BrushHandle.h:109
TrackPanelMouseState::state
wxMouseState & state
Definition: TrackPanelMouseEvent.h:38
ProjectHistory::Get
static ProjectHistory & Get(AudacityProject &project)
Definition: ProjectHistory.cpp:26
ProjectSettings::IsSmartSelection
bool IsSmartSelection() const
Definition: ProjectSettings.h:101