diff plugins/Silence.cpp @ 32:8a20f3488d88

(Start to) remove the channel counts from everywhere: they should always be 1 anyway as that's what Vamp::Plugin::getMaxChannelCount always defaulted to
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 09 Jul 2012 15:50:30 +0100
parents 2e979622bd93
children bcb23bb4b7aa
line wrap: on
line diff
--- a/plugins/Silence.cpp	Mon Jul 09 15:44:07 2012 +0100
+++ b/plugins/Silence.cpp	Mon Jul 09 15:50:30 2012 +0100
@@ -78,12 +78,16 @@
 bool
 Silence::initialise(size_t channels, size_t stepSize, size_t blockSize)
 {
-    m_channelCount = channels;
+    if (channels != 1) {
+        std::cerr << "Silence::initialise: channels must be 1" << std::endl;
+        return false;
+    }
+
     m_stepSize = stepSize;
     m_blockSize = blockSize;
 
-    m_ibuf = new_fvec(stepSize, channels);
-    m_pbuf = new_fvec(stepSize, channels);
+    m_ibuf = new_fvec(stepSize);
+    m_pbuf = new_fvec(stepSize);
     m_tmpptrs = new smpl_t *[channels];
 
     return true;