changeset 44:5a72bf7490ae

...
author Chris Cannam
date Wed, 04 Oct 2006 14:01:28 +0000
parents 0739be123304
children 6b6bca31ad53
files transform/RealTimePluginTransform.cpp transform/TransformFactory.cpp
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/transform/RealTimePluginTransform.cpp	Wed Oct 04 12:20:15 2006 +0000
+++ b/transform/RealTimePluginTransform.cpp	Wed Oct 04 14:01:28 2006 +0000
@@ -53,7 +53,8 @@
     DenseTimeValueModel *input = getInput();
     if (!input) return;
 
-    m_plugin = factory->instantiatePlugin(pluginId, 0, 0, m_input->getSampleRate(),
+    m_plugin = factory->instantiatePlugin(pluginId, 0, 0,
+                                          m_input->getSampleRate(),
                                           m_context.blockSize,
                                           input->getChannelCount());
 
@@ -120,7 +121,7 @@
 
     size_t sampleRate = input->getSampleRate();
     int channelCount = input->getChannelCount();
-    if (m_context.channel != -1) channelCount = 1;
+    if (!wwfm && m_context.channel != -1) channelCount = 1;
 
     size_t blockSize = m_plugin->getBufferSize();
 
--- a/transform/TransformFactory.cpp	Wed Oct 04 12:20:15 2006 +0000
+++ b/transform/TransformFactory.cpp	Wed Oct 04 14:01:28 2006 +0000
@@ -519,8 +519,10 @@
         getChannelRange(name, plugin, minChannels, maxChannels);
 
         int targetChannels = sourceChannels;
-        if (sourceChannels < minChannels) targetChannels = minChannels;
-        if (sourceChannels > maxChannels) targetChannels = maxChannels;
+        if (!effect) {
+            if (sourceChannels < minChannels) targetChannels = minChannels;
+            if (sourceChannels > maxChannels) targetChannels = maxChannels;
+        }
 
         int defaultChannel = context.channel;