Mercurial > hg > vamp-onsetsds-plugin
comparison onsetsdsplugin.cpp @ 11:1ee043ea9d06
Retain parameter values through reset
author | Chris Cannam |
---|---|
date | Mon, 16 Dec 2013 13:27:32 +0000 |
parents | 1aa45968fbad |
children |
comparison
equal
deleted
inserted
replaced
10:1aa45968fbad | 11:1ee043ea9d06 |
---|---|
204 m_odsdata = new float[onsetsds_memneeded(m_dfType, m_fftSize, m_medspan)]; | 204 m_odsdata = new float[onsetsds_memneeded(m_dfType, m_fftSize, m_medspan)]; |
205 m_ods = new OnsetsDS; | 205 m_ods = new OnsetsDS; |
206 memset(m_ods, 0, sizeof(OnsetsDS)); | 206 memset(m_ods, 0, sizeof(OnsetsDS)); |
207 onsetsds_init(m_ods, m_odsdata, ODS_FFT_FFTW3_R2C, m_dfType, m_fftSize, | 207 onsetsds_init(m_ods, m_odsdata, ODS_FFT_FFTW3_R2C, m_dfType, m_fftSize, |
208 m_medspan, m_inputSampleRate); | 208 m_medspan, m_inputSampleRate); |
209 m_ods->thresh = m_threshold; | 209 m_ods->thresh = m_threshold; |
210 | 210 |
211 return true; | 211 return true; |
212 } | 212 } |
213 | 213 |
214 void | 214 void |
218 std::cerr << "ERROR: OnsetsDSPlugin::reset: Plugin has not been initialised" << std::endl; | 218 std::cerr << "ERROR: OnsetsDSPlugin::reset: Plugin has not been initialised" << std::endl; |
219 return; | 219 return; |
220 } | 220 } |
221 onsetsds_init(m_ods, m_odsdata, ODS_FFT_FFTW3_R2C, m_dfType, m_fftSize, | 221 onsetsds_init(m_ods, m_odsdata, ODS_FFT_FFTW3_R2C, m_dfType, m_fftSize, |
222 m_medspan, m_inputSampleRate); | 222 m_medspan, m_inputSampleRate); |
223 m_ods->thresh = m_threshold; | |
223 } | 224 } |
224 | 225 |
225 size_t | 226 size_t |
226 OnsetsDSPlugin::getPreferredStepSize() const | 227 OnsetsDSPlugin::getPreferredStepSize() const |
227 { | 228 { |