MCPcopy Create free account
hub / github.com/audacity/audacity / StartFreqSelection

Method StartFreqSelection

src/tracks/ui/SelectHandle.cpp:1237–1255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235}
1236
1237void SelectHandle::StartFreqSelection(ViewInfo &viewInfo,
1238 int mouseYCoordinate, int trackTopEdge,
1239 int trackHeight, ChannelView &channelView)
1240{
1241 mFreqSelTrack.reset();
1242 mFreqSelMode = FREQ_SEL_INVALID;
1243 mFreqSelPin = SelectedRegion::UndefinedFrequency;
1244
1245 if (isSpectralSelectionView(channelView)) {
1246 // Spectral selection track is always wave
1247 auto shTrack = channelView.FindChannel<WaveChannel>();
1248 mFreqSelTrack = shTrack;
1249 mFreqSelMode = FREQ_SEL_FREE;
1250 mFreqSelPin =
1251 PositionToFrequency(*shTrack, false, mouseYCoordinate,
1252 trackTopEdge, trackHeight);
1253 viewInfo.selectedRegion.setFrequencies(mFreqSelPin, mFreqSelPin);
1254 }
1255}
1256
1257void SelectHandle::AdjustFreqSelection(
1258 const WaveChannel &wc, ViewInfo &viewInfo,

Callers

nothing calls this directly

Calls 4

setFrequenciesMethod · 0.80
isSpectralSelectionViewFunction · 0.70
PositionToFrequencyFunction · 0.70
resetMethod · 0.45

Tested by

no test coverage detected