Mercurial > hg > svcore
comparison transform/RealTimeEffectModelTransformer.cpp @ 1126:39019ce29178 tony-2.0-integration
Merge through to branch for Tony 2.0
author | Chris Cannam |
---|---|
date | Thu, 20 Aug 2015 14:54:21 +0100 |
parents | 4d9816ba0ebe |
children | e994747fb9dd |
comparison
equal
deleted
inserted
replaced
1119:e22bfe8ca248 | 1126:39019ce29178 |
---|---|
189 | 189 |
190 sv_frame_t got = 0; | 190 sv_frame_t got = 0; |
191 | 191 |
192 if (channelCount == 1) { | 192 if (channelCount == 1) { |
193 if (inbufs && inbufs[0]) { | 193 if (inbufs && inbufs[0]) { |
194 got = input->getData | 194 auto data = input->getData |
195 (m_input.getChannel(), blockFrame, blockSize, inbufs[0]); | 195 (m_input.getChannel(), blockFrame, blockSize); |
196 got = data.size(); | |
197 for (sv_frame_t i = 0; i < got; ++i) { | |
198 inbufs[0][i] = data[i]; | |
199 } | |
196 while (got < blockSize) { | 200 while (got < blockSize) { |
197 inbufs[0][got++] = 0.0; | 201 inbufs[0][got++] = 0.f; |
198 } | 202 } |
199 for (int ch = 1; ch < (int)m_plugin->getAudioInputCount(); ++ch) { | 203 for (int ch = 1; ch < (int)m_plugin->getAudioInputCount(); ++ch) { |
200 for (sv_frame_t i = 0; i < blockSize; ++i) { | 204 for (sv_frame_t i = 0; i < blockSize; ++i) { |
201 inbufs[ch][i] = inbufs[0][i]; | 205 inbufs[ch][i] = inbufs[0][i]; |
202 } | 206 } |
203 } | 207 } |
204 } | 208 } |
205 } else { | 209 } else { |
206 if (inbufs && inbufs[0]) { | 210 if (inbufs && inbufs[0]) { |
207 got = input->getData(0, channelCount - 1, | 211 auto data = input->getMultiChannelData |
208 blockFrame, blockSize, | 212 (0, channelCount - 1, blockFrame, blockSize); |
209 inbufs); | 213 if (!data.empty()) got = data[0].size(); |
214 for (int ch = 0; ch < channelCount; ++ch) { | |
215 for (sv_frame_t i = 0; i < got; ++i) { | |
216 inbufs[ch][i] = data[ch][i]; | |
217 } | |
218 } | |
210 while (got < blockSize) { | 219 while (got < blockSize) { |
211 for (int ch = 0; ch < channelCount; ++ch) { | 220 for (int ch = 0; ch < channelCount; ++ch) { |
212 inbufs[ch][got] = 0.0; | 221 inbufs[ch][got] = 0.0; |
213 } | 222 } |
214 ++got; | 223 ++got; |