diff options
| -rw-r--r-- | src/plugins/Effect/ladspa/ladspahost.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/Effect/ladspa/ladspahost.cpp b/src/plugins/Effect/ladspa/ladspahost.cpp index 918be9a45..3070270c4 100644 --- a/src/plugins/Effect/ladspa/ladspahost.cpp +++ b/src/plugins/Effect/ladspa/ladspahost.cpp @@ -421,10 +421,9 @@ int LADSPAHost::applyEffect(float *data, size_t samples) size_t frames = samples / m_chan; - for(size_t i = 0; i < frames; ++i) + for(size_t i = 0; i < samples; ++i) { - for(int c = 0; c < m_chan; c++) - m_buf[c][i] = data[i*m_chan + c]; + m_buf[i % m_chan][i / m_chan] = data[i]; } for(int i = 0; i < m_effects.count(); ++i) @@ -435,10 +434,9 @@ int LADSPAHost::applyEffect(float *data, size_t samples) } } - for(size_t i = 0; i < frames; ++i) + for(size_t i = 0; i < samples; ++i) { - for(int c = 0; c < m_chan; c++) - data[i*m_chan + c] = m_buf[c][i]; + data[i] = m_buf[i % m_chan][i / m_chan]; } return samples; } |
