MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / computePlayheadPositionPixel

Method computePlayheadPositionPixel

NeuralNote/Source/Components/Playhead.cpp:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44double Playhead::computePlayheadPositionPixel(double inPlayheadPositionSeconds,
45 double inSampleDuration,
46 double inBaseNumPixelPerSecond,
47 double inZoomLevel,
48 int inWidth)
49{
50 auto playhead_pos =
51 inPlayheadPositionSeconds / inSampleDuration
52 * std::min(inBaseNumPixelPerSecond * inZoomLevel * inSampleDuration, static_cast<double>(inWidth));
53 return jlimit(0.0, static_cast<double>(inWidth), playhead_pos);
54}
55
56void Playhead::setZoomLevel(double inZoomLevel)
57{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected