comparison plugin/LADSPAPluginInstance.cpp @ 176:570794f6f6a7

* Some fixes to updating of writable wave file models
author Chris Cannam
date Tue, 03 Oct 2006 15:01:50 +0000
parents 702fc936e6a6
children 5a916fee6d2d
comparison
equal deleted inserted replaced
175:b0f4555b625e 176:570794f6f6a7
50 m_run(false), 50 m_run(false),
51 m_bypassed(false) 51 m_bypassed(false)
52 { 52 {
53 init(idealChannelCount); 53 init(idealChannelCount);
54 54
55 m_inputBuffers = new sample_t*[m_instanceCount * m_audioPortsIn.size()]; 55 if (m_audioPortsIn.size() == 0) {
56 m_outputBuffers = new sample_t*[m_instanceCount * m_audioPortsOut.size()]; 56 m_inputBuffers = 0;
57 } else {
58 m_inputBuffers = new sample_t*[m_instanceCount * m_audioPortsIn.size()];
59 }
60
61 if (m_audioPortsOut.size() == 0) {
62 m_outputBuffers = 0;
63 } else {
64 m_outputBuffers = new sample_t*[m_instanceCount * m_audioPortsOut.size()];
65 }
57 66
58 for (size_t i = 0; i < m_instanceCount * m_audioPortsIn.size(); ++i) { 67 for (size_t i = 0; i < m_instanceCount * m_audioPortsIn.size(); ++i) {
59 m_inputBuffers[i] = new sample_t[blockSize]; 68 m_inputBuffers[i] = new sample_t[blockSize];
60 } 69 }
61 for (size_t i = 0; i < m_instanceCount * m_audioPortsOut.size(); ++i) { 70 for (size_t i = 0; i < m_instanceCount * m_audioPortsOut.size(); ++i) {