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

Function SeekWhenAudioActive

src/menus/SelectMenus.cpp:154–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152};
153
154void SeekWhenAudioActive(double seekStep, wxLongLong &lastSelectionAdjustment)
155{
156 auto gAudioIO = AudioIO::Get();
157#ifdef EXPERIMENTAL_IMPROVED_SEEKING
158 if (gAudioIO->GetLastPlaybackTime() < lastSelectionAdjustment) {
159 // Allow time for the last seek to output a buffer before
160 // discarding samples again
161 // Do not advance mLastSelectionAdjustment
162 return;
163 }
164#endif
165 lastSelectionAdjustment = ::wxGetUTCTimeMillis();
166
167 gAudioIO->SeekStream(seekStep);
168}
169
170// Handles moving a selection edge with the keyboard in snap-to-time mode;
171// returns the moved value.

Callers 2

SeekLeftOrRightFunction · 0.85
DoCursorMoveFunction · 0.85

Calls 1

GetFunction · 0.85

Tested by

no test coverage detected