Mercurial > hg > sonic-visualiser
diff 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 |
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp Wed Jun 06 14:42:41 2007 +0000 +++ b/audioio/AudioCallbackPlaySource.cpp Wed Jun 06 16:24:55 2007 +0000 @@ -214,10 +214,20 @@ emit modelReplaced(); } + connect(model, SIGNAL(modelChanged(size_t, size_t)), + this, SLOT(modelChanged(size_t, size_t))); + m_condition.wakeAll(); } void +AudioCallbackPlaySource::modelChanged(size_t startFrame, size_t endFrame) +{ + std::cerr << "AudioCallbackPlaySource::modelChanged(" << startFrame << "," << endFrame << ")" << std::endl; + if (endFrame > m_lastModelEndFrame) m_lastModelEndFrame = endFrame; +} + +void AudioCallbackPlaySource::removeModel(Model *model) { m_mutex.lock(); @@ -226,6 +236,9 @@ std::cout << "AudioCallbackPlaySource::removeModel(" << model << ")" << std::endl; #endif + disconnect(model, SIGNAL(modelChanged(size_t, size_t)), + this, SLOT(modelChanged(size_t, size_t))); + m_models.erase(model); if (m_models.empty()) {