Mercurial > hg > svapp
comparison 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 |
comparison
equal
deleted
inserted
replaced
23:cb23944ce9e2 | 24:a0900900a6f6 |
---|---|
299 } | 299 } |
300 m_mutex.unlock(); | 300 m_mutex.unlock(); |
301 | 301 |
302 m_audioGenerator->reset(); | 302 m_audioGenerator->reset(); |
303 | 303 |
304 bool changed = !m_playing; | |
304 m_playing = true; | 305 m_playing = true; |
305 m_condition.wakeAll(); | 306 m_condition.wakeAll(); |
306 emit playStatusChanged(m_playing); | 307 if (changed) emit playStatusChanged(m_playing); |
307 } | 308 } |
308 | 309 |
309 void | 310 void |
310 AudioCallbackPlaySource::stop() | 311 AudioCallbackPlaySource::stop() |
311 { | 312 { |
313 bool changed = m_playing; | |
312 m_playing = false; | 314 m_playing = false; |
313 m_condition.wakeAll(); | 315 m_condition.wakeAll(); |
314 emit playStatusChanged(m_playing); | 316 if (changed) emit playStatusChanged(m_playing); |
315 } | 317 } |
316 | 318 |
317 void | 319 void |
318 AudioCallbackPlaySource::selectionChanged() | 320 AudioCallbackPlaySource::selectionChanged() |
319 { | 321 { |
1157 s.unifyRingBuffers(); | 1159 s.unifyRingBuffers(); |
1158 s.m_bufferScavenger.scavenge(); | 1160 s.m_bufferScavenger.scavenge(); |
1159 s.m_timeStretcherScavenger.scavenge(); | 1161 s.m_timeStretcherScavenger.scavenge(); |
1160 | 1162 |
1161 if (work && s.m_playing && s.getSourceSampleRate()) { | 1163 if (work && s.m_playing && s.getSourceSampleRate()) { |
1164 | |
1165 #ifdef DEBUG_AUDIO_PLAY_SOURCE | |
1166 std::cout << "AudioCallbackPlaySourceFillThread: not waiting" << std::endl; | |
1167 #endif | |
1162 | 1168 |
1163 s.m_mutex.unlock(); | 1169 s.m_mutex.unlock(); |
1164 s.m_mutex.lock(); | 1170 s.m_mutex.lock(); |
1165 | 1171 |
1166 } else { | 1172 } else { |