Mercurial > hg > svgui
changeset 689:d8fc9659a206
Remove polling on play status, eliminating one source of idle wakeups (requires connection to playStatusChanged from callback play source)
author | Chris Cannam |
---|---|
date | Tue, 03 Dec 2013 12:34:38 +0000 |
parents | 692a8b9804fe |
children | 8072264dc61f |
files | view/ViewManager.cpp view/ViewManager.h |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/view/ViewManager.cpp Tue Nov 26 14:11:04 2013 +0000 +++ b/view/ViewManager.cpp Tue Dec 03 12:34:38 2013 +0000 @@ -453,6 +453,9 @@ void ViewManager::playStatusChanged(bool /* playing */) { +#ifdef DEBUG_VIEW_MANAGER + cerr << "ViewManager::playStatusChanged" << endl; +#endif checkPlayStatus(); } @@ -482,8 +485,6 @@ } else { - QTimer::singleShot(100, this, SLOT(checkPlayStatus())); - if (m_lastLeft != 0.0 || m_lastRight != 0.0) { emit outputLevelsChanged(0.0, 0.0); m_lastLeft = 0.0; @@ -491,7 +492,7 @@ } #ifdef DEBUG_VIEW_MANAGER -// cerr << "ViewManager::checkPlayStatus: Not playing" << endl; + cerr << "ViewManager::checkPlayStatus: Not playing" << endl; #endif } }
--- a/view/ViewManager.h Tue Nov 26 14:11:04 2013 +0000 +++ b/view/ViewManager.h Tue Dec 03 12:34:38 2013 +0000 @@ -248,10 +248,10 @@ void viewZoomLevelChanged(unsigned long, bool); void setGlobalCentreFrame(unsigned long); void setPlaybackFrame(unsigned long); + void playStatusChanged(bool playing); protected slots: void checkPlayStatus(); - void playStatusChanged(bool playing); void seek(unsigned long); //!!! void considerZoomChange(void *, unsigned long, bool);