comparison transform/RealTimeEffectModelTransformer.cpp @ 418:d35d4e79c95b

* Wait for input to be ready before running real-time effect -- even if it's a wave file model, because they are now progressively decoded
author Chris Cannam
date Wed, 11 Jun 2008 12:53:20 +0000
parents c8955c486340
children 6036b38177e2
comparison
equal deleted inserted replaced
417:12b7bf0c3915 418:d35d4e79c95b
120 { 120 {
121 DenseTimeValueModel *input = getConformingInput(); 121 DenseTimeValueModel *input = getConformingInput();
122 if (!input) return; 122 if (!input) return;
123 123
124 while (!input->isReady()) { 124 while (!input->isReady()) {
125 if (dynamic_cast<WaveFileModel *>(input)) break; // no need to wait
126 std::cerr << "RealTimeEffectModelTransformer::run: Waiting for input model to be ready..." << std::endl; 125 std::cerr << "RealTimeEffectModelTransformer::run: Waiting for input model to be ready..." << std::endl;
127 sleep(1); 126 sleep(1);
128 } 127 }
129 128
130 SparseTimeValueModel *stvm = dynamic_cast<SparseTimeValueModel *>(m_output); 129 SparseTimeValueModel *stvm = dynamic_cast<SparseTimeValueModel *>(m_output);