diff audioio/AudioCallbackPlaySource.cpp @ 24:a0900900a6f6

* More structural work on feature extraction plugin C <-> C++ adapter * Allow use of LADSPA/DSSI plugins with control outputs as feature extraction plugins (DSSI with MIDI output still to come) * Reorder labels on spectrogram status box * Minor tweaks in doc etc.
author Chris Cannam
date Mon, 27 Mar 2006 15:03:02 +0000
parents ebe07d3560e6
children 4593a7ebad93
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Thu Mar 23 18:42:17 2006 +0000
+++ b/audioio/AudioCallbackPlaySource.cpp	Mon Mar 27 15:03:02 2006 +0000
@@ -301,17 +301,19 @@
 
     m_audioGenerator->reset();
 
+    bool changed = !m_playing;
     m_playing = true;
     m_condition.wakeAll();
-    emit playStatusChanged(m_playing);
+    if (changed) emit playStatusChanged(m_playing);
 }
 
 void
 AudioCallbackPlaySource::stop()
 {
+    bool changed = m_playing;
     m_playing = false;
     m_condition.wakeAll();
-    emit playStatusChanged(m_playing);
+    if (changed) emit playStatusChanged(m_playing);
 }
 
 void
@@ -1159,6 +1161,10 @@
 	s.m_timeStretcherScavenger.scavenge();
 
 	if (work && s.m_playing && s.getSourceSampleRate()) {
+	    
+#ifdef DEBUG_AUDIO_PLAY_SOURCE
+	    std::cout << "AudioCallbackPlaySourceFillThread: not waiting" << std::endl;
+#endif
 
 	    s.m_mutex.unlock();
 	    s.m_mutex.lock();