Mercurial > hg > vampy-host
comparison vampyhost.cpp @ 27:fb6519598734
Some pruning
author | Chris Cannam |
---|---|
date | Wed, 26 Nov 2014 10:01:04 +0000 |
parents | 014c48d6f360 |
children | 1175e814954e |
comparison
equal
deleted
inserted
replaced
26:014c48d6f360 | 27:fb6519598734 |
---|---|
39 | 39 |
40 //include for python extension module: must be first | 40 //include for python extension module: must be first |
41 #include <Python.h> | 41 #include <Python.h> |
42 | 42 |
43 // define a unique API pointer | 43 // define a unique API pointer |
44 #define PY_ARRAY_UNIQUE_SYMBOL VAMPY_ARRAY_API | 44 #define PY_ARRAY_UNIQUE_SYMBOL VAMPYHOST_ARRAY_API |
45 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION | 45 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
46 #include "numpy/arrayobject.h" | 46 #include "numpy/arrayobject.h" |
47 | 47 |
48 #include <vampyhost.h> | 48 #include <vampyhost.h> |
49 | 49 |
438 } | 438 } |
439 | 439 |
440 float **inbuf = new float *[channels]; | 440 float **inbuf = new float *[channels]; |
441 | 441 |
442 PyTypeConversions typeConv; | 442 PyTypeConversions typeConv; |
443 typeConv.setNumpyInstalled(true); | |
444 | 443 |
445 cerr << "here!" << endl; | 444 cerr << "here!" << endl; |
446 | 445 |
447 vector<vector<float> > data; | 446 vector<vector<float> > data; |
448 for (int c = 0; c < channels; ++c) { | 447 for (int c = 0; c < channels; ++c) { |
470 delete[] inbuf; | 469 delete[] inbuf; |
471 | 470 |
472 cerr << "no no no, here!" << endl; | 471 cerr << "no no no, here!" << endl; |
473 | 472 |
474 PyTypeConversions conv; | 473 PyTypeConversions conv; |
475 conv.setNumpyInstalled(true); | |
476 | 474 |
477 PyObject *pyFs = PyDict_New(); | 475 PyObject *pyFs = PyDict_New(); |
478 | 476 |
479 for (Plugin::FeatureSet::const_iterator fsi = fs.begin(); | 477 for (Plugin::FeatureSet::const_iterator fsi = fs.begin(); |
480 fsi != fs.end(); ++fsi) { | 478 fsi != fs.end(); ++fsi) { |