# HG changeset patch # User Chris Cannam # Date 1386074078 0 # Node ID d8fc9659a206deb8e391d1060b1726b722e2c5ee # Parent 692a8b9804fe6b59cedf50d904a4bc983973d607 Remove polling on play status, eliminating one source of idle wakeups (requires connection to playStatusChanged from callback play source) diff -r 692a8b9804fe -r d8fc9659a206 view/ViewManager.cpp --- 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 } } diff -r 692a8b9804fe -r d8fc9659a206 view/ViewManager.h --- 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);