comparison transform/RealTimePluginTransform.cpp @ 137:006c90387f40

* Fix many compile warnings, remove some debug output
author Chris Cannam
date Mon, 30 Apr 2007 13:36:23 +0000
parents b4110b17bca8
children 107ca17594c8
comparison
equal deleted inserted replaced
136:37c26877ca5f 137:006c90387f40
69 69
70 if (configurationXml != "") { 70 if (configurationXml != "") {
71 PluginXml(m_plugin).setParametersFromXml(configurationXml); 71 PluginXml(m_plugin).setParametersFromXml(configurationXml);
72 } 72 }
73 73
74 if (m_outputNo >= 0 && m_outputNo >= m_plugin->getControlOutputCount()) { 74 if (m_outputNo >= 0 &&
75 m_outputNo >= int(m_plugin->getControlOutputCount())) {
75 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl; 76 std::cerr << "RealTimePluginTransform: Plugin has fewer than desired " << m_outputNo << " control outputs" << std::endl;
76 return; 77 return;
77 } 78 }
78 79
79 if (m_outputNo == -1) { 80 if (m_outputNo == -1) {
129 130
130 SparseTimeValueModel *stvm = dynamic_cast<SparseTimeValueModel *>(m_output); 131 SparseTimeValueModel *stvm = dynamic_cast<SparseTimeValueModel *>(m_output);
131 WritableWaveFileModel *wwfm = dynamic_cast<WritableWaveFileModel *>(m_output); 132 WritableWaveFileModel *wwfm = dynamic_cast<WritableWaveFileModel *>(m_output);
132 if (!stvm && !wwfm) return; 133 if (!stvm && !wwfm) return;
133 134
134 if (stvm && (m_outputNo >= m_plugin->getControlOutputCount())) return; 135 if (stvm && (m_outputNo >= int(m_plugin->getControlOutputCount()))) return;
135 136
136 size_t sampleRate = input->getSampleRate(); 137 size_t sampleRate = input->getSampleRate();
137 int channelCount = input->getChannelCount(); 138 size_t channelCount = input->getChannelCount();
138 if (!wwfm && m_context.channel != -1) channelCount = 1; 139 if (!wwfm && m_context.channel != -1) channelCount = 1;
139 140
140 size_t blockSize = m_plugin->getBufferSize(); 141 size_t blockSize = m_plugin->getBufferSize();
141 142
142 float **inbufs = m_plugin->getAudioInputBuffers(); 143 float **inbufs = m_plugin->getAudioInputBuffers();
146 size_t blockFrame = startFrame; 147 size_t blockFrame = startFrame;
147 148
148 size_t prevCompletion = 0; 149 size_t prevCompletion = 0;
149 150
150 size_t latency = m_plugin->getLatency(); 151 size_t latency = m_plugin->getLatency();
151
152 int i = 0;
153 152
154 while (blockFrame < endFrame && !m_abandoned) { 153 while (blockFrame < endFrame && !m_abandoned) {
155 154
156 size_t completion = 155 size_t completion =
157 (((blockFrame - startFrame) / blockSize) * 99) / 156 (((blockFrame - startFrame) / blockSize) * 99) /