Mercurial > hg > svcore
diff plugin/DSSIPluginInstance.cpp @ 117:c30728d5625c sv1-v0.9rc1
* Make vertical scale alignment modes work in note layer as well as time-value
layer, and several significant fixes to it
* Make it possible to draw notes properly on the note layer
* Show units (and frequencies etc in note layer's case) in the time-value and
note layer description boxes
* Minor fix to item edit dialog layout
* Some minor menu rearrangement
* Comment out a lot of debug output
* Add SV website and reference URLs to Help menu, and add code to (attempt to)
open them in the user's preferred browser
author | Chris Cannam |
---|---|
date | Fri, 12 May 2006 14:40:43 +0000 |
parents | 97e085895524 |
children | 71f869dac40b |
line wrap: on
line diff
--- a/plugin/DSSIPluginInstance.cpp Thu May 11 15:02:14 2006 +0000 +++ b/plugin/DSSIPluginInstance.cpp Fri May 12 14:40:43 2006 +0000 @@ -25,7 +25,7 @@ #include "PluginIdentifier.h" #include "LADSPAPluginFactory.h" -#define DEBUG_DSSI 1 +//#define DEBUG_DSSI 1 //#define DEBUG_DSSI_PROCESS 1 #define EVENT_BUFFER_SIZE 1023 @@ -161,12 +161,18 @@ float DSSIPluginInstance::getParameter(std::string name) const { +#ifdef DEBUG_DSSI std::cerr << "DSSIPluginInstance::getParameter(" << name << ")" << std::endl; +#endif for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) { if (name == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) { +#ifdef DEBUG_DSSI std::cerr << "Matches port " << i << std::endl; +#endif float v = getParameterValue(i); +#ifdef DEBUG_DSSI std::cerr << "Returning " << v << std::endl; +#endif return v; } } @@ -177,7 +183,9 @@ void DSSIPluginInstance::setParameter(std::string name, float value) { +#ifdef DEBUG_DSSI std::cerr << "DSSIPluginInstance::setParameter(" << name << ", " << value << ")" << std::endl; +#endif for (unsigned int i = 0; i < m_controlPortsIn.size(); ++i) { if (name == m_descriptor->LADSPA_Plugin->PortNames[m_controlPortsIn[i].first]) { @@ -370,7 +378,9 @@ DSSIPluginInstance::~DSSIPluginInstance() { +#ifdef DEBUG_DSSI std::cerr << "DSSIPluginInstance::~DSSIPluginInstance" << std::endl; +#endif if (m_threads.find(m_instanceHandle) != m_threads.end()) { @@ -654,9 +664,11 @@ DSSIPluginInstance::connectPorts() { if (!m_descriptor || !m_descriptor->LADSPA_Plugin->connect_port) return; +#ifdef DEBUG_DSSI std::cerr << "DSSIPluginInstance::connectPorts: " << m_audioPortsIn.size() << " audio ports in, " << m_audioPortsOut.size() << " out, " << m_outputBufferCount << " output buffers" << std::endl; +#endif assert(sizeof(LADSPA_Data) == sizeof(float)); assert(sizeof(sample_t) == sizeof(float)); @@ -691,7 +703,9 @@ (m_descriptor->LADSPA_Plugin, m_controlPortsIn[i].first); *m_controlPortsIn[i].second = defaultValue; m_backupControlPortsIn[i] = defaultValue; +#ifdef DEBUG_DSSI std::cerr << "DSSIPluginInstance::connectPorts: set control port " << i << " to default value " << defaultValue << std::endl; +#endif } }