Mercurial > hg > svcore
comparison transform/RealTimeEffectModelTransformer.cpp @ 1040:a1cd5abcb38b cxx11
Introduce and use a samplerate type
author | Chris Cannam |
---|---|
date | Wed, 04 Mar 2015 12:01:04 +0000 |
parents | b14064bd1f97 |
children | 9f4505ac9072 |
comparison
equal
deleted
inserted
replaced
1039:b14064bd1f97 | 1040:a1cd5abcb38b |
---|---|
135 WritableWaveFileModel *wwfm = dynamic_cast<WritableWaveFileModel *>(m_outputs[0]); | 135 WritableWaveFileModel *wwfm = dynamic_cast<WritableWaveFileModel *>(m_outputs[0]); |
136 if (!stvm && !wwfm) return; | 136 if (!stvm && !wwfm) return; |
137 | 137 |
138 if (stvm && (m_outputNo >= int(m_plugin->getControlOutputCount()))) return; | 138 if (stvm && (m_outputNo >= int(m_plugin->getControlOutputCount()))) return; |
139 | 139 |
140 int sampleRate = input->getSampleRate(); | 140 sv_samplerate_t sampleRate = input->getSampleRate(); |
141 int channelCount = input->getChannelCount(); | 141 int channelCount = input->getChannelCount(); |
142 if (!wwfm && m_input.getChannel() != -1) channelCount = 1; | 142 if (!wwfm && m_input.getChannel() != -1) channelCount = 1; |
143 | 143 |
144 sv_frame_t blockSize = m_plugin->getBufferSize(); | 144 sv_frame_t blockSize = m_plugin->getBufferSize(); |
145 | 145 |
233 } | 233 } |
234 } | 234 } |
235 } | 235 } |
236 */ | 236 */ |
237 | 237 |
238 m_plugin->run(Vamp::RealTime::frame2RealTime(blockFrame, sampleRate)); | 238 m_plugin->run(RealTime::frame2RealTime(blockFrame, sampleRate)); |
239 | 239 |
240 if (stvm) { | 240 if (stvm) { |
241 | 241 |
242 float value = m_plugin->getControlOutputValue(m_outputNo); | 242 float value = m_plugin->getControlOutputValue(m_outputNo); |
243 | 243 |