Mercurial > hg > svcore
diff 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 |
line wrap: on
line diff
--- a/plugin/LADSPAPluginFactory.cpp Wed Mar 22 17:38:29 2006 +0000 +++ b/plugin/LADSPAPluginFactory.cpp Thu Mar 23 15:49:41 2006 +0000 @@ -262,6 +262,20 @@ return deft; } +float +LADSPAPluginFactory::getPortQuantization(const LADSPA_Descriptor *descriptor, int port) +{ + int displayHint = getPortDisplayHint(descriptor, port); + if (displayHint & PortHint::Toggled) { + return lrintf(getPortMaximum(descriptor, port)) - + lrintf(getPortMinimum(descriptor, port)); + } + if (displayHint & PortHint::Integer) { + return 1.0; + } + return 0.0; +} + int LADSPAPluginFactory::getPortDisplayHint(const LADSPA_Descriptor *descriptor, int port) {