# HG changeset patch # User Chris Cannam # Date 1181147095 0 # Node ID 0c22273a1d8c9adc36e73a100b14ba74b7599945 # Parent 140ea2569bcc45a26138a35cfa13978d4e0b65ac * Enable threaded decoding for Ogg and MP3 files. Needs some work on reducing updates to the overview widget diff -r 140ea2569bcc -r 0c22273a1d8c audioio/AudioCallbackPlaySource.cpp --- 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()) { diff -r 140ea2569bcc -r 0c22273a1d8c audioio/AudioCallbackPlaySource.h --- a/audioio/AudioCallbackPlaySource.h Wed Jun 06 14:42:41 2007 +0000 +++ b/audioio/AudioCallbackPlaySource.h Wed Jun 06 16:24:55 2007 +0000 @@ -233,6 +233,7 @@ void playSelectionModeChanged(); void playParametersChanged(PlayParameters *); void preferenceChanged(PropertyContainer::PropertyName); + void modelChanged(size_t startFrame, size_t endFrame); protected: ViewManager *m_viewManager; diff -r 140ea2569bcc -r 0c22273a1d8c transform/FeatureExtractionPluginTransform.cpp --- a/transform/FeatureExtractionPluginTransform.cpp Wed Jun 06 14:42:41 2007 +0000 +++ b/transform/FeatureExtractionPluginTransform.cpp Wed Jun 06 16:24:55 2007 +0000 @@ -242,7 +242,13 @@ if (!input) return; while (!input->isReady()) { - if (dynamic_cast(input)) break; // no need to wait +/* + if (dynamic_cast(input)) { + std::cerr << "FeatureExtractionPluginTransform::run: Model is not ready, but it's not a WaveFileModel (it's a " << typeid(input).name() << "), so that's OK" << std::endl; + sleep(2); + break; // no need to wait + } +*/ std::cerr << "FeatureExtractionPluginTransform::run: Waiting for input model to be ready..." << std::endl; sleep(1); }