# HG changeset patch # User Chris Cannam # Date 1471361877 -3600 # Node ID 27c3448df1980a61793e07593b4425775e2ad589 # Parent e979a9c4ffb66d53c2b8feeaf014db5fc6dad4ae Fix m_ri initialisation diff -r e979a9c4ffb6 -r 27c3448df198 src/vamp-hostsdk/PluginInputDomainAdapter.cpp --- a/src/vamp-hostsdk/PluginInputDomainAdapter.cpp Tue Aug 16 16:04:09 2016 +0100 +++ b/src/vamp-hostsdk/PluginInputDomainAdapter.cpp Tue Aug 16 16:37:57 2016 +0100 @@ -234,10 +234,12 @@ delete[] m_freqbuf[c]; } delete[] m_freqbuf; + delete[] m_ri; if (m_cfg) { KissSingle::kiss_fftr_free(m_cfg); + m_cfg = 0; delete[] m_cbuf; - m_cfg = 0; + m_cbuf = 0; } delete m_window; } @@ -275,10 +277,12 @@ delete[] m_freqbuf[c]; } delete[] m_freqbuf; + delete[] m_ri; if (m_cfg) { KissSingle::kiss_fftr_free(m_cfg); + m_cfg = 0; delete[] m_cbuf; - m_cfg = 0; + m_cbuf = 0; } delete m_window; } @@ -291,15 +295,16 @@ for (int c = 0; c < m_channels; ++c) { m_freqbuf[c] = new float[m_blockSize + 2]; } + m_ri = new float[m_blockSize]; m_window = new Window(convertType(m_windowType), m_blockSize); - m_cfg = KissSingle::kiss_fftr_alloc(blockSize, false, 0, 0); - m_cbuf = new KissSingle::kiss_fft_cpx[blockSize/2+1]; + m_cfg = KissSingle::kiss_fftr_alloc(m_blockSize, false, 0, 0); + m_cbuf = new KissSingle::kiss_fft_cpx[m_blockSize/2+1]; m_processCount = 0; - return m_plugin->initialise(channels, stepSize, blockSize); + return m_plugin->initialise(channels, stepSize, m_blockSize); } void