mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
ViewInfo does not depend on AudioIOBase...
... ViewInfo should only be concerned with screen geometry. (And so it won't depend on AudioIO (even higher level) after stream time moves there.) PlaybackScroller receives the timer event directly (not from ViewInfo) and caches playback position instead. Then, as before, it propagates the event to PlayIndicatorOverlay.
This commit is contained in:
@@ -174,13 +174,13 @@ void PlayIndicatorOverlay::OnTimer(wxCommandEvent &event)
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Calculate the horizontal position of the indicator
|
||||
const double playPos = viewInfo.mRecentStreamTime;
|
||||
|
||||
auto &window = ProjectWindow::Get( *mProject );
|
||||
auto &scroller = window.GetPlaybackScroller();
|
||||
// Calculate the horizontal position of the indicator
|
||||
const double playPos = scroller.GetRecentStreamTime();
|
||||
|
||||
using Mode = ProjectWindow::PlaybackScroller::Mode;
|
||||
const Mode mode =
|
||||
window.GetPlaybackScroller().GetMode();
|
||||
const Mode mode = scroller.GetMode();
|
||||
const bool pinned = ( mode == Mode::Pinned || mode == Mode::Right );
|
||||
|
||||
// Use a small tolerance to avoid flicker of play head pinned all the way
|
||||
|
||||
Reference in New Issue
Block a user