Mercurial > hg > svcore
comparison plugin/LADSPAPluginFactory.cpp @ 57:7439f1696314
* Add editing for auralisation plugin parameters and programs
* Rename and reorganise the sample plugin sample set
author | Chris Cannam |
---|---|
date | Thu, 23 Mar 2006 15:49:41 +0000 |
parents | d397ea0a79f5 |
children | 3086ff194ea0 |
comparison
equal
deleted
inserted
replaced
56:2157fa46c1e7 | 57:7439f1696314 |
---|---|
258 if (LADSPA_IS_HINT_SAMPLE_RATE(d)) { | 258 if (LADSPA_IS_HINT_SAMPLE_RATE(d)) { |
259 deft *= m_sampleRate; | 259 deft *= m_sampleRate; |
260 } | 260 } |
261 | 261 |
262 return deft; | 262 return deft; |
263 } | |
264 | |
265 float | |
266 LADSPAPluginFactory::getPortQuantization(const LADSPA_Descriptor *descriptor, int port) | |
267 { | |
268 int displayHint = getPortDisplayHint(descriptor, port); | |
269 if (displayHint & PortHint::Toggled) { | |
270 return lrintf(getPortMaximum(descriptor, port)) - | |
271 lrintf(getPortMinimum(descriptor, port)); | |
272 } | |
273 if (displayHint & PortHint::Integer) { | |
274 return 1.0; | |
275 } | |
276 return 0.0; | |
263 } | 277 } |
264 | 278 |
265 int | 279 int |
266 LADSPAPluginFactory::getPortDisplayHint(const LADSPA_Descriptor *descriptor, int port) | 280 LADSPAPluginFactory::getPortDisplayHint(const LADSPA_Descriptor *descriptor, int port) |
267 { | 281 { |