Skip to content

Commit 6dfa568

Browse files
committed
Use playhead position instead of current buffered sample
1 parent 622c41f commit 6dfa568

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Processors/FileReader/ScrubberInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void FullTimeline::paint (Graphics& g)
100100

101101
/* Draw the current playback position */
102102
g.setColour (findColour (ThemeColours::defaultText));
103-
float timelinePos = (float) (fileReader->getCurrentSample() - startSample) / totalSamples * getWidth();
103+
float timelinePos = (float) (fileReader->getPlayheadPosition() - startSample) / totalSamples * getWidth();
104104
g.setOpacity (1.0f);
105105
g.fillRoundedRectangle (timelinePos, 0, 1, this->getHeight(), 0.2);
106106

@@ -220,7 +220,7 @@ void ZoomTimeline::paint (Graphics& g)
220220

221221
/* Draw the current playback position */
222222
g.setColour (findColour (ThemeColours::defaultText));
223-
float timelinePos = (float) (fileReader->getCurrentSample() - startSampleNumber) / (stopSampleNumber - startSampleNumber) * getWidth();
223+
float timelinePos = (float) (fileReader->getPlayheadPosition() - startSampleNumber) / (stopSampleNumber - startSampleNumber) * getWidth();
224224
if (0 < timelinePos < sliderPosition + sliderWidth)
225225
{
226226
g.setOpacity (1.0f);

0 commit comments

Comments
 (0)