comparison vamp-sdk/hostext/PluginBufferingAdapter.cpp @ 170:ff72d97823f7

* Add means to obtain actually used step & block sizes from buffering adapter
author cannam
date Fri, 25 Jul 2008 14:01:57 +0000
parents af8e59f43d1d
children dcc5df7e3253
comparison
equal deleted inserted replaced
169:af8e59f43d1d 170:ff72d97823f7
55 55
56 void setPluginStepSize(size_t stepSize); 56 void setPluginStepSize(size_t stepSize);
57 void setPluginBlockSize(size_t blockSize); 57 void setPluginBlockSize(size_t blockSize);
58 58
59 bool initialise(size_t channels, size_t stepSize, size_t blockSize); 59 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
60
61 void getActualStepAndBlockSizes(size_t &stepSize, size_t &blockSize);
60 62
61 OutputList getOutputDescriptors() const; 63 OutputList getOutputDescriptors() const;
62 64
63 void reset(); 65 void reset();
64 66
284 void 286 void
285 PluginBufferingAdapter::setPluginBlockSize(size_t blockSize) 287 PluginBufferingAdapter::setPluginBlockSize(size_t blockSize)
286 { 288 {
287 m_impl->setPluginBlockSize(blockSize); 289 m_impl->setPluginBlockSize(blockSize);
288 } 290 }
291
292 void
293 PluginBufferingAdapter::getActualStepAndBlockSizes(size_t &stepSize,
294 size_t &blockSize)
295 {
296 m_impl->getActualStepAndBlockSizes(stepSize, blockSize);
297 }
289 298
290 bool 299 bool
291 PluginBufferingAdapter::initialise(size_t channels, size_t stepSize, size_t blockSize) 300 PluginBufferingAdapter::initialise(size_t channels, size_t stepSize, size_t blockSize)
292 { 301 {
293 return m_impl->initialise(channels, stepSize, blockSize); 302 return m_impl->initialise(channels, stepSize, blockSize);
365 return; 374 return;
366 } 375 }
367 m_setBlockSize = blockSize; 376 m_setBlockSize = blockSize;
368 } 377 }
369 378
379 void
380 PluginBufferingAdapter::Impl::getActualStepAndBlockSizes(size_t &stepSize,
381 size_t &blockSize)
382 {
383 stepSize = m_stepSize;
384 blockSize = m_blockSize;
385 }
386
370 bool 387 bool
371 PluginBufferingAdapter::Impl::initialise(size_t channels, size_t stepSize, size_t blockSize) 388 PluginBufferingAdapter::Impl::initialise(size_t channels, size_t stepSize, size_t blockSize)
372 { 389 {
373 if (stepSize != blockSize) { 390 if (stepSize != blockSize) {
374 std::cerr << "PluginBufferingAdapter::initialise: input stepSize must be equal to blockSize for this adapter (stepSize = " << stepSize << ", blockSize = " << blockSize << ")" << std::endl; 391 std::cerr << "PluginBufferingAdapter::initialise: input stepSize must be equal to blockSize for this adapter (stepSize = " << stepSize << ", blockSize = " << blockSize << ")" << std::endl;