Mercurial > hg > sonic-visualiser
comparison audioio/AudioCallbackPlaySource.cpp @ 148:0c22273a1d8c
* Enable threaded decoding for Ogg and MP3 files.
Needs some work on reducing updates to the overview widget
author | Chris Cannam |
---|---|
date | Wed, 06 Jun 2007 16:24:55 +0000 |
parents | ee977f93f66c |
children | 37cb005f7c40 |
comparison
equal
deleted
inserted
replaced
147:140ea2569bcc | 148:0c22273a1d8c |
---|---|
212 | 212 |
213 if (buffersChanged || srChanged) { | 213 if (buffersChanged || srChanged) { |
214 emit modelReplaced(); | 214 emit modelReplaced(); |
215 } | 215 } |
216 | 216 |
217 connect(model, SIGNAL(modelChanged(size_t, size_t)), | |
218 this, SLOT(modelChanged(size_t, size_t))); | |
219 | |
217 m_condition.wakeAll(); | 220 m_condition.wakeAll(); |
218 } | 221 } |
219 | 222 |
220 void | 223 void |
224 AudioCallbackPlaySource::modelChanged(size_t startFrame, size_t endFrame) | |
225 { | |
226 std::cerr << "AudioCallbackPlaySource::modelChanged(" << startFrame << "," << endFrame << ")" << std::endl; | |
227 if (endFrame > m_lastModelEndFrame) m_lastModelEndFrame = endFrame; | |
228 } | |
229 | |
230 void | |
221 AudioCallbackPlaySource::removeModel(Model *model) | 231 AudioCallbackPlaySource::removeModel(Model *model) |
222 { | 232 { |
223 m_mutex.lock(); | 233 m_mutex.lock(); |
224 | 234 |
225 #ifdef DEBUG_AUDIO_PLAY_SOURCE | 235 #ifdef DEBUG_AUDIO_PLAY_SOURCE |
226 std::cout << "AudioCallbackPlaySource::removeModel(" << model << ")" << std::endl; | 236 std::cout << "AudioCallbackPlaySource::removeModel(" << model << ")" << std::endl; |
227 #endif | 237 #endif |
238 | |
239 disconnect(model, SIGNAL(modelChanged(size_t, size_t)), | |
240 this, SLOT(modelChanged(size_t, size_t))); | |
228 | 241 |
229 m_models.erase(model); | 242 m_models.erase(model); |
230 | 243 |
231 if (m_models.empty()) { | 244 if (m_models.empty()) { |
232 if (m_converter) { | 245 if (m_converter) { |