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

Function OffsetTime

src/menus/SelectMenus.cpp:193–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193double OffsetTime
194(AudacityProject &project,
195 double t, double offset, TimeUnit timeUnit, SnapMode snapMode)
196{
197 auto &viewInfo = ViewInfo::Get( project );
198
199 if (timeUnit == TIME_UNIT_SECONDS)
200 return t + offset; // snapping is currently ignored for non-pixel moves
201
202 if (snapMode == SnapMode::SNAP_OFF)
203 return viewInfo.OffsetTimeByPixels(t, (int)offset);
204
205 return GridMove(project, t, (int)offset);
206}
207
208// Moving a cursor, and collapsed selection.
209void MoveWhenAudioInactive

Callers 2

MoveWhenAudioInactiveFunction · 0.85
SeekWhenAudioInactiveFunction · 0.85

Calls 2

GetFunction · 0.85
GridMoveFunction · 0.85

Tested by

no test coverage detected