Changeset 7b56229


Ignore:
Timestamp:
Jan 24, 2014, 2:22:28 AM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
16dda03
Parents:
f1100a4
Message:

python/ext/py-{sink,source}.c: add close function

Location:
python/ext
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-sink.c

    rf1100a4 r7b56229  
    9090AUBIO_MEMBERS_STOP(sink)
    9191
     92static PyObject *
     93Pyaubio_sink_close (Py_sink *self, PyObject *unused)
     94{
     95  del_aubio_sink (self->o);
     96  self->o = NULL;
     97  Py_RETURN_NONE;
     98}
    9299
    93100static PyMethodDef Py_sink_methods[] = {
     101  {"close", (PyCFunction) Pyaubio_sink_close,
     102    METH_NOARGS, ""},
    94103  {NULL} /* sentinel */
    95104};
  • python/ext/py-source.c

    rf1100a4 r7b56229  
    1 // WARNING: this file is generated, DO NOT EDIT
    2 
    3 // WARNING: if you haven't read the first line yet, please do so
    41#include "aubiowraphell.h"
    52
     
    127124}
    128125
     126static PyObject *
     127Pyaubio_source_close (Py_source *self, PyObject *unused)
     128{
     129  del_aubio_source (self->o);
     130  self->o = NULL;
     131  Py_RETURN_NONE;
     132}
     133
    129134static PyMethodDef Py_source_methods[] = {
    130135  {"get_samplerate", (PyCFunction) Pyaubio_source_get_samplerate,
     
    132137  {"get_channels", (PyCFunction) Pyaubio_source_get_channels,
    133138    METH_NOARGS, ""},
     139  {"close", (PyCFunction) Pyaubio_source_close,
     140    METH_NOARGS, ""},
    134141  {NULL} /* sentinel */
    135142};
Note: See TracChangeset for help on using the changeset viewer.