comparison PyPlugin.cpp @ 28:5139bf30f208

Some further mods to vampy construction
author fazekasgy
date Tue, 25 Aug 2009 08:49:22 +0000
parents 046ba4183373
children 4f1894c7591b
comparison
equal deleted inserted replaced
27:046ba4183373 28:5139bf30f208
95 PyObject *args = PyTuple_Pack(1, pyInputSampleRate); 95 PyObject *args = PyTuple_Pack(1, pyInputSampleRate);
96 m_pyInstance = PyObject_Call(m_pyClass, args, NULL); 96 m_pyInstance = PyObject_Call(m_pyClass, args, NULL);
97 97
98 if (!m_pyInstance || PyErr_Occurred()) { 98 if (!m_pyInstance || PyErr_Occurred()) {
99 if (PyErr_Occurred()) { PyErr_Print(); PyErr_Clear(); } 99 if (PyErr_Occurred()) { PyErr_Print(); PyErr_Clear(); }
100 Py_DECREF(m_pyClass);
100 Py_CLEAR(args); 101 Py_CLEAR(args);
101 Py_CLEAR(pyInputSampleRate); 102 Py_CLEAR(pyInputSampleRate);
102 cerr << "PyPlugin::PyPlugin: Failed to create Python plugin instance for key \"" << pluginKey << "\" (is the 1-arg class constructor from sample rate correctly provided?)" << endl; 103 cerr << "PyPlugin::PyPlugin: Failed to create Python plugin instance for key \"" << pluginKey << "\" (is the 1-arg class constructor from sample rate correctly provided?)" << endl;
103 throw std::string("Constructor failed"); 104 throw std::string("Constructor failed");
104 } 105 }