Mercurial > hg > vamp-plugin-sdk
comparison src/vamp-hostsdk/PluginInputDomainAdapter.cpp @ 435:27c3448df198 vampipe
Fix m_ri initialisation
author | Chris Cannam |
---|---|
date | Tue, 16 Aug 2016 16:37:57 +0100 |
parents | e979a9c4ffb6 |
children | 7bab0c5422f4 |
comparison
equal
deleted
inserted
replaced
434:e979a9c4ffb6 | 435:27c3448df198 |
---|---|
232 if (m_channels > 0) { | 232 if (m_channels > 0) { |
233 for (int c = 0; c < m_channels; ++c) { | 233 for (int c = 0; c < m_channels; ++c) { |
234 delete[] m_freqbuf[c]; | 234 delete[] m_freqbuf[c]; |
235 } | 235 } |
236 delete[] m_freqbuf; | 236 delete[] m_freqbuf; |
237 delete[] m_ri; | |
237 if (m_cfg) { | 238 if (m_cfg) { |
238 KissSingle::kiss_fftr_free(m_cfg); | 239 KissSingle::kiss_fftr_free(m_cfg); |
240 m_cfg = 0; | |
239 delete[] m_cbuf; | 241 delete[] m_cbuf; |
240 m_cfg = 0; | 242 m_cbuf = 0; |
241 } | 243 } |
242 delete m_window; | 244 delete m_window; |
243 } | 245 } |
244 } | 246 } |
245 | 247 |
273 if (m_channels > 0) { | 275 if (m_channels > 0) { |
274 for (int c = 0; c < m_channels; ++c) { | 276 for (int c = 0; c < m_channels; ++c) { |
275 delete[] m_freqbuf[c]; | 277 delete[] m_freqbuf[c]; |
276 } | 278 } |
277 delete[] m_freqbuf; | 279 delete[] m_freqbuf; |
280 delete[] m_ri; | |
278 if (m_cfg) { | 281 if (m_cfg) { |
279 KissSingle::kiss_fftr_free(m_cfg); | 282 KissSingle::kiss_fftr_free(m_cfg); |
283 m_cfg = 0; | |
280 delete[] m_cbuf; | 284 delete[] m_cbuf; |
281 m_cfg = 0; | 285 m_cbuf = 0; |
282 } | 286 } |
283 delete m_window; | 287 delete m_window; |
284 } | 288 } |
285 | 289 |
286 m_stepSize = int(stepSize); | 290 m_stepSize = int(stepSize); |
289 | 293 |
290 m_freqbuf = new float *[m_channels]; | 294 m_freqbuf = new float *[m_channels]; |
291 for (int c = 0; c < m_channels; ++c) { | 295 for (int c = 0; c < m_channels; ++c) { |
292 m_freqbuf[c] = new float[m_blockSize + 2]; | 296 m_freqbuf[c] = new float[m_blockSize + 2]; |
293 } | 297 } |
298 m_ri = new float[m_blockSize]; | |
294 | 299 |
295 m_window = new Window<float>(convertType(m_windowType), m_blockSize); | 300 m_window = new Window<float>(convertType(m_windowType), m_blockSize); |
296 | 301 |
297 m_cfg = KissSingle::kiss_fftr_alloc(blockSize, false, 0, 0); | 302 m_cfg = KissSingle::kiss_fftr_alloc(m_blockSize, false, 0, 0); |
298 m_cbuf = new KissSingle::kiss_fft_cpx[blockSize/2+1]; | 303 m_cbuf = new KissSingle::kiss_fft_cpx[m_blockSize/2+1]; |
299 | 304 |
300 m_processCount = 0; | 305 m_processCount = 0; |
301 | 306 |
302 return m_plugin->initialise(channels, stepSize, blockSize); | 307 return m_plugin->initialise(channels, stepSize, m_blockSize); |
303 } | 308 } |
304 | 309 |
305 void | 310 void |
306 PluginInputDomainAdapter::Impl::reset() | 311 PluginInputDomainAdapter::Impl::reset() |
307 { | 312 { |