Mercurial > hg > svcore
comparison plugin/DSSIPluginInstance.cpp @ 242:2f7d27648806
* Fix real-time plugin corruption when getLatency is called for some plugins
* Other minor changes
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2007 15:35:27 +0000 |
parents | 71f869dac40b |
children | dc46851837d6 |
comparison
equal
deleted
inserted
replaced
241:2b40f83e7627 | 242:2f7d27648806 |
---|---|
266 #ifdef DEBUG_DSSI_PROCESS | 266 #ifdef DEBUG_DSSI_PROCESS |
267 std::cerr << "DSSIPluginInstance::getLatency(): m_latencyPort " << m_latencyPort << ", m_run " << m_run << std::endl; | 267 std::cerr << "DSSIPluginInstance::getLatency(): m_latencyPort " << m_latencyPort << ", m_run " << m_run << std::endl; |
268 #endif | 268 #endif |
269 | 269 |
270 if (m_latencyPort) { | 270 if (m_latencyPort) { |
271 if (!m_run) run(Vamp::RealTime::zeroTime); | 271 if (!m_run) { |
272 for (int i = 0; i < getAudioInputCount(); ++i) { | |
273 for (int j = 0; j < m_blockSize; ++j) { | |
274 m_inputBuffers[i][j] = 0.f; | |
275 } | |
276 } | |
277 run(Vamp::RealTime::zeroTime); | |
278 } | |
272 latency = (size_t)(*m_latencyPort + 0.1); | 279 latency = (size_t)(*m_latencyPort + 0.1); |
273 } | 280 } |
274 | 281 |
275 #ifdef DEBUG_DSSI_PROCESS | 282 #ifdef DEBUG_DSSI_PROCESS |
276 std::cerr << "DSSIPluginInstance::getLatency(): latency is " << latency << std::endl; | 283 std::cerr << "DSSIPluginInstance::getLatency(): latency is " << latency << std::endl; |