diff options
Diffstat (limited to 'pysoundtouch/src/soundtouchmodule.c')
| -rw-r--r-- | pysoundtouch/src/soundtouchmodule.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pysoundtouch/src/soundtouchmodule.c b/pysoundtouch/src/soundtouchmodule.c new file mode 100644 index 0000000..361af6a --- /dev/null +++ b/pysoundtouch/src/soundtouchmodule.c @@ -0,0 +1,27 @@ +/* + * python interface to soundtouch (the open-source audio processing library) + * Expose BMP detection and Shifting to python + */ + +#include <SoundTouch.h> +#include "soundtouchmodule.h" + +static PyMethodDef soundtouch_methods[] = { + { "SoundTouch", py_soundtouch_new, METH_VARARGS, "" }, + { "BPMDetect", py_bpmdetect_new, METH_VARARGS, "" }, + { NULL, 0, 0, NULL } +}; + +PyMODINIT_FUNC +initsoundtouch(void) { + PyObject *module, *dict; + + module = Py_InitModule("soundtouch", soundtouch_methods); + dict = PyModule_GetDict(module); + + PyDict_SetItemString(dict, "__version__", + PyString_FromString(VERSION)); + + if (PyErr_Occurred()) + PyErr_SetString(PyExc_ImportError, "soundtouch: init failed"); +} |
