diff view/ViewManager.cpp @ 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 1a0dfcbffaf1
children ad12e428785b
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
     }
 }