diff --git a/audiolab/pysndfile/_sndfile.c b/audiolab/pysndfile/_sndfile.c index 3655256..4590ee1 100644 --- a/audiolab/pysndfile/_sndfile.c +++ b/audiolab/pysndfile/_sndfile.c @@ -1,25 +1,67 @@ -/* Generated by Cython 0.10.2 on Sun Dec 14 17:23:18 2008 */ +/* Generated by Cython 0.17.4 on Sat Feb 15 10:46:50 2014 */ #define PY_SSIZE_T_CLEAN #include "Python.h" -#include "structmember.h" -#ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02040000 + #error Cython requires Python 2.4+. +#else +#include /* For offsetof */ +#ifndef offsetof +#define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif -#if PY_VERSION_HEX < 0x02040000 - #define METH_COEXIST 0 +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION +#define CYTHON_COMPILING_IN_PYPY 1 +#define CYTHON_COMPILING_IN_CPYTHON 0 +#else +#define CYTHON_COMPILING_IN_PYPY 0 +#define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN + #define PY_FORMAT_SIZE_T "" + #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) - #define PyInt_AsSsize_t(o) PyInt_AsLong(o) - #define PyNumber_Index(o) PyNumber_Int(o) - #define PyIndex_Check(o) PyNumber_Check(o) + #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) + #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ + (PyErr_Format(PyExc_TypeError, \ + "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ + (PyObject*)0)) + #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ + !PyComplex_Check(o)) + #define PyIndex_Check __Pyx_PyIndex_Check + #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) + #define __PYX_BUILD_PY_SSIZE_T "i" +#else + #define __PYX_BUILD_PY_SSIZE_T "n" + #define CYTHON_FORMAT_SSIZE_T "z" + #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) @@ -28,24 +70,21 @@ #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyType_Modified(t) - typedef struct { - void *buf; - PyObject *obj; - Py_ssize_t len; - Py_ssize_t itemsize; - int readonly; - int ndim; - char *format; - Py_ssize_t *shape; - Py_ssize_t *strides; - Py_ssize_t *suboffsets; - void *internal; + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; } Py_buffer; - #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 - #define PyBUF_LOCK 0x0002 #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) @@ -53,12 +92,22 @@ #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) - + #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) + #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) + typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); + typedef void (*releasebufferproc)(PyObject *, Py_buffer *); #endif #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ + PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 + #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 @@ -67,9 +116,55 @@ #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) +#else + #define CYTHON_PEP393_ENABLED 0 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) +#endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type - #define PyString_Type PyBytes_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#endif +#if PY_VERSION_HEX < 0x02060000 + #define PyBytesObject PyStringObject + #define PyBytes_Type PyString_Type + #define PyBytes_Check PyString_Check + #define PyBytes_CheckExact PyString_CheckExact + #define PyBytes_FromString PyString_FromString + #define PyBytes_FromStringAndSize PyString_FromStringAndSize + #define PyBytes_FromFormat PyString_FromFormat + #define PyBytes_DecodeEscape PyString_DecodeEscape + #define PyBytes_AsString PyString_AsString + #define PyBytes_AsStringAndSize PyString_AsStringAndSize + #define PyBytes_Size PyString_Size + #define PyBytes_AS_STRING PyString_AS_STRING + #define PyBytes_GET_SIZE PyString_GET_SIZE + #define PyBytes_Repr PyString_Repr + #define PyBytes_Concat PyString_Concat + #define PyBytes_ConcatAndDel PyString_ConcatAndDel +#endif +#if PY_VERSION_HEX < 0x02060000 + #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) + #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) @@ -83,285 +178,490 @@ #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask - #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_VERSION_HEX < 0x03020000 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else - #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) - #define PyBytes_Type PyString_Type + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300) + #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) + #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) + #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) +#else + #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ + (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ + (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ + (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) + #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ + (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ + (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ + (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) + #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ + (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ + (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ + (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) #endif #if PY_MAJOR_VERSION >= 3 - #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) + #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #endif -#if !defined(WIN32) && !defined(MS_WINDOWS) - #ifndef __stdcall - #define __stdcall - #endif - #ifndef __cdecl - #define __cdecl - #endif +#if PY_VERSION_HEX < 0x02050000 + #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) + #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) + #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) +#else + #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) + #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) + #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) +#endif +#if PY_VERSION_HEX < 0x02050000 + #define __Pyx_NAMESTR(n) ((char *)(n)) + #define __Pyx_DOCSTR(n) ((char *)(n)) #else - #define _USE_MATH_DEFINES + #define __Pyx_NAMESTR(n) (n) + #define __Pyx_DOCSTR(n) (n) #endif -#ifdef __cplusplus -#define __PYX_EXTERN_C extern "C" + + +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else -#define __PYX_EXTERN_C extern + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) +#define _USE_MATH_DEFINES #endif #include -#define __PYX_HAVE_API__scikits__audiolab__pysndfile___sndfile +#define __PYX_HAVE__audiolab__pysndfile___sndfile +#define __PYX_HAVE_API__audiolab__pysndfile___sndfile +#include "stdio.h" #include "stdlib.h" #include "numpy/arrayobject.h" +#include "numpy/ufuncobject.h" #include "sndfile.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ - -#ifdef __GNUC__ -#define INLINE __inline__ -#elif _WIN32 -#define INLINE __inline -#else -#define INLINE +#ifdef PYREX_WITHOUT_ASSERTIONS +#define CYTHON_WITHOUT_ASSERTIONS #endif -typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/ +/* inline attribute */ +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif +/* unused attribute */ +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif -static int __pyx_skip_dispatch = 0; +typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ /* Type Conversion Predeclarations */ -#if PY_MAJOR_VERSION < 3 -#define __Pyx_PyBytes_FromString PyString_FromString -#define __Pyx_PyBytes_AsString PyString_AsString -#else -#define __Pyx_PyBytes_FromString PyBytes_FromString -#define __Pyx_PyBytes_AsString PyBytes_AsString -#endif +#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) +#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) +#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) -static INLINE int __Pyx_PyObject_IsTrue(PyObject* x); -static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x); -static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x); -static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); + +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); -#define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x)) +#if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) -static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x); -static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x); -static INLINE char __pyx_PyInt_char(PyObject* x); -static INLINE short __pyx_PyInt_short(PyObject* x); -static INLINE int __pyx_PyInt_int(PyObject* x); -static INLINE long __pyx_PyInt_long(PyObject* x); -static INLINE signed char __pyx_PyInt_signed_char(PyObject* x); -static INLINE signed short __pyx_PyInt_signed_short(PyObject* x); -static INLINE signed int __pyx_PyInt_signed_int(PyObject* x); -static INLINE signed long __pyx_PyInt_signed_long(PyObject* x); -static INLINE long double __pyx_PyInt_long_double(PyObject* x); #ifdef __GNUC__ -/* Test for GCC > 2.95 */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) -#define likely(x) __builtin_expect(!!(x), 1) -#define unlikely(x) __builtin_expect(!!(x), 0) -#else /* __GNUC__ > 2 ... */ -#define likely(x) (x) -#define unlikely(x) (x) -#endif /* __GNUC__ > 2 ... */ + /* Test for GCC > 2.95 */ + #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) + #else /* __GNUC__ > 2 ... */ + #define likely(x) (x) + #define unlikely(x) (x) + #endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ -#define likely(x) (x) -#define unlikely(x) (x) + #define likely(x) (x) + #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; -static const char **__pyx_f; - -static INLINE PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i, int is_unsigned) { - PyObject *r; - if (PyList_CheckExact(o) && 0 <= i && i < PyList_GET_SIZE(o)) { - r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (PyTuple_CheckExact(o) && 0 <= i && i < PyTuple_GET_SIZE(o)) { - r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0) || !is_unsigned)) - r = PySequence_GetItem(o, i); - else { - PyObject *j = (likely(i >= 0) || !is_unsigned) ? PyInt_FromLong(i) : PyLong_FromUnsignedLongLong((sizeof(unsigned long long) > sizeof(Py_ssize_t) ? (1ULL << (sizeof(Py_ssize_t)*8)) : 0) + i); - if (!j) - return 0; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - } - return r; -} - -static void __Pyx_RaiseDoubleKeywordsError( - const char* func_name, PyObject* kw_name); /*proto*/ - -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ - -static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/ - -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); -static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf); /*proto*/ -static INLINE const char* __Pyx_ConsumeWhitespace(const char* ts); /*proto*/ -static void __Pyx_BufferNdimError(Py_buffer* buffer, int expected_ndim); /*proto*/ -static const char* __Pyx_DescribeTokenInFormatString(const char* ts); /*proto*/ -static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_float64_t(const char* ts); /*proto*/ - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_float64_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast); /*proto*/ - -static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ - -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_float32_t(const char* ts); /*proto*/ - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_float32_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast); /*proto*/ -static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_int32_t(const char* ts); /*proto*/ - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_int32_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast); /*proto*/ -static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_int16_t(const char* ts); /*proto*/ - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_int16_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast); /*proto*/ - -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, - const char *name, int exact); /*proto*/ -static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -#if PY_MAJOR_VERSION < 3 -static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); -static void __Pyx_ReleaseBuffer(Py_buffer *view); -#else -#define __Pyx_GetBuffer PyObject_GetBuffer -#define __Pyx_ReleaseBuffer PyBuffer_Release +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj #endif -Py_ssize_t __Pyx_zeros[] = {0, 0}; -Py_ssize_t __Pyx_minusones[] = {-1, -1}; - -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ - -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ - -static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ -static int __Pyx_EndUnpack(PyObject *); /*proto*/ - -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ - -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (PyList_Append(L, x) < 0) return NULL; - Py_INCREF(Py_None); - return Py_None; /* this is just to have an accurate signature */ - } - else { - PyObject *r, *m; - m = PyObject_GetAttrString(L, "append"); - if (!m) return NULL; - r = PyObject_CallFunctionObjArgs(m, x, NULL); - Py_DECREF(m); - return r; - } -} - -static void __Pyx_WriteUnraisable(const char *name); /*proto*/ - -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/ - -static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ - -static void __Pyx_AddTraceback(const char *funcname); /*proto*/ - -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ - -/* Type declarations */ +static const char *__pyx_f[] = { + "_sndfile.pyx", + "numpy.pxd", + "type.pxd", +}; +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; /* for error messages only */ + struct __Pyx_StructField_* fields; + size_t size; /* sizeof(type) */ + size_t arraysize[8]; /* length of array in each dimension */ + int ndim; + char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "numpy.pxd":723 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + */ typedef npy_int8 __pyx_t_5numpy_int8_t; +/* "numpy.pxd":724 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t + */ typedef npy_int16 __pyx_t_5numpy_int16_t; +/* "numpy.pxd":725 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * #ctypedef npy_int96 int96_t + */ typedef npy_int32 __pyx_t_5numpy_int32_t; +/* "numpy.pxd":726 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * #ctypedef npy_int96 int96_t + * #ctypedef npy_int128 int128_t + */ typedef npy_int64 __pyx_t_5numpy_int64_t; +/* "numpy.pxd":730 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; +/* "numpy.pxd":731 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t + */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; +/* "numpy.pxd":732 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * #ctypedef npy_uint96 uint96_t + */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; +/* "numpy.pxd":733 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * #ctypedef npy_uint96 uint96_t + * #ctypedef npy_uint128 uint128_t + */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; +/* "numpy.pxd":737 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t + */ typedef npy_float32 __pyx_t_5numpy_float32_t; +/* "numpy.pxd":738 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t + */ typedef npy_float64 __pyx_t_5numpy_float64_t; +/* "numpy.pxd":747 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t + */ typedef npy_long __pyx_t_5numpy_int_t; +/* "numpy.pxd":748 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong longlong_t + * + */ typedef npy_longlong __pyx_t_5numpy_long_t; +/* "numpy.pxd":749 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_ulong uint_t + */ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "numpy.pxd":751 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t + */ typedef npy_ulong __pyx_t_5numpy_uint_t; +/* "numpy.pxd":752 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; +/* "numpy.pxd":753 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t + */ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "numpy.pxd":755 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "numpy.pxd":756 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "numpy.pxd":758 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t + */ typedef npy_double __pyx_t_5numpy_float_t; +/* "numpy.pxd":759 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ typedef npy_double __pyx_t_5numpy_double_t; +/* "numpy.pxd":760 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cfloat cfloat_t + */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif + +/*--- Type declarations ---*/ +struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format; +struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile; + +/* "numpy.pxd":762 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t + */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; +/* "numpy.pxd":763 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; +/* "numpy.pxd":764 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cdouble complex_t + */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":384 - * return majors +/* "numpy.pxd":766 + * ctypedef npy_clongdouble clongdouble_t * - * cdef class Sndfile: # <<<<<<<<<<<<<< - * """\ - * Sndfile is the core class to read/write audio files. Once an instance is + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; -struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile { - PyObject_HEAD - struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_vtab; - SNDFILE *hdl; - PyObject *filename; - int fd; - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *_format; - int _mode; - SF_INFO _sfinfo; -}; - -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":130 +/* "audiolab/pysndfile/_sndfile.pyx":132 * return int(major), int(minor), int(micro), prerelease * * cdef class Format: # <<<<<<<<<<<<<< * """\ * This class represents an audio file format. It knows about audio file */ - -struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format { +struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format { PyObject_HEAD - struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_vtab; + struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Format *__pyx_vtab; SF_INFO _sf_info; int _format_raw_int; PyObject *_type; @@ -373,740 +673,1202 @@ struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format { }; -struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Format { - int (*format_int)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *); - int (*file_format_int)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *); - int (*encoding_int)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *); - int (*endianness_int)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *); - int (*_is_equal)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *, struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *); -}; -static struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Format; - - -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":384 +/* "audiolab/pysndfile/_sndfile.pyx":386 * return majors * * cdef class Sndfile: # <<<<<<<<<<<<<< * """\ * Sndfile is the core class to read/write audio files. Once an instance is */ - -struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile { - PyObject *(*_close)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *); - sf_count_t (*_get_nframes)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *); - PyObject *(*read_frames_double)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); - PyObject *(*read_frames_float)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); - PyObject *(*read_frames_int)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); - PyObject *(*read_frames_short)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); - sf_count_t (*write_frames_double)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); - sf_count_t (*write_frames_float)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); - sf_count_t (*write_frames_int)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); - sf_count_t (*write_frames_short)(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); +struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile { + PyObject_HEAD + struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_vtab; + SNDFILE *hdl; + PyObject *filename; + int fd; + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *_format; + int _mode; + SF_INFO _sfinfo; }; -static struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile; -/* Module declarations from python_buffer */ -/* Module declarations from stdlib */ -/* Module declarations from numpy */ -/* Module declarations from numpy */ +struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile { + PyObject *(*_close)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *); + sf_count_t (*_get_nframes)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *); + PyObject *(*read_frames_double)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); + PyObject *(*read_frames_float)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); + PyObject *(*read_frames_int)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); + PyObject *(*read_frames_short)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t); + sf_count_t (*write_frames_double)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); + sf_count_t (*write_frames_float)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); + sf_count_t (*write_frames_int)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); + sf_count_t (*write_frames_short)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t); +}; +static struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Sndfile; -static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; -static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *); /*proto*/ -/* Module declarations from scikits.audiolab.pysndfile.sndfile */ - -/* Module declarations from scikits.audiolab.pysndfile._sndfile */ - -static PyTypeObject *__pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format = 0; -static PyTypeObject *__pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile = 0; -static PyObject *__pyx_k_92; -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_int(int); /*proto*/ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__major_formats_int(void); /*proto*/ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format(int); /*proto*/ - - -/* Implementation of scikits.audiolab.pysndfile._sndfile */ -static char __pyx_k_23[] = "File format (wav, etc...)."; -static char __pyx_k_24[] = "File encoding (pcm16, etc...)."; -static char __pyx_k_25[] = "File endianness (file, little, etc...)."; -static char __pyx_k_26[] = "File format description: the full description from sndfile."; -static char __pyx_k_27[] = "File encoding description: the full description from sndfile."; -static char __pyx_k_28[] = "Number of frames of the file."; -static char __pyx_k_29[] = "Sampling rate (in Hz)."; -static char __pyx_k_30[] = "Number of channels."; -static char __pyx_k_31[] = "Format instance attached to the Sndfile instance."; -static PyObject *__pyx_int_0x0060; -static PyObject *__pyx_int_0x170000; -static PyObject *__pyx_int_0x180000; -static PyObject *__pyx_int_0x190000; -static PyObject *__pyx_int_0x200000; -static PyObject *__pyx_int_0x210000; -static PyObject *__pyx_int_0x220000; -static PyObject *__pyx_int_0; -static PyObject *__pyx_int_1; -static char __pyx_k___init__[] = "__init__"; -static PyObject *__pyx_kp___init__; -static char __pyx_k___copy__[] = "__copy__"; -static PyObject *__pyx_kp___copy__; -static char __pyx_k___deepcopy__[] = "__deepcopy__"; -static PyObject *__pyx_kp___deepcopy__; -static char __pyx_k___richcmp__[] = "__richcmp__"; -static PyObject *__pyx_kp___richcmp__; -static char __pyx_k___str__[] = "__str__"; -static PyObject *__pyx_kp___str__; -static char __pyx_k___repr__[] = "__repr__"; -static PyObject *__pyx_kp___repr__; -static char __pyx_k___dealloc__[] = "__dealloc__"; -static PyObject *__pyx_kp___dealloc__; -static char __pyx_k_close[] = "close"; -static PyObject *__pyx_kp_close; -static char __pyx_k_sync[] = "sync"; -static PyObject *__pyx_kp_sync; -static char __pyx_k_read_frames[] = "read_frames"; -static PyObject *__pyx_kp_read_frames; -static char __pyx_k_write_frames[] = "write_frames"; -static PyObject *__pyx_kp_write_frames; -static char __pyx_k_seek[] = "seek"; -static PyObject *__pyx_kp_seek; -static char __pyx_k_type[] = "type"; -static PyObject *__pyx_kp_type; -static char __pyx_k_encoding[] = "encoding"; -static PyObject *__pyx_kp_encoding; -static char __pyx_k_endianness[] = "endianness"; -static PyObject *__pyx_kp_endianness; -static char __pyx_k_self[] = "self"; -static PyObject *__pyx_kp_self; -static char __pyx_k_other[] = "other"; -static PyObject *__pyx_kp_other; -static char __pyx_k_op[] = "op"; -static PyObject *__pyx_kp_op; -static char __pyx_k_major[] = "major"; -static PyObject *__pyx_kp_major; -static char __pyx_k_filename[] = "filename"; -static PyObject *__pyx_kp_filename; -static char __pyx_k_mode[] = "mode"; -static PyObject *__pyx_kp_mode; -static char __pyx_k_format[] = "format"; -static PyObject *__pyx_kp_format; -static char __pyx_k_channels[] = "channels"; -static PyObject *__pyx_kp_channels; -static char __pyx_k_samplerate[] = "samplerate"; -static PyObject *__pyx_kp_samplerate; -static char __pyx_k_nframes[] = "nframes"; -static PyObject *__pyx_kp_nframes; -static char __pyx_k_dtype[] = "dtype"; -static PyObject *__pyx_kp_dtype; -static char __pyx_k_input[] = "input"; -static PyObject *__pyx_kp_input; -static char __pyx_k_offset[] = "offset"; -static PyObject *__pyx_kp_offset; -static char __pyx_k_whence[] = "whence"; -static PyObject *__pyx_kp_whence; -static char __pyx_k_numpy[] = "numpy"; -static PyObject *__pyx_kp_numpy; -static char __pyx_k_np[] = "np"; -static PyObject *__pyx_kp_np; -static char __pyx_k_warnings[] = "warnings"; -static PyObject *__pyx_kp_warnings; -static char __pyx_k_copy[] = "copy"; -static PyObject *__pyx_kp_copy; -static char __pyx_k_32[] = "pcms8"; -static PyObject *__pyx_kp_32; -static char __pyx_k_33[] = "pcm16"; -static PyObject *__pyx_kp_33; -static char __pyx_k_34[] = "pcm24"; -static PyObject *__pyx_kp_34; -static char __pyx_k_35[] = "pcm32"; -static PyObject *__pyx_kp_35; -static char __pyx_k_36[] = "pcmu8"; -static PyObject *__pyx_kp_36; -static char __pyx_k_37[] = "float32"; -static PyObject *__pyx_kp_37; -static char __pyx_k_38[] = "float64"; -static PyObject *__pyx_kp_38; -static char __pyx_k_39[] = "ulaw"; -static PyObject *__pyx_kp_39; -static char __pyx_k_40[] = "alaw"; -static PyObject *__pyx_kp_40; -static char __pyx_k_41[] = "ima_adpcm"; -static PyObject *__pyx_kp_41; -static char __pyx_k_42[] = "ms_adpcm"; -static PyObject *__pyx_kp_42; -static char __pyx_k_43[] = "gsm610"; -static PyObject *__pyx_kp_43; -static char __pyx_k_44[] = "vox_adpcm"; -static PyObject *__pyx_kp_44; -static char __pyx_k_45[] = "g721_32"; -static PyObject *__pyx_kp_45; -static char __pyx_k_46[] = "g723_24"; -static PyObject *__pyx_kp_46; -static char __pyx_k_47[] = "g723_40"; -static PyObject *__pyx_kp_47; -static char __pyx_k_48[] = "dww12"; -static PyObject *__pyx_kp_48; -static char __pyx_k_49[] = "dww16"; -static PyObject *__pyx_kp_49; -static char __pyx_k_50[] = "dww24"; -static PyObject *__pyx_kp_50; -static char __pyx_k_51[] = "dwwN"; -static PyObject *__pyx_kp_51; -static char __pyx_k_52[] = "dpcm8"; -static PyObject *__pyx_kp_52; -static char __pyx_k_53[] = "dpcm16"; -static PyObject *__pyx_kp_53; -static char __pyx_k__SNDFILE_ENCODING[] = "_SNDFILE_ENCODING"; -static PyObject *__pyx_kp__SNDFILE_ENCODING; -static char __pyx_k_54[] = "wav"; -static PyObject *__pyx_kp_54; -static char __pyx_k_55[] = "aiff"; -static PyObject *__pyx_kp_55; -static char __pyx_k_56[] = "au"; -static PyObject *__pyx_kp_56; -static char __pyx_k_57[] = "raw"; -static PyObject *__pyx_kp_57; -static char __pyx_k_58[] = "paf"; -static PyObject *__pyx_kp_58; -static char __pyx_k_59[] = "svx"; -static PyObject *__pyx_kp_59; -static char __pyx_k_60[] = "nist"; -static PyObject *__pyx_kp_60; -static char __pyx_k_61[] = "voc"; -static PyObject *__pyx_kp_61; -static char __pyx_k_62[] = "ircam"; -static PyObject *__pyx_kp_62; -static char __pyx_k_63[] = "wav64"; -static PyObject *__pyx_kp_63; -static char __pyx_k_64[] = "mat4"; -static PyObject *__pyx_kp_64; -static char __pyx_k_65[] = "mat5"; -static PyObject *__pyx_kp_65; -static char __pyx_k_66[] = "pvf"; -static PyObject *__pyx_kp_66; -static char __pyx_k_67[] = "xi"; -static PyObject *__pyx_kp_67; -static char __pyx_k_68[] = "htk"; -static PyObject *__pyx_kp_68; -static char __pyx_k_69[] = "sds"; -static PyObject *__pyx_kp_69; -static char __pyx_k_70[] = "avr"; -static PyObject *__pyx_kp_70; -static char __pyx_k_71[] = "wavex"; -static PyObject *__pyx_kp_71; -static char __pyx_k_72[] = "sd2"; -static PyObject *__pyx_kp_72; -static char __pyx_k_73[] = "_SNDFILE_FILE_FORMAT"; -static PyObject *__pyx_kp_73; -static char __pyx_k_74[] = "vorbis"; -static PyObject *__pyx_kp_74; -static char __pyx_k_75[] = "flac"; -static PyObject *__pyx_kp_75; -static char __pyx_k_76[] = "caf"; -static PyObject *__pyx_kp_76; -static char __pyx_k_77[] = "wve"; -static PyObject *__pyx_kp_77; -static char __pyx_k_78[] = "ogg"; -static PyObject *__pyx_kp_78; -static char __pyx_k_79[] = "mpc2k"; -static PyObject *__pyx_kp_79; -static char __pyx_k_80[] = "rf64"; -static PyObject *__pyx_kp_80; -static char __pyx_k_81[] = "file"; -static PyObject *__pyx_kp_81; -static char __pyx_k_82[] = "little"; -static PyObject *__pyx_kp_82; -static char __pyx_k_83[] = "big"; -static PyObject *__pyx_kp_83; -static char __pyx_k_84[] = "cpu"; -static PyObject *__pyx_kp_84; -static char __pyx_k__SNDFILE_ENDIAN[] = "_SNDFILE_ENDIAN"; -static PyObject *__pyx_kp__SNDFILE_ENDIAN; -static char __pyx_k_85[] = "_ENUM_TO_STR_ENCODING"; -static PyObject *__pyx_kp_85; -static char __pyx_k_j[] = "j"; -static PyObject *__pyx_kp_j; -static char __pyx_k_i[] = "i"; -static PyObject *__pyx_kp_i; -static char __pyx_k_items[] = "items"; -static PyObject *__pyx_kp_items; -static char __pyx_k_86[] = "_ENUM_TO_STR_FILE_FORMAT"; -static PyObject *__pyx_kp_86; -static char __pyx_k__ENUM_TO_STR_ENDIAN[] = "_ENUM_TO_STR_ENDIAN"; -static PyObject *__pyx_kp__ENUM_TO_STR_ENDIAN; -static char __pyx_k_87[] = "wav"; -static PyObject *__pyx_kp_87; -static char __pyx_k_88[] = "pcm16"; -static PyObject *__pyx_kp_88; -static char __pyx_k_89[] = "file"; -static PyObject *__pyx_kp_89; -static char __pyx_k_90[] = "r"; -static PyObject *__pyx_kp_90; -static char __pyx_k_91[] = "float64"; -static PyObject *__pyx_kp_91; -static char __pyx_k_93[] = "rw"; -static PyObject *__pyx_kp_93; -static char __pyx_k_RuntimeError[] = "RuntimeError"; -static PyObject *__pyx_kp_RuntimeError; -static char __pyx_k_split[] = "split"; -static PyObject *__pyx_kp_split; -static char __pyx_k_ValueError[] = "ValueError"; -static PyObject *__pyx_kp_ValueError; -static char __pyx_k_97[] = "pre"; -static PyObject *__pyx_kp_97; -static char __pyx_k_KeyError[] = "KeyError"; -static PyObject *__pyx_kp_KeyError; -static char __pyx_k___class__[] = "__class__"; -static PyObject *__pyx_kp___class__; -static char __pyx_k_NotImplementedError[] = "NotImplementedError"; -static PyObject *__pyx_kp_NotImplementedError; -static char __pyx_k_TypeError[] = "TypeError"; -static PyObject *__pyx_kp_TypeError; -static char __pyx_k_join[] = "join"; -static PyObject *__pyx_kp_join; -static char __pyx_k_has_key[] = "has_key"; -static PyObject *__pyx_kp_has_key; -static char __pyx_k_warn[] = "warn"; -static PyObject *__pyx_kp_warn; -static char __pyx_k_append[] = "append"; -static PyObject *__pyx_kp_append; -static char __pyx_k_115[] = "r"; -static PyObject *__pyx_kp_115; -static char __pyx_k_116[] = "w"; -static PyObject *__pyx_kp_116; -static char __pyx_k_118[] = "rw"; -static PyObject *__pyx_kp_118; -static char __pyx_k_121[] = "r"; -static PyObject *__pyx_kp_121; -static char __pyx_k_IOError[] = "IOError"; -static PyObject *__pyx_kp_IOError; -static char __pyx_k_129[] = "r"; -static PyObject *__pyx_kp_129; -static char __pyx_k_file_format[] = "file_format"; -static PyObject *__pyx_kp_file_format; -static char __pyx_k_144[] = "float32"; -static PyObject *__pyx_kp_144; -static char __pyx_k_145[] = "int32"; -static PyObject *__pyx_kp_145; -static char __pyx_k_146[] = "int16"; -static PyObject *__pyx_kp_146; -static char __pyx_k_shape[] = "shape"; -static PyObject *__pyx_kp_shape; -static char __pyx_k_empty[] = "empty"; -static PyObject *__pyx_kp_empty; -static char __pyx_k_order[] = "order"; -static PyObject *__pyx_kp_order; -static char __pyx_k_148[] = "C"; -static PyObject *__pyx_kp_148; -static char __pyx_k_150[] = "F"; -static PyObject *__pyx_kp_150; -static char __pyx_k_int[] = "int"; -static PyObject *__pyx_kp_int; -static char __pyx_k_152[] = "F"; -static PyObject *__pyx_kp_152; -static char __pyx_k_short[] = "short"; -static PyObject *__pyx_kp_short; -static char __pyx_k_154[] = "F"; -static PyObject *__pyx_kp_154; -static char __pyx_k_size[] = "size"; -static PyObject *__pyx_kp_size; -static char __pyx_k_require[] = "require"; -static PyObject *__pyx_kp_require; -static char __pyx_k_requirements[] = "requirements"; -static PyObject *__pyx_kp_requirements; -static char __pyx_k_158[] = "C"; -static PyObject *__pyx_kp_158; -static char __pyx_k_Exception[] = "Exception"; -static PyObject *__pyx_kp_Exception; -static char __pyx_k_161[] = "rw"; -static PyObject *__pyx_kp_161; -static char __pyx_k_162[] = "r"; -static PyObject *__pyx_kp_162; -static char __pyx_k_163[] = "w"; -static PyObject *__pyx_kp_163; -static PyObject *__pyx_builtin_RuntimeError; -static PyObject *__pyx_builtin_ValueError; -static PyObject *__pyx_builtin_KeyError; -static PyObject *__pyx_builtin_NotImplementedError; -static PyObject *__pyx_builtin_TypeError; -static PyObject *__pyx_builtin_IOError; -static PyObject *__pyx_builtin_Exception; -static PyObject *__pyx_kp_94; -static PyObject *__pyx_kp_95; -static PyObject *__pyx_kp_96; -static char __pyx_k_94[] = "Error while getting version of libsndfile"; -static char __pyx_k_95[] = "-"; -static char __pyx_k_96[] = "."; -static PyObject *__pyx_kp_98; -static PyObject *__pyx_kp_99; -static PyObject *__pyx_kp_100; -static PyObject *__pyx_kp_101; -static PyObject *__pyx_kp_102; -static PyObject *__pyx_kp_103; -static PyObject *__pyx_kp_104; -static PyObject *__pyx_kp_105; -static char __pyx_k_98[] = "file format %s not recognized"; -static char __pyx_k_99[] = "endianness %s not recognized"; -static char __pyx_k_100[] = "encoding %s not recognized"; -static char __pyx_k_101[] = "The combination (type=%s|encoding=%s|endianness=%s) you requested is not supported. You can use available_formats and available_encodings functions to query which formats and encodings are available."; -static char __pyx_k_102[] = "Could not get format string for format %d, "; -static char __pyx_k_103[] = "please report thisproblem to the maintainer"; -static char __pyx_k_104[] = "Could not get format string for format %d, "; -static char __pyx_k_105[] = "please report thisproblem to the maintainer"; -static PyObject *__pyx_kp_106; -static PyObject *__pyx_kp_107; -static PyObject *__pyx_kp_108; -static PyObject *__pyx_kp_109; -static char __pyx_k_106[] = "Major Format: %s"; -static char __pyx_k_107[] = "Encoding Format: %s"; -static char __pyx_k_108[] = "Endianness: %s"; -static char __pyx_k_109[] = "\n"; -static PyObject *__pyx_kp_110; -static char __pyx_k_110[] = "Format %#10x supported by libsndfile but not yet supported by audiolab"; -static PyObject *__pyx_kp_111; -static PyObject *__pyx_kp_112; -static char __pyx_k_111[] = "Unknown file format %s"; -static char __pyx_k_112[] = "Encoding %#10x supported by libsndfile but not yet supported by audiolab"; -static PyObject *__pyx_kp_113; -static char __pyx_k_113[] = "Error while calling sf_command"; -static PyObject *__pyx_kp_114; -static char __pyx_k_114[] = "Error while calling sf_command"; -static PyObject *__pyx_kp_117; -static PyObject *__pyx_kp_119; -static PyObject *__pyx_kp_120; -static PyObject *__pyx_kp_122; -static PyObject *__pyx_kp_123; -static PyObject *__pyx_kp_124; -static PyObject *__pyx_kp_125; -static PyObject *__pyx_kp_126; -static PyObject *__pyx_kp_127; -static PyObject *__pyx_kp_128; -static char __pyx_k_117[] = "For write mode, you should providea format argument !"; -static char __pyx_k_119[] = "For write mode, you should providea format argument !"; -static char __pyx_k_120[] = "mode %s not recognized"; -static char __pyx_k_122[] = "Bad value of samplerate (%d) or channels (%d)"; -static char __pyx_k_123[] = "Bad format specification: check arguments."; -static char __pyx_k_124[] = ""; -static char __pyx_k_125[] = "error while opening file %s\n\t-> "; -static char __pyx_k_126[] = "error while opening file descriptor %d\n\t->"; -static char __pyx_k_127[] = "\n(Check that the mode argument passed to sndfile is the same than the one used\nwhen getting the file descriptor, eg do not pass 'r' to sndfile if you\npassed 'write' to the method you used to get the file descriptor. If you are on\nwin32, you are out of luck, because its implementation of POSIX open is\nbroken)"; -static char __pyx_k_128[] = "error while opening %s\n\t->%s"; -static PyObject *__pyx_kp_130; -static char __pyx_k_130[] = "Sorry, getting the current number offrames in write modes is not supported yet"; -static PyObject *__pyx_kp_131; -static PyObject *__pyx_kp_132; -static PyObject *__pyx_kp_133; -static PyObject *__pyx_kp_134; -static PyObject *__pyx_kp_135; -static PyObject *__pyx_kp_136; -static PyObject *__pyx_kp_137; -static PyObject *__pyx_kp_138; -static PyObject *__pyx_kp_139; -static PyObject *__pyx_kp_140; -static PyObject *__pyx_kp_141; -static PyObject *__pyx_kp_142; -static char __pyx_k_131[] = "----------------------------------------"; -static char __pyx_k_132[] = "File : %d (opened by file descriptor)"; -static char __pyx_k_133[] = "File : %s"; -static char __pyx_k_134[] = "Channels : %d"; -static char __pyx_k_135[] = "Sample rate : %d"; -static char __pyx_k_136[] = "Frames : %d"; -static char __pyx_k_137[] = "Raw Format : %#010x"; -static char __pyx_k_138[] = "File format : %s"; -static char __pyx_k_139[] = "Encoding : %s"; -static char __pyx_k_140[] = "Endianness : %s"; -static char __pyx_k_141[] = "Seekable : %s\n"; -static char __pyx_k_142[] = "\n"; -static PyObject *__pyx_kp_143; -static PyObject *__pyx_kp_147; -static char __pyx_k_143[] = "number of frames has to be >= 0 (was %d)"; -static char __pyx_k_147[] = "Sorry, dtype %s not supported"; -static PyObject *__pyx_kp_149; -static char __pyx_k_149[] = "Asked %d frames, read %d"; -static PyObject *__pyx_kp_151; -static char __pyx_k_151[] = "Asked %d frames, read %d"; -static PyObject *__pyx_kp_153; -static char __pyx_k_153[] = "Asked %d frames, read %d"; -static PyObject *__pyx_kp_155; -static char __pyx_k_155[] = "Asked %d frames, read %d"; -static PyObject *__pyx_kp_156; -static PyObject *__pyx_kp_157; -static PyObject *__pyx_kp_159; -static PyObject *__pyx_kp_160; -static char __pyx_k_156[] = "Expect array of rank 2, got %d"; -static char __pyx_k_157[] = "Expected %d channels, got %d"; -static char __pyx_k_159[] = "type of input &s not understood"; -static char __pyx_k_160[] = "write %d frames, expected to write %d"; -static PyObject *__pyx_kp_164; -static PyObject *__pyx_kp_165; -static char __pyx_k_164[] = "mode should be one of 'r', 'w' or 'rw' only"; -static char __pyx_k_165[] = "Error while seeking, libsndfile error is %s"; -static PyObject *__pyx_kp_166; -static char __pyx_k_166[] = "Inconsistent format: this is a bug"; -static char __pyx_k___getbuffer__[] = "__getbuffer__"; -static PyObject *__pyx_kp___getbuffer__; -static char __pyx_k___releasebuffer__[] = "__releasebuffer__"; -static PyObject *__pyx_kp___releasebuffer__; -static char __pyx_k_info[] = "info"; -static PyObject *__pyx_kp_info; -static char __pyx_k_flags[] = "flags"; -static PyObject *__pyx_kp_flags; -static char __pyx_k_itervalues[] = "itervalues"; -static PyObject *__pyx_kp_itervalues; -static PyObject *__pyx_kp_1; -static PyObject *__pyx_kp_2; -static PyObject *__pyx_kp_20; -static char __pyx_k_1[] = "ndarray is not C contiguous"; -static char __pyx_k_2[] = "ndarray is not Fortran contiguous"; -static char __pyx_k_3[] = "b"; -static char __pyx_k_4[] = "B"; -static char __pyx_k_5[] = "h"; -static char __pyx_k_6[] = "H"; -static char __pyx_k_7[] = "i"; -static char __pyx_k_8[] = "I"; -static char __pyx_k_9[] = "l"; -static char __pyx_k_10[] = "L"; -static char __pyx_k_11[] = "q"; -static char __pyx_k_12[] = "Q"; -static char __pyx_k_13[] = "f"; -static char __pyx_k_14[] = "d"; -static char __pyx_k_15[] = "g"; -static char __pyx_k_16[] = "Zf"; -static char __pyx_k_17[] = "Zd"; -static char __pyx_k_18[] = "Zg"; -static char __pyx_k_19[] = "O"; -static char __pyx_k_20[] = "unknown dtype code in numpy.pxd (%d)"; -static PyObject *__pyx_kp_21; -static PyObject *__pyx_kp_22; -static char __pyx_k_21[] = "Format string allocated too short."; -static char __pyx_k_22[] = "unknown dtype code in numpy.pxd (%d)"; - -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":106 - * dict([(i, j) for j, i in _SNDFILE_ENDIAN.items()]) + +/* "audiolab/pysndfile/_sndfile.pyx":132 + * return int(major), int(minor), int(micro), prerelease * - * def sndfile_version(): # <<<<<<<<<<<<<< - * """Return version of sndfile.""" - * cdef int st + * cdef class Format: # <<<<<<<<<<<<<< + * """\ + * This class represents an audio file format. It knows about audio file */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_version(PyObject *__pyx_self, PyObject *unused); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_version[] = "sndfile_version()\nReturn version of sndfile."; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_version(PyObject *__pyx_self, PyObject *unused) { - int __pyx_v_st; - char __pyx_v_buff[128]; - PyObject *__pyx_v_ver; - PyObject *__pyx_v_version; - PyObject *__pyx_v_prerelease; - PyObject *__pyx_v_major; - PyObject *__pyx_v_minor; - PyObject *__pyx_v_micro; - PyObject *__pyx_v_e; - PyObject *__pyx_v_i; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - int __pyx_2; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - PyObject *__pyx_5 = 0; - PyObject *__pyx_6 = 0; - PyObject *__pyx_7 = 0; - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - __pyx_self = __pyx_self; - __pyx_v_ver = Py_None; Py_INCREF(Py_None); - __pyx_v_version = Py_None; Py_INCREF(Py_None); - __pyx_v_prerelease = Py_None; Py_INCREF(Py_None); - __pyx_v_major = Py_None; Py_INCREF(Py_None); - __pyx_v_minor = Py_None; Py_INCREF(Py_None); - __pyx_v_micro = Py_None; Py_INCREF(Py_None); - __pyx_v_e = Py_None; Py_INCREF(Py_None); - __pyx_v_i = Py_None; Py_INCREF(Py_None); - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":111 - * cdef char buff[128] - * +struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Format { + int (*format_int)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *); + int (*file_format_int)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *); + int (*encoding_int)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *); + int (*endianness_int)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *); + int (*_is_equal)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *, struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *); +}; +static struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Format *__pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Format; +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/ + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil) \ + if (acquire_gil) { \ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ + PyGILState_Release(__pyx_gilstate_save); \ + } else { \ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil) \ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext() \ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif /* CYTHON_REFNANNY */ +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ + +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_List_Fast(o, i) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { +#if CYTHON_COMPILING_IN_CPYTHON + if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { + PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Tuple_Fast(o, i) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { +#if CYTHON_COMPILING_IN_CPYTHON + if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { + PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Fast(o, i) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { +#if CYTHON_COMPILING_IN_CPYTHON + if (PyList_CheckExact(o)) { + Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { /* inlined PySequence_GetItem() */ + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (unlikely(l < 0)) return NULL; + i += l; + } + return m->sq_item(o, i); + } + } +#else + if (PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ + +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ + +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ + +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ + const char* function_name); /*proto*/ + +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact); /*proto*/ + +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + +static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); + +static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; +static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/ + +static CYTHON_INLINE __quad_t __Pyx_PyInt_from_py___quad_t(PyObject *); + +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py___quad_t(__quad_t); + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eqf(a, b) ((a)==(b)) + #define __Pyx_c_sumf(a, b) ((a)+(b)) + #define __Pyx_c_difff(a, b) ((a)-(b)) + #define __Pyx_c_prodf(a, b) ((a)*(b)) + #define __Pyx_c_quotf(a, b) ((a)/(b)) + #define __Pyx_c_negf(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zerof(z) ((z)==(float)0) + #define __Pyx_c_conjf(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_absf(z) (::std::abs(z)) + #define __Pyx_c_powf(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zerof(z) ((z)==0) + #define __Pyx_c_conjf(z) (conjf(z)) + #if 1 + #define __Pyx_c_absf(z) (cabsf(z)) + #define __Pyx_c_powf(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq(a, b) ((a)==(b)) + #define __Pyx_c_sum(a, b) ((a)+(b)) + #define __Pyx_c_diff(a, b) ((a)-(b)) + #define __Pyx_c_prod(a, b) ((a)*(b)) + #define __Pyx_c_quot(a, b) ((a)/(b)) + #define __Pyx_c_neg(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero(z) ((z)==(double)0) + #define __Pyx_c_conj(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs(z) (::std::abs(z)) + #define __Pyx_c_pow(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero(z) ((z)==0) + #define __Pyx_c_conj(z) (conj(z)) + #if 1 + #define __Pyx_c_abs(z) (cabs(z)) + #define __Pyx_c_pow(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); + +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); + +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); + +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); + +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); + +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); + +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); + +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); + +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); + +static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); + +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); + +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); + +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); + +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); + +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); + +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); + +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename); /*proto*/ + +static int __Pyx_check_binary_version(void); + +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ + +#if !defined(__Pyx_PyIdentifier_FromString) +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) +#else + #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) +#endif +#endif + +static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ + +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ + +typedef struct { + int code_line; + PyCodeObject* code_object; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); /*proto*/ + +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ + + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'libc.stdlib' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ + +/* Module declarations from 'audiolab.pysndfile.sndfile' */ + +/* Module declarations from 'audiolab.pysndfile._sndfile' */ +static PyTypeObject *__pyx_ptype_8audiolab_9pysndfile_8_sndfile_Format = 0; +static PyTypeObject *__pyx_ptype_8audiolab_9pysndfile_8_sndfile_Sndfile = 0; +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile__sub_formats_int(int); /*proto*/ +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile__major_formats_int(void); /*proto*/ +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile_int_to_format(int); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t = { "int16_t", NULL, sizeof(__pyx_t_5numpy_int16_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int16_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int16_t), 0 }; +#define __Pyx_MODULE_NAME "audiolab.pysndfile._sndfile" +int __pyx_module_is_main_audiolab__pysndfile___sndfile = 0; + +/* Implementation of 'audiolab.pysndfile._sndfile' */ +static PyObject *__pyx_builtin_RuntimeError; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_KeyError; +static PyObject *__pyx_builtin_NotImplementedError; +static PyObject *__pyx_builtin_TypeError; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_IOError; +static PyObject *__pyx_builtin_Exception; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_sndfile_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static int __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format___init__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self, PyObject *__pyx_v_type, PyObject *__pyx_v_encoding, PyObject *__pyx_v_endianness); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_11file_format___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_8encoding___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_10endianness___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_2__copy__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_4__deepcopy__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_6__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_8__str__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_10__repr__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_2available_file_formats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_4available_encodings(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_major); /* proto */ +static int __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_format, int __pyx_v_channels, int __pyx_v_samplerate); /* proto */ +static void __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_2__dealloc__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_4close(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_6sync(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8__str__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10read_frames(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes, PyObject *__pyx_v_dtype); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_12write_frames(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input); /* proto */ +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_14seek(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_offset, int __pyx_v_whence, PyObject *__pyx_v_mode); /* proto */ +static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ +static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ +static char __pyx_k_1[] = "Error while getting version of libsndfile"; +static char __pyx_k_3[] = "-"; +static char __pyx_k_5[] = "."; +static char __pyx_k_8[] = "_SNDFILE_FILE_FORMAT"; +static char __pyx_k_9[] = "file format %s not recognized"; +static char __pyx_k_10[] = "endianness %s not recognized"; +static char __pyx_k_11[] = "encoding %s not recognized"; +static char __pyx_k_12[] = "The combination (type=%s|encoding=%s|endianness=%s) you requested is not supported. You can use available_formats and available_encodings functions to query which formats and encodings are available."; +static char __pyx_k_13[] = "Could not get format string for format %d, "; +static char __pyx_k_14[] = "please report thisproblem to the maintainer"; +static char __pyx_k_15[] = "Major Format: %s"; +static char __pyx_k_16[] = "Encoding Format: %s"; +static char __pyx_k_17[] = "Endianness: %s"; +static char __pyx_k_18[] = "\n"; +static char __pyx_k_19[] = "_ENUM_TO_STR_FILE_FORMAT"; +static char __pyx_k_20[] = "Format %#10x supported by libsndfile but not yet supported by audiolab"; +static char __pyx_k_21[] = "Unknown file format %s"; +static char __pyx_k_22[] = "_ENUM_TO_STR_ENCODING"; +static char __pyx_k_23[] = "Encoding %#10x supported by libsndfile but not yet supported by audiolab"; +static char __pyx_k_24[] = "Error while calling sf_command"; +static char __pyx_k_27[] = "For write mode, you should providea format argument !"; +static char __pyx_k_28[] = "mode %s not recognized"; +static char __pyx_k_29[] = "Bad value of samplerate (%d) or channels (%d)"; +static char __pyx_k_30[] = "Bad format specification: check arguments."; +static char __pyx_k_32[] = ""; +static char __pyx_k_33[] = "error while opening file %s\n\t-> "; +static char __pyx_k_34[] = "error while opening file descriptor %d\n\t->"; +static char __pyx_k_35[] = "\n(Check that the mode argument passed to sndfile is the same as the one used\nwhen getting the file descriptor, eg do not pass 'r' to sndfile if you\npassed 'write' to the method you used to get the file descriptor. If you are on\nwin32, you are out of luck, because its implementation of POSIX open is\nbroken)"; +static char __pyx_k_36[] = "error while opening %s\n\t->%s"; +static char __pyx_k_37[] = "Sorry, getting the current number offrames in write modes is not supported yet"; +static char __pyx_k_39[] = "----------------------------------------"; +static char __pyx_k_40[] = "File : %d (opened by file descriptor)"; +static char __pyx_k_41[] = "File : %s"; +static char __pyx_k_42[] = "Channels : %d"; +static char __pyx_k_43[] = "Sample rate : %d"; +static char __pyx_k_44[] = "Frames : %d"; +static char __pyx_k_45[] = "Raw Format : %#010x"; +static char __pyx_k_46[] = "File format : %s"; +static char __pyx_k_47[] = "Encoding : %s"; +static char __pyx_k_48[] = "Endianness : %s"; +static char __pyx_k_49[] = "Seekable : %s\n"; +static char __pyx_k_51[] = "number of frames has to be >= 0 (was %d)"; +static char __pyx_k_52[] = "Sorry, dtype %s not supported"; +static char __pyx_k_55[] = "Asked %d frames, read %d"; +static char __pyx_k_58[] = "Expect array of rank 2, got %d"; +static char __pyx_k_59[] = "Expected %d channels, got %d"; +static char __pyx_k_60[] = "type of input &s not understood"; +static char __pyx_k_61[] = "write %d frames, expected to write %d"; +static char __pyx_k_62[] = "mode should be one of 'r', 'w' or 'rw' only"; +static char __pyx_k_64[] = "Error while seeking, libsndfile error is %s"; +static char __pyx_k_65[] = "Inconsistent format: this is a bug"; +static char __pyx_k_67[] = "ndarray is not C contiguous"; +static char __pyx_k_69[] = "ndarray is not Fortran contiguous"; +static char __pyx_k_71[] = "Non-native byte order not supported"; +static char __pyx_k_73[] = "unknown dtype code in numpy.pxd (%d)"; +static char __pyx_k_74[] = "Format string allocated too short, see comment in numpy.pxd"; +static char __pyx_k_77[] = "Format string allocated too short."; +static char __pyx_k_79[] = "File format (wav, etc...)."; +static char __pyx_k_80[] = "File encoding (pcm16, etc...)."; +static char __pyx_k_81[] = "File endianness (file, little, etc...)."; +static char __pyx_k_82[] = "File format description: the full description from sndfile."; +static char __pyx_k_83[] = "File encoding description: the full description from sndfile."; +static char __pyx_k_84[] = "Number of frames of the file."; +static char __pyx_k_85[] = "Sampling rate (in Hz)."; +static char __pyx_k_86[] = "Number of channels."; +static char __pyx_k_87[] = "Format instance attached to the Sndfile instance."; +static char __pyx_k_90[] = "/home/dan/dev/github/audiolab/audiolab/pysndfile/_sndfile.pyx"; +static char __pyx_k_91[] = "audiolab.pysndfile._sndfile"; +static char __pyx_k_94[] = "available_file_formats"; +static char __pyx_k__B[] = "B"; +static char __pyx_k__C[] = "C"; +static char __pyx_k__H[] = "H"; +static char __pyx_k__I[] = "I"; +static char __pyx_k__L[] = "L"; +static char __pyx_k__O[] = "O"; +static char __pyx_k__Q[] = "Q"; +static char __pyx_k__b[] = "b"; +static char __pyx_k__d[] = "d"; +static char __pyx_k__e[] = "e"; +static char __pyx_k__f[] = "f"; +static char __pyx_k__g[] = "g"; +static char __pyx_k__h[] = "h"; +static char __pyx_k__i[] = "i"; +static char __pyx_k__j[] = "j"; +static char __pyx_k__l[] = "l"; +static char __pyx_k__q[] = "q"; +static char __pyx_k__r[] = "r"; +static char __pyx_k__w[] = "w"; +static char __pyx_k__Zd[] = "Zd"; +static char __pyx_k__Zf[] = "Zf"; +static char __pyx_k__Zg[] = "Zg"; +static char __pyx_k__au[] = "au"; +static char __pyx_k__np[] = "np"; +static char __pyx_k__rw[] = "rw"; +static char __pyx_k__st[] = "st"; +static char __pyx_k__xi[] = "xi"; +static char __pyx_k__avr[] = "avr"; +static char __pyx_k__big[] = "big"; +static char __pyx_k__caf[] = "caf"; +static char __pyx_k__cpu[] = "cpu"; +static char __pyx_k__htk[] = "htk"; +static char __pyx_k__int[] = "int"; +static char __pyx_k__ogg[] = "ogg"; +static char __pyx_k__paf[] = "paf"; +static char __pyx_k__pre[] = "pre"; +static char __pyx_k__pvf[] = "pvf"; +static char __pyx_k__raw[] = "raw"; +static char __pyx_k__ret[] = "ret"; +static char __pyx_k__sd2[] = "sd2"; +static char __pyx_k__sds[] = "sds"; +static char __pyx_k__svx[] = "svx"; +static char __pyx_k__ver[] = "ver"; +static char __pyx_k__voc[] = "voc"; +static char __pyx_k__wav[] = "wav"; +static char __pyx_k__wve[] = "wve"; +static char __pyx_k__aiff[] = "aiff"; +static char __pyx_k__alaw[] = "alaw"; +static char __pyx_k__buff[] = "buff"; +static char __pyx_k__copy[] = "copy"; +static char __pyx_k__dwwN[] = "dwwN"; +static char __pyx_k__file[] = "file"; +static char __pyx_k__flac[] = "flac"; +static char __pyx_k__join[] = "join"; +static char __pyx_k__mat4[] = "mat4"; +static char __pyx_k__mat5[] = "mat5"; +static char __pyx_k__mode[] = "mode"; +static char __pyx_k__nist[] = "nist"; +static char __pyx_k__rf64[] = "rf64"; +static char __pyx_k__size[] = "size"; +static char __pyx_k__type[] = "type"; +static char __pyx_k__ulaw[] = "ulaw"; +static char __pyx_k__warn[] = "warn"; +static char __pyx_k__dpcm8[] = "dpcm8"; +static char __pyx_k__dtype[] = "dtype"; +static char __pyx_k__dww12[] = "dww12"; +static char __pyx_k__dww16[] = "dww16"; +static char __pyx_k__dww24[] = "dww24"; +static char __pyx_k__empty[] = "empty"; +static char __pyx_k__int16[] = "int16"; +static char __pyx_k__int32[] = "int32"; +static char __pyx_k__ircam[] = "ircam"; +static char __pyx_k__items[] = "items"; +static char __pyx_k__major[] = "major"; +static char __pyx_k__micro[] = "micro"; +static char __pyx_k__minor[] = "minor"; +static char __pyx_k__mpc2k[] = "mpc2k"; +static char __pyx_k__numpy[] = "numpy"; +static char __pyx_k__order[] = "order"; +static char __pyx_k__pcm16[] = "pcm16"; +static char __pyx_k__pcm24[] = "pcm24"; +static char __pyx_k__pcm32[] = "pcm32"; +static char __pyx_k__pcms8[] = "pcms8"; +static char __pyx_k__pcmu8[] = "pcmu8"; +static char __pyx_k__range[] = "range"; +static char __pyx_k__shape[] = "shape"; +static char __pyx_k__short[] = "short"; +static char __pyx_k__split[] = "split"; +static char __pyx_k__wav64[] = "wav64"; +static char __pyx_k__wavex[] = "wavex"; +static char __pyx_k__dpcm16[] = "dpcm16"; +static char __pyx_k__format[] = "format"; +static char __pyx_k__gsm610[] = "gsm610"; +static char __pyx_k__little[] = "little"; +static char __pyx_k__offset[] = "offset"; +static char __pyx_k__vorbis[] = "vorbis"; +static char __pyx_k__whence[] = "whence"; +static char __pyx_k__IOError[] = "IOError"; +static char __pyx_k____str__[] = "__str__"; +static char __pyx_k__float32[] = "float32"; +static char __pyx_k__float64[] = "float64"; +static char __pyx_k__g721_32[] = "g721_32"; +static char __pyx_k__g723_24[] = "g723_24"; +static char __pyx_k__g723_40[] = "g723_40"; +static char __pyx_k__has_key[] = "has_key"; +static char __pyx_k__nframes[] = "nframes"; +static char __pyx_k__require[] = "require"; +static char __pyx_k__version[] = "version"; +static char __pyx_k__KeyError[] = "KeyError"; +static char __pyx_k____copy__[] = "__copy__"; +static char __pyx_k____main__[] = "__main__"; +static char __pyx_k____test__[] = "__test__"; +static char __pyx_k__channels[] = "channels"; +static char __pyx_k__encoding[] = "encoding"; +static char __pyx_k__filename[] = "filename"; +static char __pyx_k__ms_adpcm[] = "ms_adpcm"; +static char __pyx_k__warnings[] = "warnings"; +static char __pyx_k__Exception[] = "Exception"; +static char __pyx_k__TypeError[] = "TypeError"; +static char __pyx_k____class__[] = "__class__"; +static char __pyx_k__ima_adpcm[] = "ima_adpcm"; +static char __pyx_k__vox_adpcm[] = "vox_adpcm"; +static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k__endianness[] = "endianness"; +static char __pyx_k__prerelease[] = "prerelease"; +static char __pyx_k__samplerate[] = "samplerate"; +static char __pyx_k__file_format[] = "file_format"; +static char __pyx_k__RuntimeError[] = "RuntimeError"; +static char __pyx_k__requirements[] = "requirements"; +static char __pyx_k___SNDFILE_ENDIAN[] = "_SNDFILE_ENDIAN"; +static char __pyx_k__sndfile_version[] = "sndfile_version"; +static char __pyx_k___SNDFILE_ENCODING[] = "_SNDFILE_ENCODING"; +static char __pyx_k__NotImplementedError[] = "NotImplementedError"; +static char __pyx_k___ENUM_TO_STR_ENDIAN[] = "_ENUM_TO_STR_ENDIAN"; +static char __pyx_k__available_encodings[] = "available_encodings"; +static PyObject *__pyx_kp_s_1; +static PyObject *__pyx_kp_s_10; +static PyObject *__pyx_kp_s_11; +static PyObject *__pyx_kp_s_12; +static PyObject *__pyx_kp_s_13; +static PyObject *__pyx_kp_s_14; +static PyObject *__pyx_kp_s_15; +static PyObject *__pyx_kp_s_16; +static PyObject *__pyx_kp_s_17; +static PyObject *__pyx_kp_s_18; +static PyObject *__pyx_n_s_19; +static PyObject *__pyx_kp_s_20; +static PyObject *__pyx_kp_s_21; +static PyObject *__pyx_n_s_22; +static PyObject *__pyx_kp_s_23; +static PyObject *__pyx_kp_s_24; +static PyObject *__pyx_kp_s_27; +static PyObject *__pyx_kp_s_28; +static PyObject *__pyx_kp_s_29; +static PyObject *__pyx_kp_s_3; +static PyObject *__pyx_kp_s_30; +static PyObject *__pyx_kp_s_32; +static PyObject *__pyx_kp_s_33; +static PyObject *__pyx_kp_s_34; +static PyObject *__pyx_kp_s_35; +static PyObject *__pyx_kp_s_36; +static PyObject *__pyx_kp_s_37; +static PyObject *__pyx_kp_s_39; +static PyObject *__pyx_kp_s_40; +static PyObject *__pyx_kp_s_41; +static PyObject *__pyx_kp_s_42; +static PyObject *__pyx_kp_s_43; +static PyObject *__pyx_kp_s_44; +static PyObject *__pyx_kp_s_45; +static PyObject *__pyx_kp_s_46; +static PyObject *__pyx_kp_s_47; +static PyObject *__pyx_kp_s_48; +static PyObject *__pyx_kp_s_49; +static PyObject *__pyx_kp_s_5; +static PyObject *__pyx_kp_s_51; +static PyObject *__pyx_kp_s_52; +static PyObject *__pyx_kp_s_55; +static PyObject *__pyx_kp_s_58; +static PyObject *__pyx_kp_s_59; +static PyObject *__pyx_kp_s_60; +static PyObject *__pyx_kp_s_61; +static PyObject *__pyx_kp_s_62; +static PyObject *__pyx_kp_s_64; +static PyObject *__pyx_kp_s_65; +static PyObject *__pyx_kp_u_67; +static PyObject *__pyx_kp_u_69; +static PyObject *__pyx_kp_u_71; +static PyObject *__pyx_kp_u_73; +static PyObject *__pyx_kp_u_74; +static PyObject *__pyx_kp_u_77; +static PyObject *__pyx_n_s_8; +static PyObject *__pyx_kp_s_9; +static PyObject *__pyx_kp_s_90; +static PyObject *__pyx_n_s_91; +static PyObject *__pyx_n_s_94; +static PyObject *__pyx_n_s__C; +static PyObject *__pyx_n_s__Exception; +static PyObject *__pyx_n_s__IOError; +static PyObject *__pyx_n_s__KeyError; +static PyObject *__pyx_n_s__NotImplementedError; +static PyObject *__pyx_n_s__RuntimeError; +static PyObject *__pyx_n_s__TypeError; +static PyObject *__pyx_n_s__ValueError; +static PyObject *__pyx_n_s___ENUM_TO_STR_ENDIAN; +static PyObject *__pyx_n_s___SNDFILE_ENCODING; +static PyObject *__pyx_n_s___SNDFILE_ENDIAN; +static PyObject *__pyx_n_s____class__; +static PyObject *__pyx_n_s____copy__; +static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____str__; +static PyObject *__pyx_n_s____test__; +static PyObject *__pyx_n_s__aiff; +static PyObject *__pyx_n_s__alaw; +static PyObject *__pyx_n_s__au; +static PyObject *__pyx_n_s__available_encodings; +static PyObject *__pyx_n_s__avr; +static PyObject *__pyx_n_s__big; +static PyObject *__pyx_n_s__buff; +static PyObject *__pyx_n_s__caf; +static PyObject *__pyx_n_s__channels; +static PyObject *__pyx_n_s__copy; +static PyObject *__pyx_n_s__cpu; +static PyObject *__pyx_n_s__dpcm16; +static PyObject *__pyx_n_s__dpcm8; +static PyObject *__pyx_n_s__dtype; +static PyObject *__pyx_n_s__dww12; +static PyObject *__pyx_n_s__dww16; +static PyObject *__pyx_n_s__dww24; +static PyObject *__pyx_n_s__dwwN; +static PyObject *__pyx_n_s__e; +static PyObject *__pyx_n_s__empty; +static PyObject *__pyx_n_s__encoding; +static PyObject *__pyx_n_s__endianness; +static PyObject *__pyx_n_s__file; +static PyObject *__pyx_n_s__file_format; +static PyObject *__pyx_n_s__filename; +static PyObject *__pyx_n_s__flac; +static PyObject *__pyx_n_s__float32; +static PyObject *__pyx_n_s__float64; +static PyObject *__pyx_n_s__format; +static PyObject *__pyx_n_s__g721_32; +static PyObject *__pyx_n_s__g723_24; +static PyObject *__pyx_n_s__g723_40; +static PyObject *__pyx_n_s__gsm610; +static PyObject *__pyx_n_s__has_key; +static PyObject *__pyx_n_s__htk; +static PyObject *__pyx_n_s__i; +static PyObject *__pyx_n_s__ima_adpcm; +static PyObject *__pyx_n_s__int; +static PyObject *__pyx_n_s__int16; +static PyObject *__pyx_n_s__int32; +static PyObject *__pyx_n_s__ircam; +static PyObject *__pyx_n_s__items; +static PyObject *__pyx_n_s__j; +static PyObject *__pyx_n_s__join; +static PyObject *__pyx_n_s__little; +static PyObject *__pyx_n_s__major; +static PyObject *__pyx_n_s__mat4; +static PyObject *__pyx_n_s__mat5; +static PyObject *__pyx_n_s__micro; +static PyObject *__pyx_n_s__minor; +static PyObject *__pyx_n_s__mode; +static PyObject *__pyx_n_s__mpc2k; +static PyObject *__pyx_n_s__ms_adpcm; +static PyObject *__pyx_n_s__nframes; +static PyObject *__pyx_n_s__nist; +static PyObject *__pyx_n_s__np; +static PyObject *__pyx_n_s__numpy; +static PyObject *__pyx_n_s__offset; +static PyObject *__pyx_n_s__ogg; +static PyObject *__pyx_n_s__order; +static PyObject *__pyx_n_s__paf; +static PyObject *__pyx_n_s__pcm16; +static PyObject *__pyx_n_s__pcm24; +static PyObject *__pyx_n_s__pcm32; +static PyObject *__pyx_n_s__pcms8; +static PyObject *__pyx_n_s__pcmu8; +static PyObject *__pyx_n_s__pre; +static PyObject *__pyx_n_s__prerelease; +static PyObject *__pyx_n_s__pvf; +static PyObject *__pyx_n_s__r; +static PyObject *__pyx_n_s__range; +static PyObject *__pyx_n_s__raw; +static PyObject *__pyx_n_s__require; +static PyObject *__pyx_n_s__requirements; +static PyObject *__pyx_n_s__ret; +static PyObject *__pyx_n_s__rf64; +static PyObject *__pyx_n_s__rw; +static PyObject *__pyx_n_s__samplerate; +static PyObject *__pyx_n_s__sd2; +static PyObject *__pyx_n_s__sds; +static PyObject *__pyx_n_s__shape; +static PyObject *__pyx_n_s__short; +static PyObject *__pyx_n_s__size; +static PyObject *__pyx_n_s__sndfile_version; +static PyObject *__pyx_n_s__split; +static PyObject *__pyx_n_s__st; +static PyObject *__pyx_n_s__svx; +static PyObject *__pyx_n_s__type; +static PyObject *__pyx_n_s__ulaw; +static PyObject *__pyx_n_s__ver; +static PyObject *__pyx_n_s__version; +static PyObject *__pyx_n_s__voc; +static PyObject *__pyx_n_s__vorbis; +static PyObject *__pyx_n_s__vox_adpcm; +static PyObject *__pyx_n_s__w; +static PyObject *__pyx_n_s__warn; +static PyObject *__pyx_n_s__warnings; +static PyObject *__pyx_n_s__wav; +static PyObject *__pyx_n_s__wav64; +static PyObject *__pyx_n_s__wavex; +static PyObject *__pyx_n_s__whence; +static PyObject *__pyx_n_s__wve; +static PyObject *__pyx_n_s__xi; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_15; +static PyObject *__pyx_int_96; +static PyObject *__pyx_int_1507328; +static PyObject *__pyx_int_1572864; +static PyObject *__pyx_int_1638400; +static PyObject *__pyx_int_2097152; +static PyObject *__pyx_int_2162688; +static PyObject *__pyx_int_2228224; +static PyObject *__pyx_k_50; +static PyObject *__pyx_k_tuple_2; +static PyObject *__pyx_k_tuple_4; +static PyObject *__pyx_k_tuple_6; +static PyObject *__pyx_k_tuple_7; +static PyObject *__pyx_k_slice_53; +static PyObject *__pyx_k_slice_56; +static PyObject *__pyx_k_tuple_25; +static PyObject *__pyx_k_tuple_26; +static PyObject *__pyx_k_tuple_31; +static PyObject *__pyx_k_tuple_38; +static PyObject *__pyx_k_tuple_54; +static PyObject *__pyx_k_tuple_57; +static PyObject *__pyx_k_tuple_63; +static PyObject *__pyx_k_tuple_66; +static PyObject *__pyx_k_tuple_68; +static PyObject *__pyx_k_tuple_70; +static PyObject *__pyx_k_tuple_72; +static PyObject *__pyx_k_tuple_75; +static PyObject *__pyx_k_tuple_76; +static PyObject *__pyx_k_tuple_78; +static PyObject *__pyx_k_tuple_88; +static PyObject *__pyx_k_tuple_92; +static PyObject *__pyx_k_tuple_95; +static PyObject *__pyx_k_codeobj_89; +static PyObject *__pyx_k_codeobj_93; +static PyObject *__pyx_k_codeobj_96; + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_1sndfile_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_sndfile_version[] = "sndfile_version()\nReturn version of sndfile."; +static PyMethodDef __pyx_mdef_8audiolab_9pysndfile_8_sndfile_1sndfile_version = {__Pyx_NAMESTR("sndfile_version"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_1sndfile_version, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_sndfile_version)}; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_1sndfile_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sndfile_version (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_sndfile_version(__pyx_self); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":108 + * dict([(i, j) for j, i in _SNDFILE_ENDIAN.items()]) + * + * def sndfile_version(): # <<<<<<<<<<<<<< + * """Return version of sndfile.""" + * cdef int st + */ + +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_sndfile_version(CYTHON_UNUSED PyObject *__pyx_self) { + int __pyx_v_st; + char __pyx_v_buff[128]; + PyObject *__pyx_v_ver = NULL; + PyObject *__pyx_v_version = NULL; + PyObject *__pyx_v_prerelease = NULL; + PyObject *__pyx_v_major = NULL; + PyObject *__pyx_v_minor = NULL; + PyObject *__pyx_v_micro = NULL; + CYTHON_UNUSED PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("sndfile_version", 0); + + /* "audiolab/pysndfile/_sndfile.pyx":113 + * cdef char buff[128] + * * st = sf_command(NULL, SFC_GET_LIB_VERSION, buff, sizeof(buff)) # <<<<<<<<<<<<<< * if st < 1: * raise RuntimeError("Error while getting version of libsndfile") */ __pyx_v_st = sf_command(NULL, SFC_GET_LIB_VERSION, __pyx_v_buff, (sizeof(__pyx_v_buff))); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":112 + /* "audiolab/pysndfile/_sndfile.pyx":114 * * st = sf_command(NULL, SFC_GET_LIB_VERSION, buff, sizeof(buff)) * if st < 1: # <<<<<<<<<<<<<< * raise RuntimeError("Error while getting version of libsndfile") * */ - /* __pyx_t_1 allocated */ __pyx_t_1 = (__pyx_v_st < 1); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":113 + /* "audiolab/pysndfile/_sndfile.pyx":115 * st = sf_command(NULL, SFC_GET_LIB_VERSION, buff, sizeof(buff)) * if st < 1: * raise RuntimeError("Error while getting version of libsndfile") # <<<<<<<<<<<<<< * - * ver = PyString_FromStringAndSize(buff, stdlib.strlen(buff)) - */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_94); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_94); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + * ver = PyString_FromStringAndSize(buff, strlen(buff)) + */ + __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":115 + /* "audiolab/pysndfile/_sndfile.pyx":117 * raise RuntimeError("Error while getting version of libsndfile") * - * ver = PyString_FromStringAndSize(buff, stdlib.strlen(buff)) # <<<<<<<<<<<<<< + * ver = PyString_FromStringAndSize(buff, strlen(buff)) # <<<<<<<<<<<<<< * * # Get major, minor and micro from version */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_ver); - __pyx_v_ver = __pyx_t_3; - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_2 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_ver = __pyx_t_2; + __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":119 + /* "audiolab/pysndfile/_sndfile.pyx":121 * # Get major, minor and micro from version * # Template: libsndfile-X.X.XpreX with preX being optional * version = ver.split('-')[1] # <<<<<<<<<<<<<< * prerelease = 0 * major, minor, micro = [i for i in version.split('.')] */ - __pyx_1 = PyObject_GetAttr(__pyx_v_ver, __pyx_kp_split); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_95); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_95); - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = __Pyx_GetItemInt(__pyx_t_2, 1, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - Py_DECREF(__pyx_v_version); - __pyx_v_version = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":120 + __pyx_t_2 = PyObject_GetAttr(__pyx_v_ver, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_version = __pyx_t_2; + __pyx_t_2 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":122 * # Template: libsndfile-X.X.XpreX with preX being optional * version = ver.split('-')[1] * prerelease = 0 # <<<<<<<<<<<<<< * major, minor, micro = [i for i in version.split('.')] * try: */ - Py_INCREF(__pyx_int_0); - Py_DECREF(__pyx_v_prerelease); + __Pyx_INCREF(__pyx_int_0); __pyx_v_prerelease = __pyx_int_0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":121 + /* "audiolab/pysndfile/_sndfile.pyx":123 * version = ver.split('-')[1] * prerelease = 0 * major, minor, micro = [i for i in version.split('.')] # <<<<<<<<<<<<<< * try: * micro = int(micro) */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_1 = PyObject_GetAttr(__pyx_v_version, __pyx_kp_split); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_96); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_96); - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) { - __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; Py_INCREF(__pyx_t_3); + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_v_version, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_6 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; } - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - /* __pyx_t_5 allocated */ - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); Py_INCREF(__pyx_t_5); __pyx_t_4++; - } else if (likely(PyTuple_CheckExact(__pyx_t_3))) { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); Py_INCREF(__pyx_t_5); __pyx_t_4++; + if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_5 = PyIter_Next(__pyx_t_3); - if (!__pyx_t_5) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } break; } + __Pyx_GOTREF(__pyx_t_4); } - Py_DECREF(__pyx_v_i); - __pyx_v_i = __pyx_t_5; - __pyx_t_5 = 0; - /* __pyx_t_5 released */ - __pyx_2 = PyList_Append(__pyx_t_2, (PyObject*)__pyx_v_i); if (unlikely(__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - /* __pyx_t_4 released */ - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - if (PyTuple_CheckExact(((PyObject *)__pyx_t_2)) && PyTuple_GET_SIZE(((PyObject *)__pyx_t_2)) == 3) { - PyObject* tuple = ((PyObject *)__pyx_t_2); - __pyx_3 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(__pyx_3); - __pyx_4 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(__pyx_4); - __pyx_5 = PyTuple_GET_ITEM(tuple, 2); Py_INCREF(__pyx_5); - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - Py_DECREF(__pyx_v_major); - __pyx_v_major = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_minor); - __pyx_v_minor = __pyx_4; - __pyx_4 = 0; - Py_DECREF(__pyx_v_micro); - __pyx_v_micro = __pyx_5; - __pyx_5 = 0; - } else { - __pyx_1 = PyObject_GetIter(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_5 = __Pyx_UnpackItem(__pyx_1, 2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_v_major); - __pyx_v_major = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_minor); - __pyx_v_minor = __pyx_4; - __pyx_4 = 0; - Py_DECREF(__pyx_v_micro); - __pyx_v_micro = __pyx_5; - __pyx_5 = 0; - } - /* __pyx_t_2 released */ - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":122 + __Pyx_XDECREF(__pyx_v_i); + __pyx_v_i = __pyx_t_4; + __pyx_t_4 = 0; + if (unlikely(__Pyx_PyList_Append(__pyx_t_2, (PyObject*)__pyx_v_i))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = ((PyObject *)__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + if (PyList_CheckExact(__pyx_t_3)) { + PyObject* sequence = __pyx_t_3; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 2); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L7_unpacking_done:; + } + __pyx_v_major = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_minor = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_micro = __pyx_t_7; + __pyx_t_7 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":124 * prerelease = 0 * major, minor, micro = [i for i in version.split('.')] * try: # <<<<<<<<<<<<<< @@ -1114,190 +1876,294 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_versio * except ValueError,e: */ { - PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb; - __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb); + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":123 + /* "audiolab/pysndfile/_sndfile.pyx":125 * major, minor, micro = [i for i in version.split('.')] * try: * micro = int(micro) # <<<<<<<<<<<<<< * except ValueError,e: * #print "micro is " + str(micro) */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L8_error;} - Py_INCREF(__pyx_v_micro); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_micro); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L8_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - Py_DECREF(__pyx_v_micro); - __pyx_v_micro = __pyx_t_3; - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L8_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_micro); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_micro); + __Pyx_GIVEREF(__pyx_v_micro); + __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L8_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_micro); + __pyx_v_micro = __pyx_t_7; + __pyx_t_7 = 0; } - Py_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0; - Py_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0; - Py_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0; - goto __pyx_L12_try; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + goto __pyx_L15_try_end; __pyx_L8_error:; - Py_XDECREF(__pyx_1); __pyx_1 = 0; - Py_XDECREF(__pyx_3); __pyx_3 = 0; - Py_XDECREF(__pyx_4); __pyx_4 = 0; - Py_XDECREF(__pyx_5); __pyx_5 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":124 + /* "audiolab/pysndfile/_sndfile.pyx":126 * try: * micro = int(micro) * except ValueError,e: # <<<<<<<<<<<<<< * #print "micro is " + str(micro) * micro, prerelease = micro.split('pre') */ - __pyx_2 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); - if (__pyx_2) { - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.sndfile_version"); - if (__Pyx_GetException(&__pyx_1, &__pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - Py_INCREF(__pyx_3); - Py_DECREF(__pyx_v_e); - __pyx_v_e = __pyx_3; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":126 + __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_ValueError); + if (__pyx_t_13) { + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.sndfile_version", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_e = __pyx_t_3; + + /* "audiolab/pysndfile/_sndfile.pyx":128 * except ValueError,e: * #print "micro is " + str(micro) * micro, prerelease = micro.split('pre') # <<<<<<<<<<<<<< * * return int(major), int(minor), int(micro), prerelease */ - __pyx_5 = PyObject_GetAttr(__pyx_v_micro, __pyx_kp_split); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - Py_INCREF(__pyx_kp_97); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_97); - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - Py_DECREF(__pyx_5); __pyx_5 = 0; - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - if (PyTuple_CheckExact(__pyx_t_2) && PyTuple_GET_SIZE(__pyx_t_2) == 2) { - PyObject* tuple = __pyx_t_2; - __pyx_6 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(__pyx_6); - __pyx_7 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(__pyx_7); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - Py_DECREF(__pyx_v_micro); - __pyx_v_micro = __pyx_6; - __pyx_6 = 0; - Py_DECREF(__pyx_v_prerelease); - __pyx_v_prerelease = __pyx_7; - __pyx_7 = 0; - } else { - __pyx_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_6 = __Pyx_UnpackItem(__pyx_5, 0); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - __pyx_7 = __Pyx_UnpackItem(__pyx_5, 1); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} - Py_DECREF(__pyx_5); __pyx_5 = 0; - Py_DECREF(__pyx_v_micro); - __pyx_v_micro = __pyx_6; - __pyx_6 = 0; - Py_DECREF(__pyx_v_prerelease); - __pyx_v_prerelease = __pyx_7; - __pyx_7 = 0; + __pyx_t_2 = PyObject_GetAttr(__pyx_v_micro, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { + PyObject* sequence = __pyx_t_8; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_14 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_14); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + #endif + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } else + { + Py_ssize_t index = -1; + __pyx_t_15 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_15)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_15); if (unlikely(!__pyx_t_2)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_14 = __pyx_t_9(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L18_unpacking_failed; + __Pyx_GOTREF(__pyx_t_14); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_15), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + goto __pyx_L19_unpacking_done; + __pyx_L18_unpacking_failed:; + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;} + __pyx_L19_unpacking_done:; } - /* __pyx_t_2 released */ - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; + __Pyx_DECREF(__pyx_v_micro); + __pyx_v_micro = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_v_prerelease); + __pyx_v_prerelease = __pyx_t_14; + __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; - Py_XDECREF(__pyx_save_exc_type); - Py_XDECREF(__pyx_save_exc_value); - Py_XDECREF(__pyx_save_exc_tb); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L1_error; __pyx_L9_exception_handled:; - __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); - __pyx_L12_try:; + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); + __pyx_L15_try_end:; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":128 + /* "audiolab/pysndfile/_sndfile.pyx":130 * micro, prerelease = micro.split('pre') * * return int(major), int(minor), int(micro), prerelease # <<<<<<<<<<<<<< * * cdef class Format: */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_major); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_major); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_minor); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_minor); - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_micro); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_micro); - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6); - Py_INCREF(__pyx_v_prerelease); - PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_prerelease); + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_major); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_major); + __Pyx_GIVEREF(__pyx_v_major); + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_minor); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_minor); + __Pyx_GIVEREF(__pyx_v_minor); + __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_micro); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_micro); + __Pyx_GIVEREF(__pyx_v_micro); + __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); + __Pyx_INCREF(__pyx_v_prerelease); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_prerelease); + __Pyx_GIVEREF(__pyx_v_prerelease); __pyx_t_3 = 0; - __pyx_t_5 = 0; - __pyx_t_6 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_5 released */ - /* __pyx_t_6 released */ - __pyx_r = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_r = ((PyObject *)__pyx_t_4); + __pyx_t_4 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_5); - Py_XDECREF(__pyx_6); - Py_XDECREF(__pyx_7); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - Py_XDECREF(__pyx_t_5); - Py_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.sndfile_version"); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.sndfile_version", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_ver); - Py_DECREF(__pyx_v_version); - Py_DECREF(__pyx_v_prerelease); - Py_DECREF(__pyx_v_major); - Py_DECREF(__pyx_v_minor); - Py_DECREF(__pyx_v_micro); - Py_DECREF(__pyx_v_e); - Py_DECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_ver); + __Pyx_XDECREF(__pyx_v_version); + __Pyx_XDECREF(__pyx_v_prerelease); + __Pyx_XDECREF(__pyx_v_major); + __Pyx_XDECREF(__pyx_v_minor); + __Pyx_XDECREF(__pyx_v_micro); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_type = 0; + PyObject *__pyx_v_encoding = 0; + PyObject *__pyx_v_endianness = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__type,&__pyx_n_s__encoding,&__pyx_n_s__endianness,0}; + PyObject* values[3] = {0,0,0}; + values[0] = ((PyObject *)__pyx_n_s__wav); + values[1] = ((PyObject *)__pyx_n_s__pcm16); + values[2] = ((PyObject *)__pyx_n_s__file); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__type); + if (value) { values[0] = value; kw_args--; } + } + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoding); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__endianness); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_type = values[0]; + __pyx_v_encoding = values[1]; + __pyx_v_endianness = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format___init__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self), __pyx_v_type, __pyx_v_encoding, __pyx_v_endianness); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":158 +/* "audiolab/pysndfile/_sndfile.pyx":160 * cdef object _type, _encoding, _endianness * cdef object _format_str, _encoding_str, _endian_str * def __init__(self, type = 'wav', encoding = 'pcm16', endianness = 'file'): # <<<<<<<<<<<<<< @@ -1305,109 +2171,73 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_versio * cdef SF_FORMAT_INFO format_info */ -static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_type = 0; - PyObject *__pyx_v_encoding = 0; - PyObject *__pyx_v_endianness = 0; +static int __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format___init__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self, PyObject *__pyx_v_type, PyObject *__pyx_v_encoding, PyObject *__pyx_v_endianness) { int __pyx_v_format; int __pyx_v_ctype; int __pyx_v_cencoding; int __pyx_v_cendian; int __pyx_v_st; SF_FORMAT_INFO __pyx_v_format_info; - PyObject *__pyx_v_e; - PyObject *__pyx_v_ret; - PyObject *__pyx_v_msg; + CYTHON_UNUSED PyObject *__pyx_v_e = NULL; + int __pyx_v_ret; + PyObject *__pyx_v_msg = NULL; int __pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - int __pyx_3; - PyObject *__pyx_4 = 0; - int __pyx_t_1; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_type,&__pyx_kp_encoding,&__pyx_kp_endianness,0}; - __pyx_v_type = __pyx_kp_87; - __pyx_v_encoding = __pyx_kp_88; - __pyx_v_endianness = __pyx_kp_89; - if (unlikely(__pyx_kwds)) { - PyObject* values[3] = {0,0,0}; - Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); - case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - if (values[0]) { - __pyx_v_type = values[0]; - } - if (values[1]) { - __pyx_v_encoding = values[1]; - } - if (values[2]) { - __pyx_v_endianness = values[2]; - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 3: __pyx_v_endianness = PyTuple_GET_ITEM(__pyx_args, 2); - case 2: __pyx_v_encoding = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: __pyx_v_type = PyTuple_GET_ITEM(__pyx_args, 0); - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_L3_error:; - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Format.__init__"); - return -1; - __pyx_L4_argument_unpacking_done:; - __pyx_v_e = Py_None; Py_INCREF(Py_None); - __pyx_v_ret = Py_None; Py_INCREF(Py_None); - __pyx_v_msg = Py_None; Py_INCREF(Py_None); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":163 + /* "audiolab/pysndfile/_sndfile.pyx":165 * * # Keep the arguments * self._type = type # <<<<<<<<<<<<<< * self._encoding = encoding * self._endianness = endianness */ - Py_INCREF(__pyx_v_type); - Py_DECREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_type); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_type = __pyx_v_type; + __Pyx_INCREF(__pyx_v_type); + __Pyx_GIVEREF(__pyx_v_type); + __Pyx_GOTREF(__pyx_v_self->_type); + __Pyx_DECREF(__pyx_v_self->_type); + __pyx_v_self->_type = __pyx_v_type; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":164 + /* "audiolab/pysndfile/_sndfile.pyx":166 * # Keep the arguments * self._type = type * self._encoding = encoding # <<<<<<<<<<<<<< * self._endianness = endianness * */ - Py_INCREF(__pyx_v_encoding); - Py_DECREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding = __pyx_v_encoding; + __Pyx_INCREF(__pyx_v_encoding); + __Pyx_GIVEREF(__pyx_v_encoding); + __Pyx_GOTREF(__pyx_v_self->_encoding); + __Pyx_DECREF(__pyx_v_self->_encoding); + __pyx_v_self->_encoding = __pyx_v_encoding; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":165 + /* "audiolab/pysndfile/_sndfile.pyx":167 * self._type = type * self._encoding = encoding * self._endianness = endianness # <<<<<<<<<<<<<< * * # Get the internal values which corresponds to the values libsndfile */ - Py_INCREF(__pyx_v_endianness); - Py_DECREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_endianness); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_endianness = __pyx_v_endianness; + __Pyx_INCREF(__pyx_v_endianness); + __Pyx_GIVEREF(__pyx_v_endianness); + __Pyx_GOTREF(__pyx_v_self->_endianness); + __Pyx_DECREF(__pyx_v_self->_endianness); + __pyx_v_self->_endianness = __pyx_v_endianness; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":169 + /* "audiolab/pysndfile/_sndfile.pyx":171 * # Get the internal values which corresponds to the values libsndfile * # can understand * try: # <<<<<<<<<<<<<< @@ -1415,87 +2245,93 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO * except KeyError, e: */ { - PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb; - __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb); + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":170 + /* "audiolab/pysndfile/_sndfile.pyx":172 * # can understand * try: * ctype = _SNDFILE_FILE_FORMAT[type] # <<<<<<<<<<<<<< * except KeyError, e: * raise ValueError("file format %s not recognized" % type) */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L6_error;} - __pyx_2 = PyObject_GetItem(__pyx_1, __pyx_v_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L6_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __pyx_PyInt_int(__pyx_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L6_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_v_ctype = __pyx_t_1; - /* __pyx_t_1 released */ - } - Py_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0; - Py_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0; - Py_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0; - goto __pyx_L10_try; - __pyx_L6_error:; - Py_XDECREF(__pyx_1); __pyx_1 = 0; - Py_XDECREF(__pyx_2); __pyx_2 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":171 + __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_v_type); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ctype = __pyx_t_6; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L10_try_end; + __pyx_L3_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":173 * try: * ctype = _SNDFILE_FILE_FORMAT[type] * except KeyError, e: # <<<<<<<<<<<<<< * raise ValueError("file format %s not recognized" % type) * */ - __pyx_3 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); - if (__pyx_3) { - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.__init__"); - if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - Py_INCREF(__pyx_2); - Py_DECREF(__pyx_v_e); - __pyx_v_e = __pyx_2; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":172 + __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_6) { + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_e = __pyx_t_4; + + /* "audiolab/pysndfile/_sndfile.pyx":174 * ctype = _SNDFILE_FILE_FORMAT[type] * except KeyError, e: * raise ValueError("file format %s not recognized" % type) # <<<<<<<<<<<<<< * * try: */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_98, __pyx_v_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - goto __pyx_L7_exception_handled; - } - __pyx_L8_except_error:; - Py_XDECREF(__pyx_save_exc_type); - Py_XDECREF(__pyx_save_exc_value); - Py_XDECREF(__pyx_save_exc_tb); + __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), __pyx_v_type); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); + __pyx_t_8 = 0; + __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_exception_handled; + } + __pyx_L5_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; - __pyx_L7_exception_handled:; - __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); - __pyx_L10_try:; + __pyx_L4_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L10_try_end:; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":174 + /* "audiolab/pysndfile/_sndfile.pyx":176 * raise ValueError("file format %s not recognized" % type) * * try: # <<<<<<<<<<<<<< @@ -1503,88 +2339,96 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO * except KeyError, e: */ { - PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb; - __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb); + __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":175 + /* "audiolab/pysndfile/_sndfile.pyx":177 * * try: * cendian = _SNDFILE_ENDIAN[endianness] # <<<<<<<<<<<<<< * except KeyError, e: * raise ValueError("endianness %s not recognized" % endianness) */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__SNDFILE_ENDIAN); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L11_error;} - __pyx_2 = PyObject_GetItem(__pyx_1, __pyx_v_endianness); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L11_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __pyx_PyInt_int(__pyx_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L11_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_v_cendian = __pyx_t_1; - /* __pyx_t_1 released */ - } - Py_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0; - Py_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0; - Py_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0; - goto __pyx_L15_try; - __pyx_L11_error:; - Py_XDECREF(__pyx_4); __pyx_4 = 0; - Py_XDECREF(__pyx_1); __pyx_1 = 0; - Py_XDECREF(__pyx_2); __pyx_2 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":176 + __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s___SNDFILE_ENDIAN); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_v_endianness); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_cendian = __pyx_t_6; + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L20_try_end; + __pyx_L13_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":178 * try: * cendian = _SNDFILE_ENDIAN[endianness] * except KeyError, e: # <<<<<<<<<<<<<< * raise ValueError("endianness %s not recognized" % endianness) * */ - __pyx_3 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); - if (__pyx_3) { - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.__init__"); - if (__Pyx_GetException(&__pyx_4, &__pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} - Py_INCREF(__pyx_1); - Py_DECREF(__pyx_v_e); - __pyx_v_e = __pyx_1; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":177 + __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_6) { + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __pyx_v_e = __pyx_t_7; + + /* "audiolab/pysndfile/_sndfile.pyx":179 * cendian = _SNDFILE_ENDIAN[endianness] * except KeyError, e: * raise ValueError("endianness %s not recognized" % endianness) # <<<<<<<<<<<<<< * * try: */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_99, __pyx_v_endianness); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - goto __pyx_L12_exception_handled; - } - __pyx_L13_except_error:; - Py_XDECREF(__pyx_save_exc_type); - Py_XDECREF(__pyx_save_exc_value); - Py_XDECREF(__pyx_save_exc_tb); + __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_v_endianness); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); + __pyx_t_8 = 0; + __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L14_exception_handled; + } + __pyx_L15_except_error:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); goto __pyx_L1_error; - __pyx_L12_exception_handled:; - __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); - __pyx_L15_try:; + __pyx_L14_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); + __pyx_L20_try_end:; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":179 + /* "audiolab/pysndfile/_sndfile.pyx":181 * raise ValueError("endianness %s not recognized" % endianness) * * try: # <<<<<<<<<<<<<< @@ -1592,88 +2436,96 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO * except KeyError, e: */ { - PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb; - __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb); + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":180 + /* "audiolab/pysndfile/_sndfile.pyx":182 * * try: * cencoding = _SNDFILE_ENCODING[encoding] # <<<<<<<<<<<<<< * except KeyError, e: * raise ValueError("encoding %s not recognized" % encoding) */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__SNDFILE_ENCODING); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L16_error;} - __pyx_1 = PyObject_GetItem(__pyx_4, __pyx_v_encoding); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L16_error;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __pyx_PyInt_int(__pyx_1); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L16_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_v_cencoding = __pyx_t_1; - /* __pyx_t_1 released */ - } - Py_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0; - Py_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0; - Py_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0; - goto __pyx_L20_try; - __pyx_L16_error:; - Py_XDECREF(__pyx_2); __pyx_2 = 0; - Py_XDECREF(__pyx_4); __pyx_4 = 0; - Py_XDECREF(__pyx_1); __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":181 + __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___SNDFILE_ENCODING); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L23_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyObject_GetItem(__pyx_t_5, __pyx_v_encoding); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L23_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L23_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_cencoding = __pyx_t_6; + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L30_try_end; + __pyx_L23_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":183 * try: * cencoding = _SNDFILE_ENCODING[encoding] * except KeyError, e: # <<<<<<<<<<<<<< * raise ValueError("encoding %s not recognized" % encoding) * */ - __pyx_3 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); - if (__pyx_3) { - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.__init__"); - if (__Pyx_GetException(&__pyx_2, &__pyx_4, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} - Py_INCREF(__pyx_4); - Py_DECREF(__pyx_v_e); - __pyx_v_e = __pyx_4; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":182 + __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_6) { + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L25_except_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __pyx_v_e = __pyx_t_5; + + /* "audiolab/pysndfile/_sndfile.pyx":184 * cencoding = _SNDFILE_ENCODING[encoding] * except KeyError, e: * raise ValueError("encoding %s not recognized" % encoding) # <<<<<<<<<<<<<< * * format = ctype | cencoding | cendian */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_100, __pyx_v_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - goto __pyx_L17_exception_handled; - } - __pyx_L18_except_error:; - Py_XDECREF(__pyx_save_exc_type); - Py_XDECREF(__pyx_save_exc_value); - Py_XDECREF(__pyx_save_exc_tb); + __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_v_encoding); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L25_except_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L25_except_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); + __pyx_t_8 = 0; + __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L25_except_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L25_except_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L24_exception_handled; + } + __pyx_L25_except_error:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; - __pyx_L17_exception_handled:; - __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb); - __pyx_L20_try:; + __pyx_L24_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __pyx_L30_try_end:; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":184 + /* "audiolab/pysndfile/_sndfile.pyx":186 * raise ValueError("encoding %s not recognized" % encoding) * * format = ctype | cencoding | cendian # <<<<<<<<<<<<<< @@ -1682,111 +2534,99 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO */ __pyx_v_format = ((__pyx_v_ctype | __pyx_v_cencoding) | __pyx_v_cendian); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":193 + /* "audiolab/pysndfile/_sndfile.pyx":195 * # checked against values different than 1 or 2, so giving a value of 1 * # to channel should be ok. * self._sf_info.channels = 1 # <<<<<<<<<<<<<< * self._sf_info.samplerate = 8000 * self._sf_info.format = format */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_sf_info.channels = 1; + __pyx_v_self->_sf_info.channels = 1; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":194 + /* "audiolab/pysndfile/_sndfile.pyx":196 * # to channel should be ok. * self._sf_info.channels = 1 * self._sf_info.samplerate = 8000 # <<<<<<<<<<<<<< * self._sf_info.format = format * */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_sf_info.samplerate = 8000; + __pyx_v_self->_sf_info.samplerate = 8000; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":195 + /* "audiolab/pysndfile/_sndfile.pyx":197 * self._sf_info.channels = 1 * self._sf_info.samplerate = 8000 * self._sf_info.format = format # <<<<<<<<<<<<<< * * ret = sf_format_check(&self._sf_info) */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_sf_info.format = __pyx_v_format; + __pyx_v_self->_sf_info.format = __pyx_v_format; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":197 + /* "audiolab/pysndfile/_sndfile.pyx":199 * self._sf_info.format = format * * ret = sf_format_check(&self._sf_info) # <<<<<<<<<<<<<< * if ret is not SF_TRUE: * msg = "The combination (type=%s|encoding=%s|endianness=%s) " \ */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(sf_format_check((&((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_sf_info))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_ret); - __pyx_v_ret = __pyx_t_2; - __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_v_ret = sf_format_check((&__pyx_v_self->_sf_info)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":198 + /* "audiolab/pysndfile/_sndfile.pyx":200 * * ret = sf_format_check(&self._sf_info) * if ret is not SF_TRUE: # <<<<<<<<<<<<<< * msg = "The combination (type=%s|encoding=%s|endianness=%s) " \ * "you requested is not supported. " \ */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(SF_TRUE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = (__pyx_v_ret != __pyx_t_2); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_10 = (__pyx_v_ret != SF_TRUE); + if (__pyx_t_10) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":199 + /* "audiolab/pysndfile/_sndfile.pyx":201 * ret = sf_format_check(&self._sf_info) * if ret is not SF_TRUE: * msg = "The combination (type=%s|encoding=%s|endianness=%s) " \ # <<<<<<<<<<<<<< * "you requested is not supported. " \ * "You can use available_formats and " \ */ - Py_INCREF(__pyx_kp_101); - Py_DECREF(__pyx_v_msg); - __pyx_v_msg = __pyx_kp_101; + __Pyx_INCREF(((PyObject *)__pyx_kp_s_12)); + __pyx_v_msg = ((PyObject *)__pyx_kp_s_12); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":204 + /* "audiolab/pysndfile/_sndfile.pyx":206 * "available_encodings functions to query which formats "\ * "and encodings are available." * raise ValueError(msg % (type, encoding, endianness)) # <<<<<<<<<<<<<< * * # Get the sndfile string description of the format type */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_type); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_type); - Py_INCREF(__pyx_v_encoding); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_encoding); - Py_INCREF(__pyx_v_endianness); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_endianness); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_v_msg, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L21; + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_type); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_type); + __Pyx_GIVEREF(__pyx_v_type); + __Pyx_INCREF(__pyx_v_encoding); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_encoding); + __Pyx_GIVEREF(__pyx_v_encoding); + __Pyx_INCREF(__pyx_v_endianness); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_endianness); + __Pyx_GIVEREF(__pyx_v_endianness); + __pyx_t_5 = PyNumber_Remainder(__pyx_v_msg, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L33; } - __pyx_L21:; + __pyx_L33:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":207 + /* "audiolab/pysndfile/_sndfile.pyx":209 * * # Get the sndfile string description of the format type * format_info.format = ctype # <<<<<<<<<<<<<< @@ -1795,7 +2635,7 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO */ __pyx_v_format_info.format = __pyx_v_ctype; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":209 + /* "audiolab/pysndfile/_sndfile.pyx":211 * format_info.format = ctype * st = sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, * sizeof(format_info)) # <<<<<<<<<<<<<< @@ -1804,75 +2644,70 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO */ __pyx_v_st = sf_command(NULL, SFC_GET_FORMAT_INFO, (&__pyx_v_format_info), (sizeof(__pyx_v_format_info))); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":210 + /* "audiolab/pysndfile/_sndfile.pyx":212 * st = sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, * sizeof(format_info)) * if not st == 0: # <<<<<<<<<<<<<< * raise RuntimeError("Could not get format string for format "\ * "%d, " % format_info.format + "please report this" \ */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = (!(__pyx_v_st == 0)); - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_10 = (!(__pyx_v_st == 0)); + if (__pyx_t_10) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":212 + /* "audiolab/pysndfile/_sndfile.pyx":214 * if not st == 0: * raise RuntimeError("Could not get format string for format "\ * "%d, " % format_info.format + "please report this" \ # <<<<<<<<<<<<<< * "problem to the maintainer") * */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_format_info.format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_102, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_kp_103); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L22; + __pyx_t_5 = PyInt_FromLong(__pyx_v_format_info.format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L34; } - __pyx_L22:; + __pyx_L34:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":216 + /* "audiolab/pysndfile/_sndfile.pyx":218 * * self._format_str = PyString_FromStringAndSize(format_info.name, - * stdlib.strlen(format_info.name)) # <<<<<<<<<<<<<< + * strlen(format_info.name)) # <<<<<<<<<<<<<< * * # Get the sndfile string description of the encoding type */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":215 + /* "audiolab/pysndfile/_sndfile.pyx":217 * "problem to the maintainer") * * self._format_str = PyString_FromStringAndSize(format_info.name, # <<<<<<<<<<<<<< - * stdlib.strlen(format_info.name)) + * strlen(format_info.name)) * */ - Py_DECREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_format_str); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_format_str = __pyx_t_3; - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->_format_str); + __Pyx_DECREF(__pyx_v_self->_format_str); + __pyx_v_self->_format_str = __pyx_t_5; + __pyx_t_5 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":219 + /* "audiolab/pysndfile/_sndfile.pyx":221 * * # Get the sndfile string description of the encoding type * format_info.format = cencoding # <<<<<<<<<<<<<< @@ -1881,7 +2716,7 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO */ __pyx_v_format_info.format = __pyx_v_cencoding; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":221 + /* "audiolab/pysndfile/_sndfile.pyx":223 * format_info.format = cencoding * st = sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, * sizeof(format_info)) # <<<<<<<<<<<<<< @@ -1890,101 +2725,107 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO */ __pyx_v_st = sf_command(NULL, SFC_GET_FORMAT_INFO, (&__pyx_v_format_info), (sizeof(__pyx_v_format_info))); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":222 + /* "audiolab/pysndfile/_sndfile.pyx":224 * st = sf_command(NULL, SFC_GET_FORMAT_INFO, &format_info, * sizeof(format_info)) * if not st == 0: # <<<<<<<<<<<<<< * raise RuntimeError("Could not get format string for format "\ * "%d, " % format_info.format + "please report this" \ */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = (!(__pyx_v_st == 0)); - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_10 = (!(__pyx_v_st == 0)); + if (__pyx_t_10) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":224 + /* "audiolab/pysndfile/_sndfile.pyx":226 * if not st == 0: * raise RuntimeError("Could not get format string for format "\ * "%d, " % format_info.format + "please report this" \ # <<<<<<<<<<<<<< * "problem to the maintainer") * */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_format_info.format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_104, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_kp_105); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L23; + __pyx_t_5 = PyInt_FromLong(__pyx_v_format_info.format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_13), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_kp_s_14)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L35; } - __pyx_L23:; + __pyx_L35:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":228 + /* "audiolab/pysndfile/_sndfile.pyx":230 * * self._encoding_str = PyString_FromStringAndSize(format_info.name, - * stdlib.strlen(format_info.name)) # <<<<<<<<<<<<<< + * strlen(format_info.name)) # <<<<<<<<<<<<<< * * self._format_raw_int = format */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyString_FromStringAndSize(__pyx_v_format_info.name, strlen(__pyx_v_format_info.name)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":227 + /* "audiolab/pysndfile/_sndfile.pyx":229 * "problem to the maintainer") * * self._encoding_str = PyString_FromStringAndSize(format_info.name, # <<<<<<<<<<<<<< - * stdlib.strlen(format_info.name)) + * strlen(format_info.name)) * */ - Py_DECREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding_str); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding_str = __pyx_t_3; - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->_encoding_str); + __Pyx_DECREF(__pyx_v_self->_encoding_str); + __pyx_v_self->_encoding_str = __pyx_t_5; + __pyx_t_5 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":230 - * stdlib.strlen(format_info.name)) + /* "audiolab/pysndfile/_sndfile.pyx":232 + * strlen(format_info.name)) * * self._format_raw_int = format # <<<<<<<<<<<<<< * * property file_format: */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_format_raw_int = __pyx_v_format; + __pyx_v_self->_format_raw_int = __pyx_v_format; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Format.__init__"); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - Py_DECREF(__pyx_v_e); - Py_DECREF(__pyx_v_ret); - Py_DECREF(__pyx_v_msg); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_11file_format_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_11file_format_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_11file_format___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":234 +/* "audiolab/pysndfile/_sndfile.pyx":236 * property file_format: * """File format (wav, etc...).""" * def __get__(self): # <<<<<<<<<<<<<< @@ -1992,27 +2833,42 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__(PyO * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_11file_format___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_11file_format___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_11file_format___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":235 + /* "audiolab/pysndfile/_sndfile.pyx":237 * """File format (wav, etc...).""" * def __get__(self): * return self._type # <<<<<<<<<<<<<< * * property encoding: */ - Py_INCREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_type); - __pyx_r = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_type; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_type); + __pyx_r = __pyx_v_self->_type; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":239 +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_8encoding_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_8encoding_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_8encoding___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":241 * property encoding: * """File encoding (pcm16, etc...).""" * def __get__(self): # <<<<<<<<<<<<<< @@ -2020,27 +2876,42 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_11file * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_8encoding___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_8encoding___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_8encoding___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":240 + /* "audiolab/pysndfile/_sndfile.pyx":242 * """File encoding (pcm16, etc...).""" * def __get__(self): * return self._encoding # <<<<<<<<<<<<<< * * property endianness: */ - Py_INCREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding); - __pyx_r = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_encoding); + __pyx_r = __pyx_v_self->_encoding; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_10endianness_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_10endianness_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_10endianness___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":244 +/* "audiolab/pysndfile/_sndfile.pyx":246 * property endianness: * """File endianness (file, little, etc...).""" * def __get__(self): # <<<<<<<<<<<<<< @@ -2048,27 +2919,42 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_8encod * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_10endianness___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_10endianness___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_10endianness___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":245 + /* "audiolab/pysndfile/_sndfile.pyx":247 * """File endianness (file, little, etc...).""" * def __get__(self): * return self._endianness # <<<<<<<<<<<<<< * * property file_format_description: */ - Py_INCREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_endianness); - __pyx_r = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_endianness; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_endianness); + __pyx_r = __pyx_v_self->_endianness; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":249 +/* "audiolab/pysndfile/_sndfile.pyx":251 * property file_format_description: * """File format description: the full description from sndfile.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -2076,27 +2962,42 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_10endi * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":250 + /* "audiolab/pysndfile/_sndfile.pyx":252 * """File format description: the full description from sndfile.""" * def __get__(self): * return self._format_str # <<<<<<<<<<<<<< * * property encoding_description: */ - Py_INCREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_format_str); - __pyx_r = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_format_str; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_format_str); + __pyx_r = __pyx_v_self->_format_str; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":254 +/* "audiolab/pysndfile/_sndfile.pyx":256 * property encoding_description: * """File encoding description: the full description from sndfile.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -2104,27 +3005,31 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_23file * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":255 + /* "audiolab/pysndfile/_sndfile.pyx":257 * """File encoding description: the full description from sndfile.""" * def __get__(self): * return self._encoding_str # <<<<<<<<<<<<<< * * cdef int format_int(self): */ - Py_INCREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding_str); - __pyx_r = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding_str; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_encoding_str); + __pyx_r = __pyx_v_self->_encoding_str; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":257 +/* "audiolab/pysndfile/_sndfile.pyx":259 * return self._encoding_str * * cdef int format_int(self): # <<<<<<<<<<<<<< @@ -2132,10 +3037,12 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_20enco * and endianness).""" */ -static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_format_int(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { +static int __pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_format_int(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("format_int", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":260 + /* "audiolab/pysndfile/_sndfile.pyx":262 * """Return the full format integer (binary OR of file format, encoding * and endianness).""" * return self._format_raw_int # <<<<<<<<<<<<<< @@ -2147,10 +3054,11 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_format_int(s __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":262 +/* "audiolab/pysndfile/_sndfile.pyx":264 * return self._format_raw_int * * cdef int file_format_int(self): # <<<<<<<<<<<<<< @@ -2158,10 +3066,12 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_format_int(s * return self._format_raw_int & SF_FORMAT_TYPEMASK */ -static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format_int(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { +static int __pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_file_format_int(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("file_format_int", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":264 + /* "audiolab/pysndfile/_sndfile.pyx":266 * cdef int file_format_int(self): * """Return the file format int.""" * return self._format_raw_int & SF_FORMAT_TYPEMASK # <<<<<<<<<<<<<< @@ -2173,10 +3083,11 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format_ __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":266 +/* "audiolab/pysndfile/_sndfile.pyx":268 * return self._format_raw_int & SF_FORMAT_TYPEMASK * * cdef int encoding_int(self): # <<<<<<<<<<<<<< @@ -2184,10 +3095,12 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format_ * return self._format_raw_int & SF_FORMAT_SUBMASK */ -static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding_int(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { +static int __pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_encoding_int(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("encoding_int", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":268 + /* "audiolab/pysndfile/_sndfile.pyx":270 * cdef int encoding_int(self): * """Return the encoding part of the format int.""" * return self._format_raw_int & SF_FORMAT_SUBMASK # <<<<<<<<<<<<<< @@ -2199,10 +3112,11 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding_int __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":270 +/* "audiolab/pysndfile/_sndfile.pyx":272 * return self._format_raw_int & SF_FORMAT_SUBMASK * * cdef int endianness_int(self): # <<<<<<<<<<<<<< @@ -2210,10 +3124,12 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding_int * return self._format_raw_int & SF_FORMAT_ENDMASK */ -static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_endianness_int(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { +static int __pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_endianness_int(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("endianness_int", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":272 + /* "audiolab/pysndfile/_sndfile.pyx":274 * cdef int endianness_int(self): * """Return the endianness part of the format int.""" * return self._format_raw_int & SF_FORMAT_ENDMASK # <<<<<<<<<<<<<< @@ -2225,10 +3141,11 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_endianness_i __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":274 +/* "audiolab/pysndfile/_sndfile.pyx":276 * return self._format_raw_int & SF_FORMAT_ENDMASK * * cdef int _is_equal(self, Format other): # <<<<<<<<<<<<<< @@ -2236,10 +3153,12 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_endianness_i * */ -static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format__is_equal(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self, struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_other) { +static int __pyx_f_8audiolab_9pysndfile_8_sndfile_6Format__is_equal(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self, struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_other) { int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_is_equal", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":275 + /* "audiolab/pysndfile/_sndfile.pyx":277 * * cdef int _is_equal(self, Format other): * return self._format_raw_int == other._format_raw_int # <<<<<<<<<<<<<< @@ -2251,10 +3170,23 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format__is_equal(st __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":277 +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_3__copy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_6Format_2__copy__[] = "Format.__copy__(self)"; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_3__copy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__copy__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_2__copy__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":279 * return self._format_raw_int == other._format_raw_int * * def __copy__(self): # <<<<<<<<<<<<<< @@ -2262,110 +3194,152 @@ static int __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format__is_equal(st * return Format(typ, enc, endian) */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___copy__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___copy__[] = "Format.__copy__(self)"; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___copy__(PyObject *__pyx_v_self, PyObject *unused) { - PyObject *__pyx_v_typ; - PyObject *__pyx_v_enc; - PyObject *__pyx_v_endian; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_2__copy__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_v_typ = NULL; + PyObject *__pyx_v_enc = NULL; + PyObject *__pyx_v_endian = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __pyx_v_typ = Py_None; Py_INCREF(Py_None); - __pyx_v_enc = Py_None; Py_INCREF(Py_None); - __pyx_v_endian = Py_None; Py_INCREF(Py_None); + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__copy__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":278 + /* "audiolab/pysndfile/_sndfile.pyx":280 * * def __copy__(self): * typ, enc, endian = int_to_format(self._format_raw_int) # <<<<<<<<<<<<<< * return Format(typ, enc, endian) * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_format_raw_int); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyTuple_CheckExact(__pyx_t_1) && PyTuple_GET_SIZE(__pyx_t_1) == 3) { - PyObject* tuple = __pyx_t_1; - __pyx_2 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(__pyx_2); - __pyx_3 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(__pyx_3); - __pyx_4 = PyTuple_GET_ITEM(tuple, 2); Py_INCREF(__pyx_4); - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - Py_DECREF(__pyx_v_typ); - __pyx_v_typ = __pyx_2; - __pyx_2 = 0; - Py_DECREF(__pyx_v_enc); - __pyx_v_enc = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_endian); - __pyx_v_endian = __pyx_4; - __pyx_4 = 0; - } else { - __pyx_1 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = __Pyx_UnpackItem(__pyx_1, 2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_v_typ); - __pyx_v_typ = __pyx_2; - __pyx_2 = 0; - Py_DECREF(__pyx_v_enc); - __pyx_v_enc = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_endian); - __pyx_v_endian = __pyx_4; - __pyx_4 = 0; - } - /* __pyx_t_1 released */ - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":279 + __pyx_t_1 = __pyx_f_8audiolab_9pysndfile_8_sndfile_int_to_format(__pyx_v_self->_format_raw_int); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + __pyx_t_4 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L4_unpacking_done:; + } + __pyx_v_typ = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_enc = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_endian = __pyx_t_4; + __pyx_t_4 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":281 * def __copy__(self): * typ, enc, endian = int_to_format(self._format_raw_int) * return Format(typ, enc, endian) # <<<<<<<<<<<<<< * * def __deepcopy__(self): */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_typ); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_typ); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_typ); - Py_INCREF(__pyx_v_enc); + __Pyx_GIVEREF(__pyx_v_typ); + __Pyx_INCREF(__pyx_v_enc); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_enc); - Py_INCREF(__pyx_v_endian); + __Pyx_GIVEREF(__pyx_v_enc); + __Pyx_INCREF(__pyx_v_endian); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_endian); - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __Pyx_GIVEREF(__pyx_v_endian); + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8audiolab_9pysndfile_8_sndfile_Format)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Format.__copy__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__copy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_typ); - Py_DECREF(__pyx_v_enc); - Py_DECREF(__pyx_v_endian); + __Pyx_XDECREF(__pyx_v_typ); + __Pyx_XDECREF(__pyx_v_enc); + __Pyx_XDECREF(__pyx_v_endian); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_5__deepcopy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_6Format_4__deepcopy__[] = "Format.__deepcopy__(self)"; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_5__deepcopy__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_4__deepcopy__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":281 +/* "audiolab/pysndfile/_sndfile.pyx":283 * return Format(typ, enc, endian) * * def __deepcopy__(self): # <<<<<<<<<<<<<< @@ -2373,41 +3347,58 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___copy * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___deepcopy__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___deepcopy__[] = "Format.__deepcopy__(self)"; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___deepcopy__(PyObject *__pyx_v_self, PyObject *unused) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_4__deepcopy__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":282 + /* "audiolab/pysndfile/_sndfile.pyx":284 * * def __deepcopy__(self): * return self.__copy__() # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___copy__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____copy__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Format.__deepcopy__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_6__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":284 +/* "audiolab/pysndfile/_sndfile.pyx":286 * return self.__copy__() * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -2415,175 +3406,196 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___deep * raise NotImplementedError() */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { - PyObject *__pyx_v_eq; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_6__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { + int __pyx_v_eq; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; int __pyx_t_4; - __pyx_v_eq = Py_None; Py_INCREF(Py_None); + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":285 + /* "audiolab/pysndfile/_sndfile.pyx":287 * * def __richcmp__(self, other, int op): * if not other.__class__ == self.__class__: # <<<<<<<<<<<<<< * raise NotImplementedError() * if Format._is_equal(self, other): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_other, __pyx_kp___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_1, __pyx_2, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = (!__pyx_t_2); - if (__pyx_t_3) { - /* __pyx_t_3 released */ + __pyx_t_1 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____class__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (__pyx_t_5) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":286 + /* "audiolab/pysndfile/_sndfile.pyx":288 * def __richcmp__(self, other, int op): * if not other.__class__ == self.__class__: * raise NotImplementedError() # <<<<<<<<<<<<<< * if Format._is_equal(self, other): * eq = True */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_Raise(__pyx_t_1, 0, 0); - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + __pyx_t_3 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":287 + /* "audiolab/pysndfile/_sndfile.pyx":289 * if not other.__class__ == self.__class__: * raise NotImplementedError() * if Format._is_equal(self, other): # <<<<<<<<<<<<<< * eq = True * else: */ - if (!(__Pyx_TypeTest(__pyx_v_self, __pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (!(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = __pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Format->_is_equal(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self), ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_other)); - if (__pyx_t_4) { - /* __pyx_t_4 released */ + if (!(likely(((__pyx_v_self) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self, __pyx_ptype_8audiolab_9pysndfile_8_sndfile_Format))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_v_self; + __Pyx_INCREF(__pyx_t_3); + if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_8audiolab_9pysndfile_8_sndfile_Format))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_v_other; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = __pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Format->_is_equal(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_t_3), ((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_6) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":288 + /* "audiolab/pysndfile/_sndfile.pyx":290 * raise NotImplementedError() * if Format._is_equal(self, other): * eq = True # <<<<<<<<<<<<<< * else: * eq = False */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_eq); - __pyx_v_eq = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - goto __pyx_L6; + __pyx_v_eq = 1; + goto __pyx_L4; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":290 + /* "audiolab/pysndfile/_sndfile.pyx":292 * eq = True * else: * eq = False # <<<<<<<<<<<<<< * if op == 2: * return eq */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_eq); - __pyx_v_eq = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_v_eq = 0; } - __pyx_L6:; + __pyx_L4:; + + /* "audiolab/pysndfile/_sndfile.pyx":295 + * if op == 2: + * return eq + * elif op == 3: # <<<<<<<<<<<<<< + * return not eq + * else: + */ + switch (__pyx_v_op) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":291 + /* "audiolab/pysndfile/_sndfile.pyx":293 * else: * eq = False * if op == 2: # <<<<<<<<<<<<<< * return eq * elif op == 3: */ - switch (__pyx_v_op) { case 2: - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":292 + /* "audiolab/pysndfile/_sndfile.pyx":294 * eq = False * if op == 2: * return eq # <<<<<<<<<<<<<< * elif op == 3: * return not eq */ - Py_INCREF(__pyx_v_eq); - __pyx_r = __pyx_v_eq; + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_eq); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; break; + + /* "audiolab/pysndfile/_sndfile.pyx":295 + * if op == 2: + * return eq + * elif op == 3: # <<<<<<<<<<<<<< + * return not eq + * else: + */ case 3: - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":294 + /* "audiolab/pysndfile/_sndfile.pyx":296 * return eq * elif op == 3: * return not eq # <<<<<<<<<<<<<< * else: * raise TypeError() */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_v_eq)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; break; default: - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":296 + /* "audiolab/pysndfile/_sndfile.pyx":298 * return not eq * else: * raise TypeError() # <<<<<<<<<<<<<< * * # Syntactic sugar */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_Raise(__pyx_t_1, 0, 0); - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Format.__richcmp__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_eq); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":299 +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_9__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_9__str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_8__str__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":301 * * # Syntactic sugar * def __str__(self): # <<<<<<<<<<<<<< @@ -2591,116 +3603,130 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___rich * s += ["Encoding Format: %s" % self._encoding_str] */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___str__(PyObject *__pyx_v_self) { - PyObject *__pyx_v_s; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_8__str__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __pyx_v_s = Py_None; Py_INCREF(Py_None); + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":300 + /* "audiolab/pysndfile/_sndfile.pyx":302 * # Syntactic sugar * def __str__(self): * s = ["Major Format: %s" % self._format_str] # <<<<<<<<<<<<<< * s += ["Encoding Format: %s" % self._encoding_str] * s += ["Endianness: %s" % self.endianness] */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_106, ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_format_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), __pyx_v_self->_format_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - Py_DECREF(__pyx_v_s); - __pyx_v_s = ((PyObject *)__pyx_t_2); + __pyx_v_s = __pyx_t_2; __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":301 + /* "audiolab/pysndfile/_sndfile.pyx":303 * def __str__(self): * s = ["Major Format: %s" % self._format_str] * s += ["Encoding Format: %s" % self._encoding_str] # <<<<<<<<<<<<<< * s += ["Endianness: %s" % self.endianness] * return "\n".join(s) */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_107, ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)->_encoding_str); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), __pyx_v_self->_encoding_str); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_s), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_s)); + __pyx_v_s = __pyx_t_2; __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_s, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - Py_DECREF(__pyx_v_s); - __pyx_v_s = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":302 + + /* "audiolab/pysndfile/_sndfile.pyx":304 * s = ["Major Format: %s" % self._format_str] * s += ["Encoding Format: %s" % self._encoding_str] * s += ["Endianness: %s" % self.endianness] # <<<<<<<<<<<<<< * return "\n".join(s) * */ - __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_endianness); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_108, __pyx_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__endianness); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_s, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - Py_DECREF(__pyx_v_s); - __pyx_v_s = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":303 + __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_s), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_s)); + __pyx_v_s = __pyx_t_1; + __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":305 * s += ["Encoding Format: %s" % self._encoding_str] * s += ["Endianness: %s" % self.endianness] * return "\n".join(s) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_2 = PyObject_GetAttr(__pyx_kp_109, __pyx_kp_join); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_s); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s); - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_18), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_s)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_s)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_s)); + __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Format.__str__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_s); + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_11__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_11__repr__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_10__repr__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":305 +/* "audiolab/pysndfile/_sndfile.pyx":307 * return "\n".join(s) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -2708,40 +3734,60 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___str_ * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___repr__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___repr__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_6Format_10__repr__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":306 + /* "audiolab/pysndfile/_sndfile.pyx":308 * * def __repr__(self): * return self.__str__() # <<<<<<<<<<<<<< * * def available_file_formats(): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___str__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____str__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Format.__repr__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Format.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_3available_file_formats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_2available_file_formats[] = "available_file_formats()\nReturn lists of available file formats supported by audiolab."; +static PyMethodDef __pyx_mdef_8audiolab_9pysndfile_8_sndfile_3available_file_formats = {__Pyx_NAMESTR("available_file_formats"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_3available_file_formats, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_2available_file_formats)}; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_3available_file_formats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("available_file_formats (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_2available_file_formats(__pyx_self); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":308 +/* "audiolab/pysndfile/_sndfile.pyx":310 * return self.__str__() * * def available_file_formats(): # <<<<<<<<<<<<<< @@ -2749,213 +3795,226 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___repr * ret = [] */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_file_formats(PyObject *__pyx_self, PyObject *unused); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_available_file_formats[] = "available_file_formats()\nReturn lists of available file formats supported by audiolab."; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_file_formats(PyObject *__pyx_self, PyObject *unused) { - PyObject *__pyx_v_ret; - PyObject *__pyx_v_i; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_2available_file_formats(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - __pyx_self = __pyx_self; - __pyx_v_ret = Py_None; Py_INCREF(Py_None); - __pyx_v_i = Py_None; Py_INCREF(Py_None); + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("available_file_formats", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":310 + /* "audiolab/pysndfile/_sndfile.pyx":312 * def available_file_formats(): * """Return lists of available file formats supported by audiolab.""" * ret = [] # <<<<<<<<<<<<<< * for i in _major_formats_int(): * # Handle the case where libsndfile supports a format we don't */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_ret); - __pyx_v_ret = ((PyObject *)__pyx_t_1); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":311 + /* "audiolab/pysndfile/_sndfile.pyx":313 * """Return lists of available file formats supported by audiolab.""" * ret = [] * for i in _major_formats_int(): # <<<<<<<<<<<<<< * # Handle the case where libsndfile supports a format we don't * if not _ENUM_TO_STR_FILE_FORMAT.has_key(i & SF_FORMAT_TYPEMASK): */ - /* __pyx_t_2 allocated */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__major_formats_int(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ + __pyx_t_1 = __pyx_f_8audiolab_9pysndfile_8_sndfile__major_formats_int(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_1; Py_INCREF(__pyx_t_3); + __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; + __pyx_t_4 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; } - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - /* __pyx_t_1 allocated */ - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); Py_INCREF(__pyx_t_1); __pyx_t_2++; - } else if (likely(PyTuple_CheckExact(__pyx_t_3))) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); Py_INCREF(__pyx_t_1); __pyx_t_2++; + if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) { + if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_1 = PyIter_Next(__pyx_t_3); - if (!__pyx_t_1) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } break; } + __Pyx_GOTREF(__pyx_t_1); } - Py_DECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_i); __pyx_v_i = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":313 + /* "audiolab/pysndfile/_sndfile.pyx":315 * for i in _major_formats_int(): * # Handle the case where libsndfile supports a format we don't * if not _ENUM_TO_STR_FILE_FORMAT.has_key(i & SF_FORMAT_TYPEMASK): # <<<<<<<<<<<<<< * warnings.warn("Format %#10x supported by libsndfile but not " * "yet supported by audiolab" % */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_86); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_has_key); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_TYPEMASK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyNumber_And(__pyx_v_i, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); - __pyx_t_4 = 0; - /* __pyx_t_4 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = (!__pyx_t_5); - if (__pyx_t_6) { - /* __pyx_t_6 released */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_19); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__has_key); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyInt_FromLong(SF_FORMAT_TYPEMASK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyNumber_And(__pyx_v_i, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = (!__pyx_t_7); + if (__pyx_t_8) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":314 + /* "audiolab/pysndfile/_sndfile.pyx":316 * # Handle the case where libsndfile supports a format we don't * if not _ENUM_TO_STR_FILE_FORMAT.has_key(i & SF_FORMAT_TYPEMASK): * warnings.warn("Format %#10x supported by libsndfile but not " # <<<<<<<<<<<<<< * "yet supported by audiolab" % * (i & SF_FORMAT_TYPEMASK)) */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_warnings); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_warn); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__warn); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":316 + /* "audiolab/pysndfile/_sndfile.pyx":318 * warnings.warn("Format %#10x supported by libsndfile but not " * "yet supported by audiolab" % * (i & SF_FORMAT_TYPEMASK)) # <<<<<<<<<<<<<< * else: * ret.append(_ENUM_TO_STR_FILE_FORMAT[i & SF_FORMAT_TYPEMASK]) */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyInt_FromLong(SF_FORMAT_TYPEMASK); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_And(__pyx_v_i, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyNumber_Remainder(__pyx_kp_110, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); - __pyx_t_4 = 0; - /* __pyx_t_4 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - goto __pyx_L7; + __pyx_t_6 = PyInt_FromLong(SF_FORMAT_TYPEMASK); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyNumber_And(__pyx_v_i, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_20), __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L5; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":318 + /* "audiolab/pysndfile/_sndfile.pyx":320 * (i & SF_FORMAT_TYPEMASK)) * else: * ret.append(_ENUM_TO_STR_FILE_FORMAT[i & SF_FORMAT_TYPEMASK]) # <<<<<<<<<<<<<< * return ret * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_86); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyInt_FromLong(SF_FORMAT_TYPEMASK); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_And(__pyx_v_i, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - __pyx_2 = PyObject_GetItem(__pyx_1, __pyx_t_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_ret, __pyx_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_19); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyInt_FromLong(SF_FORMAT_TYPEMASK); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyNumber_And(__pyx_v_i, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_GetItem(__pyx_t_6, __pyx_t_1); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = PyList_Append(__pyx_v_ret, __pyx_t_5); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_L7:; + __pyx_L5:; } - /* __pyx_t_2 released */ - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":319 + /* "audiolab/pysndfile/_sndfile.pyx":321 * else: * ret.append(_ENUM_TO_STR_FILE_FORMAT[i & SF_FORMAT_TYPEMASK]) * return ret # <<<<<<<<<<<<<< * * def available_encodings(major): */ - Py_INCREF(__pyx_v_ret); - __pyx_r = __pyx_v_ret; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_ret)); + __pyx_r = ((PyObject *)__pyx_v_ret); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_3); - Py_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.available_file_formats"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.available_file_formats", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_ret); - Py_DECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_ret); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_5available_encodings(PyObject *__pyx_self, PyObject *__pyx_v_major); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_4available_encodings[] = "available_encodings(major)\nReturn lists of available encoding for the given major format."; +static PyMethodDef __pyx_mdef_8audiolab_9pysndfile_8_sndfile_5available_encodings = {__Pyx_NAMESTR("available_encodings"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_5available_encodings, METH_O, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_4available_encodings)}; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_5available_encodings(PyObject *__pyx_self, PyObject *__pyx_v_major) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("available_encodings (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_4available_encodings(__pyx_self, ((PyObject *)__pyx_v_major)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":321 +/* "audiolab/pysndfile/_sndfile.pyx":323 * return ret * * def available_encodings(major): # <<<<<<<<<<<<<< @@ -2963,276 +4022,271 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_file * if not _SNDFILE_FILE_FORMAT.has_key(major): */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_encodings(PyObject *__pyx_self, PyObject *__pyx_v_major); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_available_encodings[] = "available_encodings(major)\nReturn lists of available encoding for the given major format."; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_encodings(PyObject *__pyx_self, PyObject *__pyx_v_major) { - PyObject *__pyx_v_ret; - PyObject *__pyx_v_i; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_4available_encodings(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_major) { + PyObject *__pyx_v_ret = NULL; + PyObject *__pyx_v_i = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; + PyObject *__pyx_t_3 = NULL; int __pyx_t_4; - Py_ssize_t __pyx_t_5; + int __pyx_t_5; int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - __pyx_self = __pyx_self; - __pyx_v_ret = Py_None; Py_INCREF(Py_None); - __pyx_v_i = Py_None; Py_INCREF(Py_None); - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":323 + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("available_encodings", 0); + + /* "audiolab/pysndfile/_sndfile.pyx":325 * def available_encodings(major): * """Return lists of available encoding for the given major format.""" * if not _SNDFILE_FILE_FORMAT.has_key(major): # <<<<<<<<<<<<<< * raise ValueError("Unknown file format %s" % major) * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_has_key); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_major); + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__has_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_major); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_major); - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = (!__pyx_t_3); - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __Pyx_GIVEREF(__pyx_v_major); + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (__pyx_t_5) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":324 + /* "audiolab/pysndfile/_sndfile.pyx":326 * """Return lists of available encoding for the given major format.""" * if not _SNDFILE_FILE_FORMAT.has_key(major): * raise ValueError("Unknown file format %s" % major) # <<<<<<<<<<<<<< * * ret = [] */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_111, __pyx_v_major); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_21), __pyx_v_major); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":326 + /* "audiolab/pysndfile/_sndfile.pyx":328 * raise ValueError("Unknown file format %s" % major) * * ret = [] # <<<<<<<<<<<<<< * for i in _sub_formats_int(_SNDFILE_FILE_FORMAT[major]): * # Handle the case where libsndfile supports an encoding we don't */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_ret); - __pyx_v_ret = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ret = __pyx_t_3; + __pyx_t_3 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":327 + /* "audiolab/pysndfile/_sndfile.pyx":329 * * ret = [] * for i in _sub_formats_int(_SNDFILE_FILE_FORMAT[major]): # <<<<<<<<<<<<<< * # Handle the case where libsndfile supports an encoding we don't * if not _ENUM_TO_STR_ENCODING.has_key(i & SF_FORMAT_SUBMASK): */ - /* __pyx_t_5 allocated */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetItem(__pyx_1, __pyx_v_major); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_6 allocated */ - __pyx_t_6 = __pyx_PyInt_int(__pyx_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_2 allocated */ - __pyx_t_2 = __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_int(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_6 released */ - /* __pyx_t_1 allocated */ - if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_2; Py_INCREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_v_major); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_f_8audiolab_9pysndfile_8_sndfile__sub_formats_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; } - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - /* __pyx_t_2 allocated */ - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); Py_INCREF(__pyx_t_2); __pyx_t_5++; - } else if (likely(PyTuple_CheckExact(__pyx_t_1))) { - if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); Py_INCREF(__pyx_t_2); __pyx_t_5++; + if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_3)) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_3)) { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_2 = PyIter_Next(__pyx_t_1); - if (!__pyx_t_2) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_t_8(__pyx_t_3); + if (unlikely(!__pyx_t_1)) { + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } break; } + __Pyx_GOTREF(__pyx_t_1); } - Py_DECREF(__pyx_v_i); - __pyx_v_i = __pyx_t_2; - __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __Pyx_XDECREF(__pyx_v_i); + __pyx_v_i = __pyx_t_1; + __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":329 + /* "audiolab/pysndfile/_sndfile.pyx":331 * for i in _sub_formats_int(_SNDFILE_FILE_FORMAT[major]): * # Handle the case where libsndfile supports an encoding we don't * if not _ENUM_TO_STR_ENCODING.has_key(i & SF_FORMAT_SUBMASK): # <<<<<<<<<<<<<< * warnings.warn("Encoding %#10x supported by libsndfile but not " * "yet supported by audiolab" % */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_85); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_has_key); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(SF_FORMAT_SUBMASK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_7 allocated */ - __pyx_t_7 = PyNumber_And(__pyx_v_i, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); - __pyx_t_7 = 0; - /* __pyx_t_7 released */ - /* __pyx_t_7 allocated */ - __pyx_t_7 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* __pyx_t_7 released */ - /* __pyx_t_8 allocated */ - __pyx_t_8 = (!__pyx_t_4); - if (__pyx_t_8) { - /* __pyx_t_8 released */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__has_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyInt_FromLong(SF_FORMAT_SUBMASK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = PyNumber_And(__pyx_v_i, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = (!__pyx_t_5); + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":330 + /* "audiolab/pysndfile/_sndfile.pyx":332 * # Handle the case where libsndfile supports an encoding we don't * if not _ENUM_TO_STR_ENCODING.has_key(i & SF_FORMAT_SUBMASK): * warnings.warn("Encoding %#10x supported by libsndfile but not " # <<<<<<<<<<<<<< * "yet supported by audiolab" % * (i & SF_FORMAT_SUBMASK)) */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_warnings); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_warn); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__warnings); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__warn); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":332 + /* "audiolab/pysndfile/_sndfile.pyx":334 * warnings.warn("Encoding %#10x supported by libsndfile but not " * "yet supported by audiolab" % * (i & SF_FORMAT_SUBMASK)) # <<<<<<<<<<<<<< * else: * ret.append(_ENUM_TO_STR_ENCODING[i & SF_FORMAT_SUBMASK]) */ - /* __pyx_t_7 allocated */ - __pyx_t_7 = PyInt_FromLong(SF_FORMAT_SUBMASK); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_And(__pyx_v_i, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* __pyx_t_7 released */ - /* __pyx_t_7 allocated */ - __pyx_t_7 = PyNumber_Remainder(__pyx_kp_112, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); - __pyx_t_7 = 0; - /* __pyx_t_7 released */ - /* __pyx_t_7 allocated */ - __pyx_t_7 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - Py_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* __pyx_t_7 released */ - goto __pyx_L8; + __pyx_t_9 = PyInt_FromLong(SF_FORMAT_SUBMASK); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = PyNumber_And(__pyx_v_i, __pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_9)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_9)); + __pyx_t_9 = 0; + __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L6; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":334 + /* "audiolab/pysndfile/_sndfile.pyx":336 * (i & SF_FORMAT_SUBMASK)) * else: * ret.append(_ENUM_TO_STR_ENCODING[i & SF_FORMAT_SUBMASK]) # <<<<<<<<<<<<<< * return ret * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_85); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_7 allocated */ - __pyx_t_7 = PyInt_FromLong(SF_FORMAT_SUBMASK); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_And(__pyx_v_i, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* __pyx_t_7 released */ - __pyx_2 = PyObject_GetItem(__pyx_1, __pyx_t_2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_ret, __pyx_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s_22); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_SUBMASK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_And(__pyx_v_i, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_GetItem(__pyx_t_9, __pyx_t_1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = PyList_Append(__pyx_v_ret, __pyx_t_2); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_L8:; + __pyx_L6:; } - /* __pyx_t_5 released */ - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":335 + /* "audiolab/pysndfile/_sndfile.pyx":337 * else: * ret.append(_ENUM_TO_STR_ENCODING[i & SF_FORMAT_SUBMASK]) * return ret # <<<<<<<<<<<<<< * * cdef _sub_formats_int(int format): */ - Py_INCREF(__pyx_v_ret); - __pyx_r = __pyx_v_ret; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_ret)); + __pyx_r = ((PyObject *)__pyx_v_ret); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.available_encodings"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.available_encodings", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_ret); - Py_DECREF(__pyx_v_i); + __Pyx_XDECREF(__pyx_v_ret); + __Pyx_XDECREF(__pyx_v_i); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":337 +/* "audiolab/pysndfile/_sndfile.pyx":339 * return ret * * cdef _sub_formats_int(int format): # <<<<<<<<<<<<<< @@ -3240,20 +4294,26 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_enco * */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_int(int __pyx_v_format) { +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile__sub_formats_int(int __pyx_v_format) { int __pyx_v_st; int __pyx_v_nsub; int __pyx_v_i; SF_FORMAT_INFO __pyx_v_info; SF_INFO __pyx_v_sfinfo; - PyObject *__pyx_v_subs; - PyObject *__pyx_r; - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - __pyx_v_subs = Py_None; Py_INCREF(Py_None); + PyObject *__pyx_v_subs = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_sub_formats_int", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":347 + /* "audiolab/pysndfile/_sndfile.pyx":349 * cdef SF_INFO sfinfo * * st = sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &nsub, sizeof(int)) # <<<<<<<<<<<<<< @@ -3262,56 +4322,44 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i */ __pyx_v_st = sf_command(NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, (&__pyx_v_nsub), (sizeof(int))); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":348 + /* "audiolab/pysndfile/_sndfile.pyx":350 * * st = sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &nsub, sizeof(int)) * if st: # <<<<<<<<<<<<<< * raise RuntimeError("Error while calling sf_command") * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __pyx_v_st; - if (__pyx_t_1) { - /* __pyx_t_1 released */ + if (__pyx_v_st) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":349 + /* "audiolab/pysndfile/_sndfile.pyx":351 * st = sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &nsub, sizeof(int)) * if st: * raise RuntimeError("Error while calling sf_command") # <<<<<<<<<<<<<< * * subs = [] */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_113); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_113); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":351 + /* "audiolab/pysndfile/_sndfile.pyx":353 * raise RuntimeError("Error while calling sf_command") * * subs = [] # <<<<<<<<<<<<<< * # Not used, but necessary to pass sfinfo to sf_format_check * sfinfo.channels = 1 */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_subs); - __pyx_v_subs = ((PyObject *)__pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_subs = __pyx_t_1; + __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":353 + /* "audiolab/pysndfile/_sndfile.pyx":355 * subs = [] * # Not used, but necessary to pass sfinfo to sf_format_check * sfinfo.channels = 1 # <<<<<<<<<<<<<< @@ -3320,7 +4368,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i */ __pyx_v_sfinfo.channels = 1; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":354 + /* "audiolab/pysndfile/_sndfile.pyx":356 * # Not used, but necessary to pass sfinfo to sf_format_check * sfinfo.channels = 1 * sfinfo.samplerate = 8000 # <<<<<<<<<<<<<< @@ -3329,16 +4377,18 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i */ __pyx_v_sfinfo.samplerate = 8000; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":355 + /* "audiolab/pysndfile/_sndfile.pyx":357 * sfinfo.channels = 1 * sfinfo.samplerate = 8000 * for i in range(nsub): # <<<<<<<<<<<<<< * info.format = i * sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &info, sizeof (info)) */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_nsub; __pyx_v_i+=1) { + __pyx_t_2 = __pyx_v_nsub; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":356 + /* "audiolab/pysndfile/_sndfile.pyx":358 * sfinfo.samplerate = 8000 * for i in range(nsub): * info.format = i # <<<<<<<<<<<<<< @@ -3347,7 +4397,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i */ __pyx_v_info.format = __pyx_v_i; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":357 + /* "audiolab/pysndfile/_sndfile.pyx":359 * for i in range(nsub): * info.format = i * sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &info, sizeof (info)) # <<<<<<<<<<<<<< @@ -3356,7 +4406,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i */ sf_command(NULL, SFC_GET_FORMAT_SUBTYPE, (&__pyx_v_info), (sizeof(__pyx_v_info))); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":358 + /* "audiolab/pysndfile/_sndfile.pyx":360 * info.format = i * sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &info, sizeof (info)) * format = (format & SF_FORMAT_TYPEMASK) | info.format # <<<<<<<<<<<<<< @@ -3365,7 +4415,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i */ __pyx_v_format = ((__pyx_v_format & SF_FORMAT_TYPEMASK) | __pyx_v_info.format); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":360 + /* "audiolab/pysndfile/_sndfile.pyx":362 * format = (format & SF_FORMAT_TYPEMASK) | info.format * * sfinfo.format = format # <<<<<<<<<<<<<< @@ -3374,62 +4424,58 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i */ __pyx_v_sfinfo.format = __pyx_v_format; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":361 + /* "audiolab/pysndfile/_sndfile.pyx":363 * * sfinfo.format = format * if sf_format_check(&sfinfo): # <<<<<<<<<<<<<< * subs.append(info.format) * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = sf_format_check((&__pyx_v_sfinfo)); - if (__pyx_t_1) { - /* __pyx_t_1 released */ + __pyx_t_4 = sf_format_check((&__pyx_v_sfinfo)); + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":362 + /* "audiolab/pysndfile/_sndfile.pyx":364 * sfinfo.format = format * if sf_format_check(&sfinfo): * subs.append(info.format) # <<<<<<<<<<<<<< * * return subs */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_info.format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_subs, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_t_1 = PyInt_FromLong(__pyx_v_info.format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyList_Append(__pyx_v_subs, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } __pyx_L6:; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":364 + /* "audiolab/pysndfile/_sndfile.pyx":366 * subs.append(info.format) * * return subs # <<<<<<<<<<<<<< * * cdef _major_formats_int(): */ - Py_INCREF(__pyx_v_subs); - __pyx_r = __pyx_v_subs; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_subs)); + __pyx_r = ((PyObject *)__pyx_v_subs); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile._sub_formats_int"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile._sub_formats_int", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; - Py_DECREF(__pyx_v_subs); + __Pyx_XDECREF(__pyx_v_subs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":366 +/* "audiolab/pysndfile/_sndfile.pyx":368 * return subs * * cdef _major_formats_int(): # <<<<<<<<<<<<<< @@ -3437,19 +4483,24 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__sub_formats_i * cdef int st, nmajor */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__major_formats_int(void) { +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile__major_formats_int(void) { int __pyx_v_st; int __pyx_v_nmajor; int __pyx_v_i; SF_FORMAT_INFO __pyx_v_info; - PyObject *__pyx_v_majors; - PyObject *__pyx_r; - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - __pyx_v_majors = Py_None; Py_INCREF(Py_None); + PyObject *__pyx_v_majors = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_major_formats_int", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":372 + /* "audiolab/pysndfile/_sndfile.pyx":374 * cdef SF_FORMAT_INFO info * * st = sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &nmajor, sizeof(int)) # <<<<<<<<<<<<<< @@ -3458,65 +4509,55 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__major_formats */ __pyx_v_st = sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT, (&__pyx_v_nmajor), (sizeof(int))); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":373 + /* "audiolab/pysndfile/_sndfile.pyx":375 * * st = sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &nmajor, sizeof(int)) * if st: # <<<<<<<<<<<<<< * raise RuntimeError("Error while calling sf_command") * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __pyx_v_st; - if (__pyx_t_1) { - /* __pyx_t_1 released */ + if (__pyx_v_st) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":374 + /* "audiolab/pysndfile/_sndfile.pyx":376 * st = sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &nmajor, sizeof(int)) * if st: * raise RuntimeError("Error while calling sf_command") # <<<<<<<<<<<<<< * * majors = [] */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_114); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_114); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":376 + /* "audiolab/pysndfile/_sndfile.pyx":378 * raise RuntimeError("Error while calling sf_command") * * majors = [] # <<<<<<<<<<<<<< * for i in range(nmajor): * info.format = i */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_majors); - __pyx_v_majors = ((PyObject *)__pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_majors = __pyx_t_1; + __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":377 + /* "audiolab/pysndfile/_sndfile.pyx":379 * * majors = [] * for i in range(nmajor): # <<<<<<<<<<<<<< * info.format = i * sf_command (NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)) */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_nmajor; __pyx_v_i+=1) { + __pyx_t_2 = __pyx_v_nmajor; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":378 + /* "audiolab/pysndfile/_sndfile.pyx":380 * majors = [] * for i in range(nmajor): * info.format = i # <<<<<<<<<<<<<< @@ -3525,7 +4566,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__major_formats */ __pyx_v_info.format = __pyx_v_i; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":379 + /* "audiolab/pysndfile/_sndfile.pyx":381 * for i in range(nmajor): * info.format = i * sf_command (NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)) # <<<<<<<<<<<<<< @@ -3534,177 +4575,207 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile__major_formats */ sf_command(NULL, SFC_GET_FORMAT_MAJOR, (&__pyx_v_info), (sizeof(__pyx_v_info))); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":380 + /* "audiolab/pysndfile/_sndfile.pyx":382 * info.format = i * sf_command (NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)) * majors.append(info.format) # <<<<<<<<<<<<<< * * return majors */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_info.format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_Append(__pyx_v_majors, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_t_1 = PyInt_FromLong(__pyx_v_info.format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyList_Append(__pyx_v_majors, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":382 + /* "audiolab/pysndfile/_sndfile.pyx":384 * majors.append(info.format) * * return majors # <<<<<<<<<<<<<< * * cdef class Sndfile: */ - Py_INCREF(__pyx_v_majors); - __pyx_r = __pyx_v_majors; + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_majors)); + __pyx_r = ((PyObject *)__pyx_v_majors); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile._major_formats_int"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile._major_formats_int", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; - Py_DECREF(__pyx_v_majors); + __Pyx_XDECREF(__pyx_v_majors); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":419 - * cdef int _mode - * cdef SF_INFO _sfinfo - * def __init__(Sndfile self, filename, mode='r', Format format=None, # <<<<<<<<<<<<<< - * int channels=0, int samplerate=0): - * cdef int sfmode - */ - -static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static int __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_mode = 0; - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_format = 0; + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_format = 0; int __pyx_v_channels; int __pyx_v_samplerate; - int __pyx_v_sfmode; - PyObject *__pyx_v_msg; - PyObject *__pyx_v_type; - PyObject *__pyx_v_enc; - PyObject *__pyx_v_endian; int __pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - char *__pyx_t_8; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_filename,&__pyx_kp_mode,&__pyx_kp_format,&__pyx_kp_channels,&__pyx_kp_samplerate,0}; - __pyx_v_mode = __pyx_kp_90; - __pyx_v_format = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)Py_None); - __pyx_v_channels = 0; - __pyx_v_samplerate = 0; - if (unlikely(__pyx_kwds)) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__filename,&__pyx_n_s__mode,&__pyx_n_s__format,&__pyx_n_s__channels,&__pyx_n_s__samplerate,0}; PyObject* values[5] = {0,0,0,0,0}; - Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); - case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); - case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); - case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_filename); - if (likely(values[0])) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - __pyx_v_filename = values[0]; - if (values[1]) { - __pyx_v_mode = values[1]; - } - if (values[2]) { - __pyx_v_format = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)values[2]); - } - if (values[3]) { - __pyx_v_channels = __pyx_PyInt_int(values[3]); if (unlikely((__pyx_v_channels == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - if (values[4]) { - __pyx_v_samplerate = __pyx_PyInt_int(values[4]); if (unlikely((__pyx_v_samplerate == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 5: __pyx_v_samplerate = __pyx_PyInt_int(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_samplerate == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - case 4: __pyx_v_channels = __pyx_PyInt_int(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_channels == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - case 3: __pyx_v_format = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)PyTuple_GET_ITEM(__pyx_args, 2)); - case 2: __pyx_v_mode = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: __pyx_v_filename = PyTuple_GET_ITEM(__pyx_args, 0); - break; - default: goto __pyx_L5_argtuple_error; - } - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_L3_error:; - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.__init__"); + values[1] = ((PyObject *)__pyx_n_s__r); + + /* "audiolab/pysndfile/_sndfile.pyx":422 + * cdef int _mode + * cdef SF_INFO _sfinfo + * def __init__(Sndfile self, filename, mode='r', Format format=None, # <<<<<<<<<<<<<< + * int channels=0, int samplerate=0): + * cdef int sfmode + */ + values[2] = (PyObject *)((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__format); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__channels); + if (value) { values[3] = value; kw_args--; } + } + case 4: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samplerate); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_filename = values[0]; + __pyx_v_mode = values[1]; + __pyx_v_format = ((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)values[2]); + if (values[3]) { + __pyx_v_channels = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_channels == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_channels = ((int)0); + } + if (values[4]) { + __pyx_v_samplerate = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_samplerate == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_samplerate = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_v_msg = Py_None; Py_INCREF(Py_None); - __pyx_v_type = Py_None; Py_INCREF(Py_None); - __pyx_v_enc = Py_None; Py_INCREF(Py_None); - __pyx_v_endian = Py_None; Py_INCREF(Py_None); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_format), __pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format, 1, "format", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_format), __pyx_ptype_8audiolab_9pysndfile_8_sndfile_Format, 1, "format", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_format, __pyx_v_channels, __pyx_v_samplerate); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":424 +static int __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *__pyx_v_format, int __pyx_v_channels, int __pyx_v_samplerate) { + int __pyx_v_sfmode; + PyObject *__pyx_v_msg = NULL; + PyObject *__pyx_v_type = NULL; + PyObject *__pyx_v_enc = NULL; + PyObject *__pyx_v_endian = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + char *__pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *(*__pyx_t_11)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "audiolab/pysndfile/_sndfile.pyx":427 * # -1 will indicate that the file has been open from filename, not from * # file descriptor * self.fd = -1 # <<<<<<<<<<<<<< * * self.hdl = NULL */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->fd = -1; + __pyx_v_self->fd = -1; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":426 + /* "audiolab/pysndfile/_sndfile.pyx":429 * self.fd = -1 * * self.hdl = NULL # <<<<<<<<<<<<<< * * # Check the mode is one of the expected values */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl = NULL; + __pyx_v_self->hdl = NULL; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":429 + /* "audiolab/pysndfile/_sndfile.pyx":432 * * # Check the mode is one of the expected values * if mode == 'r': # <<<<<<<<<<<<<< * sfmode = SFM_READ * elif mode == 'w': */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_115, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":430 + /* "audiolab/pysndfile/_sndfile.pyx":433 * # Check the mode is one of the expected values * if mode == 'r': * sfmode = SFM_READ # <<<<<<<<<<<<<< @@ -3712,26 +4783,22 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(Py * sfmode = SFM_WRITE */ __pyx_v_sfmode = SFM_READ; - goto __pyx_L6; + goto __pyx_L3; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":431 + /* "audiolab/pysndfile/_sndfile.pyx":434 * if mode == 'r': * sfmode = SFM_READ * elif mode == 'w': # <<<<<<<<<<<<<< * sfmode = SFM_WRITE * if format is None: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_116, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":432 + /* "audiolab/pysndfile/_sndfile.pyx":435 * sfmode = SFM_READ * elif mode == 'w': * sfmode = SFM_WRITE # <<<<<<<<<<<<<< @@ -3740,50 +4807,44 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(Py */ __pyx_v_sfmode = SFM_WRITE; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":433 + /* "audiolab/pysndfile/_sndfile.pyx":436 * elif mode == 'w': * sfmode = SFM_WRITE * if format is None: # <<<<<<<<<<<<<< * raise ValueError, \ * "For write mode, you should provide"\ */ - /* __pyx_t_2 allocated */ __pyx_t_2 = (((PyObject *)__pyx_v_format) == Py_None); if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":435 + /* "audiolab/pysndfile/_sndfile.pyx":437 + * sfmode = SFM_WRITE * if format is None: - * raise ValueError, \ - * "For write mode, you should provide"\ # <<<<<<<<<<<<<< + * raise ValueError, \ # <<<<<<<<<<<<<< + * "For write mode, you should provide"\ * "a format argument !" - * elif mode == 'rw': */ - __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_117, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_s_27), 0, 0); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } - __pyx_L7:; - goto __pyx_L6; + __pyx_L4:; + goto __pyx_L3; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":437 + /* "audiolab/pysndfile/_sndfile.pyx":440 * "For write mode, you should provide"\ * "a format argument !" * elif mode == 'rw': # <<<<<<<<<<<<<< * sfmode = SFM_RDWR * if format is None: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_118, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__rw), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":438 + /* "audiolab/pysndfile/_sndfile.pyx":441 * "a format argument !" * elif mode == 'rw': * sfmode = SFM_RDWR # <<<<<<<<<<<<<< @@ -3792,589 +4853,588 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(Py */ __pyx_v_sfmode = SFM_RDWR; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":439 + /* "audiolab/pysndfile/_sndfile.pyx":442 * elif mode == 'rw': * sfmode = SFM_RDWR * if format is None: # <<<<<<<<<<<<<< * raise ValueError, \ * "For write mode, you should provide"\ */ - /* __pyx_t_2 allocated */ __pyx_t_2 = (((PyObject *)__pyx_v_format) == Py_None); if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":441 + /* "audiolab/pysndfile/_sndfile.pyx":443 + * sfmode = SFM_RDWR * if format is None: - * raise ValueError, \ - * "For write mode, you should provide"\ # <<<<<<<<<<<<<< + * raise ValueError, \ # <<<<<<<<<<<<<< + * "For write mode, you should provide"\ * "a format argument !" - * else: */ - __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_119, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L8; + __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_s_27), 0, 0); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; } - __pyx_L8:; - goto __pyx_L6; + __pyx_L5:; + goto __pyx_L3; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":444 + /* "audiolab/pysndfile/_sndfile.pyx":447 * "a format argument !" * else: * raise ValueError("mode %s not recognized" % str(mode)) # <<<<<<<<<<<<<< * * # Fill the sfinfo struct */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_mode); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_mode); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mode); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_120, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_v_mode); + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_28), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __Pyx_Raise(__pyx_t_1, 0, 0); - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L6:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":447 + /* "audiolab/pysndfile/_sndfile.pyx":450 * * # Fill the sfinfo struct * self._sfinfo.frames = 0 # <<<<<<<<<<<<<< * self._sfinfo.channels = channels * self._sfinfo.samplerate = samplerate */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.frames = 0; + __pyx_v_self->_sfinfo.frames = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":448 + /* "audiolab/pysndfile/_sndfile.pyx":451 * # Fill the sfinfo struct * self._sfinfo.frames = 0 * self._sfinfo.channels = channels # <<<<<<<<<<<<<< * self._sfinfo.samplerate = samplerate * */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.channels = __pyx_v_channels; + __pyx_v_self->_sfinfo.channels = __pyx_v_channels; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":449 + /* "audiolab/pysndfile/_sndfile.pyx":452 * self._sfinfo.frames = 0 * self._sfinfo.channels = channels * self._sfinfo.samplerate = samplerate # <<<<<<<<<<<<<< * * self._sfinfo.sections = 0 */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.samplerate = __pyx_v_samplerate; + __pyx_v_self->_sfinfo.samplerate = __pyx_v_samplerate; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":451 + /* "audiolab/pysndfile/_sndfile.pyx":454 * self._sfinfo.samplerate = samplerate * * self._sfinfo.sections = 0 # <<<<<<<<<<<<<< * self._sfinfo.seekable = SF_FALSE * if mode == 'r' and format is None: */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.sections = 0; + __pyx_v_self->_sfinfo.sections = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":452 + /* "audiolab/pysndfile/_sndfile.pyx":455 * * self._sfinfo.sections = 0 * self._sfinfo.seekable = SF_FALSE # <<<<<<<<<<<<<< * if mode == 'r' and format is None: * self._sfinfo.format = 0 */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.seekable = SF_FALSE; + __pyx_v_self->_sfinfo.seekable = SF_FALSE; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":453 + /* "audiolab/pysndfile/_sndfile.pyx":456 * self._sfinfo.sections = 0 * self._sfinfo.seekable = SF_FALSE * if mode == 'r' and format is None: # <<<<<<<<<<<<<< * self._sfinfo.format = 0 * else: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_121, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* __pyx_t_4 allocated */ __pyx_t_4 = (((PyObject *)__pyx_v_format) == Py_None); - /* __pyx_t_5 allocated */ __pyx_t_5 = __pyx_t_4; - /* __pyx_t_4 released */ } else { __pyx_t_5 = __pyx_t_2; - /* __pyx_t_2 released */ } if (__pyx_t_5) { - /* __pyx_t_5 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":454 + /* "audiolab/pysndfile/_sndfile.pyx":457 * self._sfinfo.seekable = SF_FALSE * if mode == 'r' and format is None: * self._sfinfo.format = 0 # <<<<<<<<<<<<<< * else: * # XXX: do this correctly, by using sf_check */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.format = 0; - goto __pyx_L9; + __pyx_v_self->_sfinfo.format = 0; + goto __pyx_L6; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":457 + /* "audiolab/pysndfile/_sndfile.pyx":460 * else: * # XXX: do this correctly, by using sf_check * if samplerate == 0 or channels == 0: # <<<<<<<<<<<<<< * raise ValueError, \ * "Bad value of samplerate (%d) or channels (%d)" % \ */ - if (!(__pyx_v_samplerate == 0)) { - /* __pyx_t_5 allocated */ - __pyx_t_5 = (__pyx_v_channels == 0); + __pyx_t_5 = (__pyx_v_samplerate == 0); + if (!__pyx_t_5) { + __pyx_t_2 = (__pyx_v_channels == 0); + __pyx_t_4 = __pyx_t_2; } else { - __pyx_t_5 = (__pyx_v_samplerate == 0); + __pyx_t_4 = __pyx_t_5; } - if (__pyx_t_5) { - /* __pyx_t_5 released */ + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":460 + /* "audiolab/pysndfile/_sndfile.pyx":463 * raise ValueError, \ * "Bad value of samplerate (%d) or channels (%d)" % \ * (samplerate, channels) # <<<<<<<<<<<<<< * self._sfinfo.format = format.format_int() * if sf_format_check(&self._sfinfo) == SF_FALSE: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(__pyx_v_samplerate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_samplerate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyInt_FromLong(__pyx_v_channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_122, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - /* __pyx_t_6 released */ - __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_3, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L10; - } - __pyx_L10:; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":461 + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), 0, 0); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; + } + __pyx_L7:; + + /* "audiolab/pysndfile/_sndfile.pyx":464 * "Bad value of samplerate (%d) or channels (%d)" % \ * (samplerate, channels) * self._sfinfo.format = format.format_int() # <<<<<<<<<<<<<< * if sf_format_check(&self._sfinfo) == SF_FALSE: * raise ValueError("Bad format specification: check arguments.") */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.format = ((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_format->__pyx_vtab)->format_int(__pyx_v_format); + __pyx_v_self->_sfinfo.format = ((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_format->__pyx_vtab)->format_int(__pyx_v_format); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":462 + /* "audiolab/pysndfile/_sndfile.pyx":465 * (samplerate, channels) * self._sfinfo.format = format.format_int() * if sf_format_check(&self._sfinfo) == SF_FALSE: # <<<<<<<<<<<<<< * raise ValueError("Bad format specification: check arguments.") * */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = (sf_format_check((&((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo)) == SF_FALSE); - if (__pyx_t_5) { - /* __pyx_t_5 released */ + __pyx_t_4 = (sf_format_check((&__pyx_v_self->_sfinfo)) == SF_FALSE); + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":463 + /* "audiolab/pysndfile/_sndfile.pyx":466 * self._sfinfo.format = format.format_int() * if sf_format_check(&self._sfinfo) == SF_FALSE: * raise ValueError("Bad format specification: check arguments.") # <<<<<<<<<<<<<< * * # XXX: check how cython behave with this kind of code */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_123); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_123); - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __Pyx_Raise(__pyx_t_6, 0, 0); - Py_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* __pyx_t_6 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L11; + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L8; } - __pyx_L11:; + __pyx_L8:; } - __pyx_L9:; + __pyx_L6:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":466 + /* "audiolab/pysndfile/_sndfile.pyx":469 * * # XXX: check how cython behave with this kind of code * if isinstance(filename, int): # <<<<<<<<<<<<<< * self.hdl = sf_open_fd(filename, sfmode, &self._sfinfo, SF_FALSE) * self.fd = filename */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_TypeCheck(__pyx_v_filename, ((PyTypeObject *)((PyObject*)&PyInt_Type))); - if (__pyx_t_5) { - /* __pyx_t_5 released */ + __pyx_t_3 = ((PyObject *)((PyObject*)(&PyInt_Type))); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_filename, __pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":467 + /* "audiolab/pysndfile/_sndfile.pyx":470 * # XXX: check how cython behave with this kind of code * if isinstance(filename, int): * self.hdl = sf_open_fd(filename, sfmode, &self._sfinfo, SF_FALSE) # <<<<<<<<<<<<<< * self.fd = filename * self.filename = "" */ - /* __pyx_t_7 allocated */ - __pyx_t_7 = __pyx_PyInt_int(__pyx_v_filename); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl = sf_open_fd(__pyx_t_7, __pyx_v_sfmode, (&((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo), SF_FALSE); - /* __pyx_t_7 released */ + __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_filename); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->hdl = sf_open_fd(__pyx_t_7, __pyx_v_sfmode, (&__pyx_v_self->_sfinfo), SF_FALSE); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":468 + /* "audiolab/pysndfile/_sndfile.pyx":471 * if isinstance(filename, int): * self.hdl = sf_open_fd(filename, sfmode, &self._sfinfo, SF_FALSE) * self.fd = filename # <<<<<<<<<<<<<< * self.filename = "" * else: */ - /* __pyx_t_7 allocated */ - __pyx_t_7 = __pyx_PyInt_int(__pyx_v_filename); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->fd = __pyx_t_7; - /* __pyx_t_7 released */ + __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_filename); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->fd = __pyx_t_7; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":469 + /* "audiolab/pysndfile/_sndfile.pyx":472 * self.hdl = sf_open_fd(filename, sfmode, &self._sfinfo, SF_FALSE) * self.fd = filename * self.filename = "" # <<<<<<<<<<<<<< * else: * self.hdl = sf_open(filename, sfmode, &self._sfinfo) */ - Py_INCREF(__pyx_kp_124); - Py_DECREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->filename); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->filename = __pyx_kp_124; - goto __pyx_L12; + __Pyx_INCREF(((PyObject *)__pyx_kp_s_32)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32)); + __Pyx_GOTREF(__pyx_v_self->filename); + __Pyx_DECREF(__pyx_v_self->filename); + __pyx_v_self->filename = ((PyObject *)__pyx_kp_s_32); + goto __pyx_L9; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":471 + /* "audiolab/pysndfile/_sndfile.pyx":474 * self.filename = "" * else: * self.hdl = sf_open(filename, sfmode, &self._sfinfo) # <<<<<<<<<<<<<< * self.filename = filename * self._mode = sfmode */ - /* __pyx_t_8 allocated */ - __pyx_t_8 = __Pyx_PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl = sf_open(__pyx_t_8, __pyx_v_sfmode, (&((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo)); - /* __pyx_t_8 released */ + __pyx_t_8 = PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->hdl = sf_open(__pyx_t_8, __pyx_v_sfmode, (&__pyx_v_self->_sfinfo)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":472 + /* "audiolab/pysndfile/_sndfile.pyx":475 * else: * self.hdl = sf_open(filename, sfmode, &self._sfinfo) * self.filename = filename # <<<<<<<<<<<<<< * self._mode = sfmode * */ - Py_INCREF(__pyx_v_filename); - Py_DECREF(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->filename); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->filename = __pyx_v_filename; + __Pyx_INCREF(__pyx_v_filename); + __Pyx_GIVEREF(__pyx_v_filename); + __Pyx_GOTREF(__pyx_v_self->filename); + __Pyx_DECREF(__pyx_v_self->filename); + __pyx_v_self->filename = __pyx_v_filename; } - __pyx_L12:; + __pyx_L9:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":473 + /* "audiolab/pysndfile/_sndfile.pyx":476 * self.hdl = sf_open(filename, sfmode, &self._sfinfo) * self.filename = filename * self._mode = sfmode # <<<<<<<<<<<<<< * * if self.hdl == NULL: */ - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_mode = __pyx_v_sfmode; + __pyx_v_self->_mode = __pyx_v_sfmode; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":475 + /* "audiolab/pysndfile/_sndfile.pyx":478 * self._mode = sfmode * * if self.hdl == NULL: # <<<<<<<<<<<<<< * if self.fd == -1: * msg = "error while opening file %s\n\t-> " % self.filename */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = (((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl == NULL); - if (__pyx_t_5) { - /* __pyx_t_5 released */ + __pyx_t_4 = (__pyx_v_self->hdl == NULL); + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":476 + /* "audiolab/pysndfile/_sndfile.pyx":479 * * if self.hdl == NULL: * if self.fd == -1: # <<<<<<<<<<<<<< * msg = "error while opening file %s\n\t-> " % self.filename * else: */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = (((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->fd == -1); - if (__pyx_t_5) { - /* __pyx_t_5 released */ + __pyx_t_4 = (__pyx_v_self->fd == -1); + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":477 + /* "audiolab/pysndfile/_sndfile.pyx":480 * if self.hdl == NULL: * if self.fd == -1: * msg = "error while opening file %s\n\t-> " % self.filename # <<<<<<<<<<<<<< * else: * msg = "error while opening file descriptor %d\n\t->" % self.fd */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyNumber_Remainder(__pyx_kp_125, ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->filename); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_msg); - __pyx_v_msg = __pyx_t_6; - __pyx_t_6 = 0; - /* __pyx_t_6 released */ - goto __pyx_L14; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_33), __pyx_v_self->filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_v_msg = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L11; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":479 + /* "audiolab/pysndfile/_sndfile.pyx":482 * msg = "error while opening file %s\n\t-> " % self.filename * else: * msg = "error while opening file descriptor %d\n\t->" % self.fd # <<<<<<<<<<<<<< * msg += sf_strerror(self.hdl) * if not self.fd == -1: */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyInt_FromLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->fd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_126, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* __pyx_t_6 released */ - Py_DECREF(__pyx_v_msg); - __pyx_v_msg = __pyx_t_3; - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = PyInt_FromLong(__pyx_v_self->fd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_msg = ((PyObject *)__pyx_t_6); + __pyx_t_6 = 0; } - __pyx_L14:; + __pyx_L11:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":480 + /* "audiolab/pysndfile/_sndfile.pyx":483 * else: * msg = "error while opening file descriptor %d\n\t->" % self.fd * msg += sf_strerror(self.hdl) # <<<<<<<<<<<<<< * if not self.fd == -1: * msg += """ */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = __Pyx_PyBytes_FromString(sf_strerror(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_msg); - __pyx_v_msg = __pyx_1; - __pyx_1 = 0; + __pyx_t_6 = PyBytes_FromString(sf_strerror(__pyx_v_self->hdl)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_v_msg); + __pyx_v_msg = __pyx_t_3; + __pyx_t_3 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":481 + /* "audiolab/pysndfile/_sndfile.pyx":484 * msg = "error while opening file descriptor %d\n\t->" % self.fd * msg += sf_strerror(self.hdl) * if not self.fd == -1: # <<<<<<<<<<<<<< * msg += """ - * (Check that the mode argument passed to sndfile is the same than the one used + * (Check that the mode argument passed to sndfile is the same as the one used */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = (!(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->fd == -1)); - if (__pyx_t_5) { - /* __pyx_t_5 released */ + __pyx_t_4 = (!(__pyx_v_self->fd == -1)); + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":482 + /* "audiolab/pysndfile/_sndfile.pyx":485 * msg += sf_strerror(self.hdl) * if not self.fd == -1: * msg += """ # <<<<<<<<<<<<<< - * (Check that the mode argument passed to sndfile is the same than the one used + * (Check that the mode argument passed to sndfile is the same as the one used * when getting the file descriptor, eg do not pass 'r' to sndfile if you */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_kp_127); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_msg); - __pyx_v_msg = __pyx_1; - __pyx_1 = 0; - goto __pyx_L15; + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_msg, ((PyObject *)__pyx_kp_s_35)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_v_msg); + __pyx_v_msg = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L12; } - __pyx_L15:; + __pyx_L12:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":488 + /* "audiolab/pysndfile/_sndfile.pyx":491 * win32, you are out of luck, because its implementation of POSIX open is * broken)""" * raise IOError("error while opening %s\n\t->%s" % (filename, msg)) # <<<<<<<<<<<<<< * * if mode == 'r': */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_filename); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filename); - Py_INCREF(__pyx_v_msg); + __Pyx_GIVEREF(__pyx_v_filename); + __Pyx_INCREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_msg); - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyNumber_Remainder(__pyx_kp_128, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_v_msg); + __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_36), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - /* __pyx_t_6 released */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __Pyx_Raise(__pyx_t_6, 0, 0); - Py_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* __pyx_t_6 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L13; + __pyx_t_6 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L10; } - __pyx_L13:; + __pyx_L10:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":490 + /* "audiolab/pysndfile/_sndfile.pyx":493 * raise IOError("error while opening %s\n\t->%s" % (filename, msg)) * * if mode == 'r': # <<<<<<<<<<<<<< * type, enc, endian = int_to_format(self._sfinfo.format) * self._format = Format(type, enc, endian) */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_129, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* __pyx_t_6 released */ - if (__pyx_t_5) { - /* __pyx_t_5 released */ + __pyx_t_6 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":491 + /* "audiolab/pysndfile/_sndfile.pyx":494 * * if mode == 'r': * type, enc, endian = int_to_format(self._sfinfo.format) # <<<<<<<<<<<<<< * self._format = Format(type, enc, endian) * else: */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyTuple_CheckExact(__pyx_t_6) && PyTuple_GET_SIZE(__pyx_t_6) == 3) { - PyObject* tuple = __pyx_t_6; - __pyx_2 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(__pyx_2); - __pyx_3 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(__pyx_3); - __pyx_4 = PyTuple_GET_ITEM(tuple, 2); Py_INCREF(__pyx_4); - Py_DECREF(__pyx_t_6); __pyx_t_6 = 0; - Py_DECREF(__pyx_v_type); - __pyx_v_type = __pyx_2; - __pyx_2 = 0; - Py_DECREF(__pyx_v_enc); - __pyx_v_enc = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_endian); - __pyx_v_endian = __pyx_4; - __pyx_4 = 0; - } else { - __pyx_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = __Pyx_UnpackItem(__pyx_1, 2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_v_type); - __pyx_v_type = __pyx_2; - __pyx_2 = 0; - Py_DECREF(__pyx_v_enc); - __pyx_v_enc = __pyx_3; - __pyx_3 = 0; - Py_DECREF(__pyx_v_endian); - __pyx_v_endian = __pyx_4; - __pyx_4 = 0; - } - /* __pyx_t_6 released */ - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":492 + __pyx_t_6 = __pyx_f_8audiolab_9pysndfile_8_sndfile_int_to_format(__pyx_v_self->_sfinfo.format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_1 = PyList_GET_ITEM(sequence, 1); + __pyx_t_9 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_9); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; + index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_1 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_1); + index = 2; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L15_unpacking_done; + __pyx_L14_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_11 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L15_unpacking_done:; + } + __pyx_v_type = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_enc = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_endian = __pyx_t_9; + __pyx_t_9 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":495 * if mode == 'r': * type, enc, endian = int_to_format(self._sfinfo.format) * self._format = Format(type, enc, endian) # <<<<<<<<<<<<<< * else: * self._format = format */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_type); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_type); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_type); - Py_INCREF(__pyx_v_enc); + __Pyx_GIVEREF(__pyx_v_type); + __Pyx_INCREF(__pyx_v_enc); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_enc); - Py_INCREF(__pyx_v_endian); + __Pyx_GIVEREF(__pyx_v_enc); + __Pyx_INCREF(__pyx_v_endian); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_endian); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - /* __pyx_t_6 released */ - if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format)); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ - goto __pyx_L16; + __Pyx_GIVEREF(__pyx_v_endian); + __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8audiolab_9pysndfile_8_sndfile_Format)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_GIVEREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_v_self->_format); + __Pyx_DECREF(((PyObject *)__pyx_v_self->_format)); + __pyx_v_self->_format = ((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_t_9); + __pyx_t_9 = 0; + goto __pyx_L13; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":494 + /* "audiolab/pysndfile/_sndfile.pyx":497 * self._format = Format(type, enc, endian) * else: * self._format = format # <<<<<<<<<<<<<< * * # XXX: Handle FLAC problem */ - Py_INCREF(((PyObject *)__pyx_v_format)); - Py_DECREF(((PyObject *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format)); - ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format = __pyx_v_format; + __Pyx_INCREF(((PyObject *)__pyx_v_format)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_format)); + __Pyx_GOTREF(__pyx_v_self->_format); + __Pyx_DECREF(((PyObject *)__pyx_v_self->_format)); + __pyx_v_self->_format = __pyx_v_format; } - __pyx_L16:; + __pyx_L13:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_3); - Py_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.__init__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; - Py_DECREF(__pyx_v_msg); - Py_DECREF(__pyx_v_type); - Py_DECREF(__pyx_v_enc); - Py_DECREF(__pyx_v_endian); + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_XDECREF(__pyx_v_type); + __Pyx_XDECREF(__pyx_v_enc); + __Pyx_XDECREF(__pyx_v_endian); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":498 +/* Python wrapper */ +static void __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_2__dealloc__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); +} + +/* "audiolab/pysndfile/_sndfile.pyx":501 * # XXX: Handle FLAC problem * * def __dealloc__(Sndfile self): # <<<<<<<<<<<<<< @@ -4382,30 +5442,34 @@ static int __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__(Py * */ -static void __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___dealloc__(PyObject *__pyx_v_self) { +static void __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_2__dealloc__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":499 + /* "audiolab/pysndfile/_sndfile.pyx":502 * * def __dealloc__(Sndfile self): * self._close() # <<<<<<<<<<<<<< * * cdef _close(Sndfile self): */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = ((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->_close(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_1 = ((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.__dealloc__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; + __Pyx_RefNannyFinishContext(); } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":501 +/* "audiolab/pysndfile/_sndfile.pyx":504 * self._close() * * cdef _close(Sndfile self): # <<<<<<<<<<<<<< @@ -4413,23 +5477,23 @@ static void __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___dealloc_ * sf_close(self.hdl) */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__close(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile__close(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations int __pyx_t_1; + __Pyx_RefNannySetupContext("_close", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":502 + /* "audiolab/pysndfile/_sndfile.pyx":505 * * cdef _close(Sndfile self): * if self.hdl: # <<<<<<<<<<<<<< * sf_close(self.hdl) * self.hdl = NULL */ - /* __pyx_t_1 allocated */ __pyx_t_1 = (__pyx_v_self->hdl != 0); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":503 + /* "audiolab/pysndfile/_sndfile.pyx":506 * cdef _close(Sndfile self): * if self.hdl: * sf_close(self.hdl) # <<<<<<<<<<<<<< @@ -4438,7 +5502,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__clos */ sf_close(__pyx_v_self->hdl); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":504 + /* "audiolab/pysndfile/_sndfile.pyx":507 * if self.hdl: * sf_close(self.hdl) * self.hdl = NULL # <<<<<<<<<<<<<< @@ -4450,11 +5514,25 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__clos } __pyx_L3:; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":506 +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_4close[] = "Sndfile.close(self)\nclose the file."; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("close (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_4close(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":509 * self.hdl = NULL * * def close(Sndfile self): # <<<<<<<<<<<<<< @@ -4462,35 +5540,51 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__clos * self._close() */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_close(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_close[] = "Sndfile.close(self)\nclose the file."; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_close(PyObject *__pyx_v_self, PyObject *unused) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_4close(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("close", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":508 + /* "audiolab/pysndfile/_sndfile.pyx":511 * def close(Sndfile self): * """close the file.""" * self._close() # <<<<<<<<<<<<<< * * def sync(Sndfile self): */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = ((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->_close(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_1 = ((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.close"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_7sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_6sync[] = "Sndfile.sync(self)\n call the operating system's function to force the writing of all\n file cache buffers to disk the file.\n\n No effect if file is open as read"; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_7sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sync (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_6sync(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":510 +/* "audiolab/pysndfile/_sndfile.pyx":513 * self._close() * * def sync(Sndfile self): # <<<<<<<<<<<<<< @@ -4498,25 +5592,27 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_close * call the operating system's function to force the writing of all */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_sync(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_sync[] = "Sndfile.sync(self)\n call the operating system's function to force the writing of all\n file cache buffers to disk the file.\n\n No effect if file is open as read"; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_sync(PyObject *__pyx_v_self, PyObject *unused) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_6sync(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sync", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":516 + /* "audiolab/pysndfile/_sndfile.pyx":519 * * No effect if file is open as read""" * sf_write_sync(self.hdl) # <<<<<<<<<<<<<< * * # Functions to get informations about the file */ - sf_write_sync(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl); + sf_write_sync(__pyx_v_self->hdl); - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":524 +/* "audiolab/pysndfile/_sndfile.pyx":527 * # return self.nframes * * cdef sf_count_t _get_nframes(self): # <<<<<<<<<<<<<< @@ -4524,25 +5620,27 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_sync( * if self._mode == SFM_READ: */ -static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__get_nframes(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { +static sf_count_t __pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile__get_nframes(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { sf_count_t __pyx_r; + __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_get_nframes", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":526 + /* "audiolab/pysndfile/_sndfile.pyx":529 * cdef sf_count_t _get_nframes(self): * """ Return the number of frames of the file""" * if self._mode == SFM_READ: # <<<<<<<<<<<<<< * # XXX: is this reliable for any file (think pipe and co ?) * return self._sfinfo.frames */ - /* __pyx_t_1 allocated */ __pyx_t_1 = (__pyx_v_self->_mode == SFM_READ); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":528 + /* "audiolab/pysndfile/_sndfile.pyx":531 * if self._mode == SFM_READ: * # XXX: is this reliable for any file (think pipe and co ?) * return self._sfinfo.frames # <<<<<<<<<<<<<< @@ -4555,38 +5653,42 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__get } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":532 + /* "audiolab/pysndfile/_sndfile.pyx":535 * # In write/rwrite mode, the only reliable way to get the number of * # frames is to use seek. * raise NotImplementedError("Sorry, getting the current number of" # <<<<<<<<<<<<<< * "frames in write modes is not supported yet") * */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_130); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_130); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_k_tuple_38), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - __Pyx_WriteUnraisable("scikits.audiolab.pysndfile._sndfile.Sndfile._get_nframes"); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_WriteUnraisable("audiolab.pysndfile._sndfile.Sndfile._get_nframes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":537 +/* "audiolab/pysndfile/_sndfile.pyx":540 * property nframes: * """Number of frames of the file.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -4594,36 +5696,53 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__get * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":538 + /* "audiolab/pysndfile/_sndfile.pyx":541 * """Number of frames of the file.""" * def __get__(self): * return self._get_nframes() # <<<<<<<<<<<<<< * * property samplerate: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyLong_FromLongLong(((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->_get_nframes(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_to_py___quad_t(((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->_get_nframes(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.nframes.__get__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.nframes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":542 +/* "audiolab/pysndfile/_sndfile.pyx":545 * property samplerate: * """Sampling rate (in Hz).""" * def __get__(self): # <<<<<<<<<<<<<< @@ -4631,36 +5750,53 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nfra * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":543 + /* "audiolab/pysndfile/_sndfile.pyx":546 * """Sampling rate (in Hz).""" * def __get__(self): * return self._sfinfo.samplerate # <<<<<<<<<<<<<< * * property channels: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.samplerate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_sfinfo.samplerate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.samplerate.__get__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.samplerate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":547 +/* "audiolab/pysndfile/_sndfile.pyx":550 * property channels: * """Number of channels.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -4668,36 +5804,53 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10sam * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":548 + /* "audiolab/pysndfile/_sndfile.pyx":551 * """Number of channels.""" * def __get__(self): * return self._sfinfo.channels # <<<<<<<<<<<<<< * * property format: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.channels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.channels.__get__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.channels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":552 +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":555 * property format: * """Format instance attached to the Sndfile instance.""" * def __get__(self): # <<<<<<<<<<<<<< @@ -4705,52 +5858,69 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8chan * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":553 + /* "audiolab/pysndfile/_sndfile.pyx":556 * """Format instance attached to the Sndfile instance.""" * def __get__(self): * return copy.copy(self._format) # <<<<<<<<<<<<<< * * # Those are convenience: they can be accessed from the format object */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_copy); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(((PyObject *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format)); - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_v_self->_format)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_format)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_format)); + __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.format.__get__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":558 +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":561 * # attached to the Sndfile instance. * property file_format: * def __get__(self): # <<<<<<<<<<<<<< @@ -4758,34 +5928,53 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_6form * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":559 + /* "audiolab/pysndfile/_sndfile.pyx":562 * property file_format: * def __get__(self): * return self._format.file_format # <<<<<<<<<<<<<< * * property encoding: */ - __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format), __pyx_kp_file_format); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->_format), __pyx_n_s__file_format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.file_format.__get__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.file_format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":562 +/* "audiolab/pysndfile/_sndfile.pyx":565 * * property encoding: * def __get__(self): # <<<<<<<<<<<<<< @@ -4793,34 +5982,53 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_11fil * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":563 + /* "audiolab/pysndfile/_sndfile.pyx":566 * property encoding: * def __get__(self): * return self._format.encoding # <<<<<<<<<<<<<< * * property endianness: */ - __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format), __pyx_kp_encoding); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->_format), __pyx_n_s__encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.encoding.__get__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.encoding.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":566 +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness___get__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":569 * * property endianness: * def __get__(self): # <<<<<<<<<<<<<< @@ -4828,34 +6036,53 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8enco * */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness___get__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":567 + /* "audiolab/pysndfile/_sndfile.pyx":570 * property endianness: * def __get__(self): * return self._format.endianness # <<<<<<<<<<<<<< * * def __str__(Sndfile self): */ - __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format), __pyx_kp_endianness); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->_format), __pyx_n_s__endianness); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.endianness.__get__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.endianness.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_9__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_9__str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8__str__(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":569 +/* "audiolab/pysndfile/_sndfile.pyx":572 * return self._format.endianness * * def __str__(Sndfile self): # <<<<<<<<<<<<<< @@ -4863,721 +6090,697 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10end * if not self.fd == -1: */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___str__(PyObject *__pyx_v_self) { - PyObject *__pyx_v_repstr; - PyObject *__pyx_v_seek; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_8__str__(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self) { + PyObject *__pyx_v_repstr = NULL; + int __pyx_v_seek; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - __pyx_v_repstr = Py_None; Py_INCREF(Py_None); - __pyx_v_seek = Py_None; Py_INCREF(Py_None); + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":570 + /* "audiolab/pysndfile/_sndfile.pyx":573 * * def __str__(Sndfile self): * repstr = ["----------------------------------------"] # <<<<<<<<<<<<<< * if not self.fd == -1: * repstr += ["File : %d (opened by file descriptor)" % self.fd] */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_131); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_131); - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = ((PyObject *)__pyx_t_1); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_39)); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_39)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_39)); + __pyx_v_repstr = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":571 + /* "audiolab/pysndfile/_sndfile.pyx":574 * def __str__(Sndfile self): * repstr = ["----------------------------------------"] * if not self.fd == -1: # <<<<<<<<<<<<<< * repstr += ["File : %d (opened by file descriptor)" % self.fd] * else: */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = (!(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->fd == -1)); + __pyx_t_2 = (!(__pyx_v_self->fd == -1)); if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":572 + /* "audiolab/pysndfile/_sndfile.pyx":575 * repstr = ["----------------------------------------"] * if not self.fd == -1: * repstr += ["File : %d (opened by file descriptor)" % self.fd] # <<<<<<<<<<<<<< * else: * repstr += ["File : %s" % self.filename] */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->fd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_132, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->fd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_40), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; - goto __pyx_L5; + __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L3; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":574 + /* "audiolab/pysndfile/_sndfile.pyx":577 * repstr += ["File : %d (opened by file descriptor)" % self.fd] * else: * repstr += ["File : %s" % self.filename] # <<<<<<<<<<<<<< * repstr += ["Channels : %d" % self._sfinfo.channels] * repstr += ["Sample rate : %d" % self._sfinfo.samplerate] */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_133, ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_41), __pyx_v_self->filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_3; + __pyx_t_3 = 0; } - __pyx_L5:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":575 + /* "audiolab/pysndfile/_sndfile.pyx":578 * else: * repstr += ["File : %s" % self.filename] * repstr += ["Channels : %d" % self._sfinfo.channels] # <<<<<<<<<<<<<< * repstr += ["Sample rate : %d" % self._sfinfo.samplerate] * repstr += ["Frames : %d" % self._sfinfo.frames] */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_134, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __pyx_t_3 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_42), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":576 + + /* "audiolab/pysndfile/_sndfile.pyx":579 * repstr += ["File : %s" % self.filename] * repstr += ["Channels : %d" % self._sfinfo.channels] * repstr += ["Sample rate : %d" % self._sfinfo.samplerate] # <<<<<<<<<<<<<< * repstr += ["Frames : %d" % self._sfinfo.frames] * repstr += ["Raw Format : %#010x" % self._format.format_int()] */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.samplerate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_135, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":577 + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->_sfinfo.samplerate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_43), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_3; + __pyx_t_3 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":580 * repstr += ["Channels : %d" % self._sfinfo.channels] * repstr += ["Sample rate : %d" % self._sfinfo.samplerate] * repstr += ["Frames : %d" % self._sfinfo.frames] # <<<<<<<<<<<<<< * repstr += ["Raw Format : %#010x" % self._format.format_int()] * repstr += ["File format : %s" % self.file_format] */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyLong_FromLongLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.frames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_136, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_to_py___quad_t(__pyx_v_self->_sfinfo.frames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_44), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_1; __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":578 + + /* "audiolab/pysndfile/_sndfile.pyx":581 * repstr += ["Sample rate : %d" % self._sfinfo.samplerate] * repstr += ["Frames : %d" % self._sfinfo.frames] * repstr += ["Raw Format : %#010x" % self._format.format_int()] # <<<<<<<<<<<<<< * repstr += ["File format : %s" % self.file_format] * repstr += ["Encoding : %s" % self.encoding] */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyInt_FromLong(((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format->__pyx_vtab)->format_int(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_format)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_137, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":579 + __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Format *)__pyx_v_self->_format->__pyx_vtab)->format_int(__pyx_v_self->_format)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_45), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_3; + __pyx_t_3 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":582 * repstr += ["Frames : %d" % self._sfinfo.frames] * repstr += ["Raw Format : %#010x" % self._format.format_int()] * repstr += ["File format : %s" % self.file_format] # <<<<<<<<<<<<<< * repstr += ["Encoding : %s" % self.encoding] * repstr += ["Endianness : %s" % self.endianness] */ - __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_file_format); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_138, __pyx_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":580 + __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__file_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":583 * repstr += ["Raw Format : %#010x" % self._format.format_int()] * repstr += ["File format : %s" % self.file_format] * repstr += ["Encoding : %s" % self.encoding] # <<<<<<<<<<<<<< * repstr += ["Endianness : %s" % self.endianness] * #repstr += "Sections : %d\n" % self._sfinfo.sections */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_encoding); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_139, __pyx_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_2 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_2; - __pyx_2 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":581 + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_3; + __pyx_t_3 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":584 * repstr += ["File format : %s" % self.file_format] * repstr += ["Encoding : %s" % self.encoding] * repstr += ["Endianness : %s" % self.endianness] # <<<<<<<<<<<<<< * #repstr += "Sections : %d\n" % self._sfinfo.sections * if self._sfinfo.seekable == SF_TRUE: */ - __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_endianness); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_140, __pyx_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":583 + __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__endianness); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":586 * repstr += ["Endianness : %s" % self.endianness] * #repstr += "Sections : %d\n" % self._sfinfo.sections * if self._sfinfo.seekable == SF_TRUE: # <<<<<<<<<<<<<< * seek = True * else: */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = (((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.seekable == SF_TRUE); + __pyx_t_2 = (__pyx_v_self->_sfinfo.seekable == SF_TRUE); if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":584 + /* "audiolab/pysndfile/_sndfile.pyx":587 * #repstr += "Sections : %d\n" % self._sfinfo.sections * if self._sfinfo.seekable == SF_TRUE: * seek = True # <<<<<<<<<<<<<< * else: * seek = False */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_seek); - __pyx_v_seek = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - goto __pyx_L6; + __pyx_v_seek = 1; + goto __pyx_L4; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":586 + /* "audiolab/pysndfile/_sndfile.pyx":589 * seek = True * else: * seek = False # <<<<<<<<<<<<<< * repstr += ["Seekable : %s\n" % seek] * #repstr += "Duration : %s\n" % self._generate_duration_str() */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_seek); - __pyx_v_seek = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_v_seek = 0; } - __pyx_L6:; + __pyx_L4:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":587 + /* "audiolab/pysndfile/_sndfile.pyx":590 * else: * seek = False * repstr += ["Seekable : %s\n" % seek] # <<<<<<<<<<<<<< * #repstr += "Duration : %s\n" % self._generate_duration_str() * return "\n".join(repstr) */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_141, __pyx_v_seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __pyx_2 = PyNumber_InPlaceAdd(__pyx_v_repstr, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_repstr); - __pyx_v_repstr = __pyx_2; - __pyx_2 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":589 + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_seek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_repstr), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_repstr)); + __pyx_v_repstr = __pyx_t_3; + __pyx_t_3 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":592 * repstr += ["Seekable : %s\n" % seek] * #repstr += "Duration : %s\n" % self._generate_duration_str() * return "\n".join(repstr) # <<<<<<<<<<<<<< * * def read_frames(self, sf_count_t nframes, dtype=np.float64): */ - __pyx_1 = PyObject_GetAttr(__pyx_kp_142, __pyx_kp_join); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_repstr); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_repstr); - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_18), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_v_repstr)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_repstr)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_repstr)); + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.__str__"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_repstr); - Py_DECREF(__pyx_v_seek); + __Pyx_XDECREF(__pyx_v_repstr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":591 - * return "\n".join(repstr) - * - * def read_frames(self, sf_count_t nframes, dtype=np.float64): # <<<<<<<<<<<<<< - * """\ - * Read the given number of frames and put the data into a numpy array of - */ - -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames[] = "Sndfile.read_frames(self, scikits.audiolab.pysndfile.sndfile.sf_count_t nframes, dtype=<\077\077?>)\n Read the given number of frames and put the data into a numpy array of\n the requested dtype.\n\n Parameters\n ----------\n nframes : int\n number of frames to read.\n dtype : numpy dtype\n dtype of the returned array containing read data (see note).\n\n Notes\n -----\n One column per channel.\n\n Updates the read pointer.\n\n Notes\n -----\n if float are requested when the file contains integer data, you will\n get normalized data (that is the max possible integer will be 1.0, and\n the minimal possible value -1.0).\n\n if integers are requested when the file contains floating point data,\n it may give wrong results because there is an ambiguity: if the\n floating data are normalized, you can get a file with only 0 ! Getting\n integer data from files encoded in normalized floating point is not\n supported (this is an audiolab limitation: sndfile supports it)."; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_11read_frames(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_10read_frames[] = "Sndfile.read_frames(self, sf_count_t nframes, dtype=<\077\077?>)\n Read the given number of frames and put the data into a numpy array of\n the requested dtype.\n\n Parameters\n ----------\n nframes : int\n number of frames to read.\n dtype : numpy dtype\n dtype of the returned array containing read data (see note).\n\n Notes\n -----\n One column per channel.\n\n Updates the read pointer.\n\n Notes\n -----\n if float are requested when the file contains integer data, you will\n get normalized data (that is the max possible integer will be 1.0, and\n the minimal possible value -1.0).\n\n if integers are requested when the file contains floating point data,\n it may give wrong results because there is an ambiguity: if the\n floating data are normalized, you can get a file with only 0 ! Getting\n integer data from files encoded in normalized floating point is not\n supported (this is an audiolab limitation: sndfile supports it)."; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_11read_frames(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sf_count_t __pyx_v_nframes; PyObject *__pyx_v_dtype = 0; - PyObject *__pyx_v_y; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_nframes,&__pyx_kp_dtype,0}; - __pyx_v_dtype = __pyx_k_92; - if (unlikely(__pyx_kwds)) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_frames (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nframes,&__pyx_n_s__dtype,0}; PyObject* values[2] = {0,0}; - Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_nframes); - if (likely(values[0])) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "read_frames") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - __pyx_v_nframes = __pyx_PyInt_AsLongLong(values[0]); if (unlikely((__pyx_v_nframes == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - if (values[1]) { - __pyx_v_dtype = values[1]; - } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 2: __pyx_v_dtype = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: __pyx_v_nframes = __pyx_PyInt_AsLongLong(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_nframes == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - break; - default: goto __pyx_L5_argtuple_error; + values[1] = __pyx_k_50; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nframes)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dtype); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_frames") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } } + __pyx_v_nframes = __Pyx_PyInt_from_py___quad_t(values[0]); if (unlikely((__pyx_v_nframes == (sf_count_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_dtype = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_frames", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("read_frames", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames"); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.read_frames", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_v_y = Py_None; Py_INCREF(Py_None); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10read_frames(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), __pyx_v_nframes, __pyx_v_dtype); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":594 + * return "\n".join(repstr) + * + * def read_frames(self, sf_count_t nframes, dtype=np.float64): # <<<<<<<<<<<<<< + * """\ + * Read the given number of frames and put the data into a numpy array of + */ + +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_10read_frames(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes, PyObject *__pyx_v_dtype) { + PyObject *__pyx_v_y = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_frames", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":620 + /* "audiolab/pysndfile/_sndfile.pyx":623 * integer data from files encoded in normalized floating point is not * supported (this is an audiolab limitation: sndfile supports it).""" * if nframes < 0: # <<<<<<<<<<<<<< * raise ValueError("number of frames has to be >= 0 (was %d)" % * nframes) */ - /* __pyx_t_1 allocated */ __pyx_t_1 = (__pyx_v_nframes < 0); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":622 + /* "audiolab/pysndfile/_sndfile.pyx":625 * if nframes < 0: * raise ValueError("number of frames has to be >= 0 (was %d)" % * nframes) # <<<<<<<<<<<<<< * * # TODO: inout argument */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_143, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); + __pyx_t_2 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_51), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } - __pyx_L6:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":627 + /* "audiolab/pysndfile/_sndfile.pyx":630 * # XXX: rank 1 vs rank 2 for mono ? * # XXX: endianness of dtype vs endianness of sndfile ? * if dtype == np.float64: # <<<<<<<<<<<<<< * y = self.read_frames_double(nframes) * elif dtype == np.float32: */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_91); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":628 + /* "audiolab/pysndfile/_sndfile.pyx":631 * # XXX: endianness of dtype vs endianness of sndfile ? * if dtype == np.float64: * y = self.read_frames_double(nframes) # <<<<<<<<<<<<<< * elif dtype == np.float32: * y = self.read_frames_float(nframes) */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = ((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->read_frames_double(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_y); + __pyx_t_3 = ((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->read_frames_double(__pyx_v_self, __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_v_y = __pyx_t_3; __pyx_t_3 = 0; - /* __pyx_t_3 released */ - goto __pyx_L7; + goto __pyx_L4; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":629 + /* "audiolab/pysndfile/_sndfile.pyx":632 * if dtype == np.float64: * y = self.read_frames_double(nframes) * elif dtype == np.float32: # <<<<<<<<<<<<<< * y = self.read_frames_float(nframes) * elif dtype == np.int32: */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_144); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":630 + /* "audiolab/pysndfile/_sndfile.pyx":633 * y = self.read_frames_double(nframes) * elif dtype == np.float32: * y = self.read_frames_float(nframes) # <<<<<<<<<<<<<< * elif dtype == np.int32: * y = self.read_frames_int(nframes) */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = ((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->read_frames_float(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_y); + __pyx_t_3 = ((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->read_frames_float(__pyx_v_self, __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_v_y = __pyx_t_3; __pyx_t_3 = 0; - /* __pyx_t_3 released */ - goto __pyx_L7; + goto __pyx_L4; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":631 + /* "audiolab/pysndfile/_sndfile.pyx":634 * elif dtype == np.float32: * y = self.read_frames_float(nframes) * elif dtype == np.int32: # <<<<<<<<<<<<<< * y = self.read_frames_int(nframes) * elif dtype == np.int16: */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_145); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":632 + /* "audiolab/pysndfile/_sndfile.pyx":635 * y = self.read_frames_float(nframes) * elif dtype == np.int32: * y = self.read_frames_int(nframes) # <<<<<<<<<<<<<< * elif dtype == np.int16: * y = self.read_frames_short(nframes) */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = ((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->read_frames_int(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_y); + __pyx_t_3 = ((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->read_frames_int(__pyx_v_self, __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_v_y = __pyx_t_3; __pyx_t_3 = 0; - /* __pyx_t_3 released */ - goto __pyx_L7; + goto __pyx_L4; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":633 + /* "audiolab/pysndfile/_sndfile.pyx":636 * elif dtype == np.int32: * y = self.read_frames_int(nframes) * elif dtype == np.int16: # <<<<<<<<<<<<<< * y = self.read_frames_short(nframes) * else: */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_146); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":634 + /* "audiolab/pysndfile/_sndfile.pyx":637 * y = self.read_frames_int(nframes) * elif dtype == np.int16: * y = self.read_frames_short(nframes) # <<<<<<<<<<<<<< * else: * RuntimeError("Sorry, dtype %s not supported" % str(dtype)) */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = ((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->read_frames_short(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_y); + __pyx_t_3 = ((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->read_frames_short(__pyx_v_self, __pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_v_y = __pyx_t_3; __pyx_t_3 = 0; - /* __pyx_t_3 released */ - goto __pyx_L7; + goto __pyx_L4; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":636 + /* "audiolab/pysndfile/_sndfile.pyx":639 * y = self.read_frames_short(nframes) * else: * RuntimeError("Sorry, dtype %s not supported" % str(dtype)) # <<<<<<<<<<<<<< * * if y.shape[1] == 1: */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_dtype); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_dtype); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dtype); - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_147, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_v_dtype); + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_52), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_L7:; + __pyx_L4:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":638 + /* "audiolab/pysndfile/_sndfile.pyx":641 * RuntimeError("Sorry, dtype %s not supported" % str(dtype)) * * if y.shape[1] == 1: # <<<<<<<<<<<<<< * return y[:, 0] * return y */ - __pyx_1 = PyObject_GetAttr(__pyx_v_y, __pyx_kp_shape); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = __Pyx_GetItemInt(__pyx_1, 1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_RichCompare(__pyx_2, __pyx_int_1, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + if (unlikely(!__pyx_v_y)) { __Pyx_RaiseUnboundLocalError("y"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_3 = PyObject_GetAttr(__pyx_v_y, __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":639 + /* "audiolab/pysndfile/_sndfile.pyx":642 * * if y.shape[1] == 1: * return y[:, 0] # <<<<<<<<<<<<<< * return y * */ - __pyx_1 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1); - Py_INCREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0); - __pyx_1 = 0; - __pyx_2 = PyObject_GetItem(__pyx_v_y, ((PyObject *)__pyx_t_3)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_r = __pyx_2; - __pyx_2 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyObject_GetItem(__pyx_v_y, ((PyObject *)__pyx_k_tuple_54)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - goto __pyx_L8; + goto __pyx_L5; } - __pyx_L8:; + __pyx_L5:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":640 + /* "audiolab/pysndfile/_sndfile.pyx":643 * if y.shape[1] == 1: * return y[:, 0] * return y # <<<<<<<<<<<<<< * * cdef read_frames_double(Sndfile self, sf_count_t nframes): */ - Py_INCREF(__pyx_v_y); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_y); __pyx_r = __pyx_v_y; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames"); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.read_frames", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_y); + __Pyx_XDECREF(__pyx_v_y); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":642 +/* "audiolab/pysndfile/_sndfile.pyx":645 * return y * * cdef read_frames_double(Sndfile self, sf_count_t nframes): # <<<<<<<<<<<<<< @@ -5585,112 +6788,108 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ * cdef sf_count_t res */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_double(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { - PyArrayObject *__pyx_v_ty; +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_double(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { + PyArrayObject *__pyx_v_ty = 0; sf_count_t __pyx_v_res; - Py_buffer __pyx_bstruct_ty; - Py_ssize_t __pyx_bstride_0_ty = 0; - Py_ssize_t __pyx_bstride_1_ty = 0; - Py_ssize_t __pyx_bshape_0_ty = 0; - Py_ssize_t __pyx_bshape_1_ty = 0; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ty; + __Pyx_Buffer __pyx_pybuffer_ty; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyArrayObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - __pyx_v_ty = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - __pyx_bstruct_ty.buf = NULL; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":646 + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_frames_double", 0); + __pyx_pybuffer_ty.pybuffer.buf = NULL; + __pyx_pybuffer_ty.refcount = 0; + __pyx_pybuffernd_ty.data = NULL; + __pyx_pybuffernd_ty.rcbuffer = &__pyx_pybuffer_ty; + + /* "audiolab/pysndfile/_sndfile.pyx":649 * cdef sf_count_t res * * ty = np.empty((nframes, self._sfinfo.channels), # <<<<<<<<<<<<<< * dtype=np.float64, order='C') * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; - __pyx_t_2 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":647 + /* "audiolab/pysndfile/_sndfile.pyx":650 * * ty = np.empty((nframes, self._sfinfo.channels), * dtype=np.float64, order='C') # <<<<<<<<<<<<<< * * res = sf_readf_double(self.hdl, ty.data, nframes) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_kp_91); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_order, __pyx_kp_148) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - /* __pyx_t_2 released */ - if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); - /* __pyx_t_5 allocated */ - __pyx_t_5 = __Pyx_GetBuffer_nn___pyx_t_5numpy_float64_t((PyObject*)__pyx_t_4, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0); - if (unlikely(__pyx_t_5 < 0)) { - /* __pyx_t_6 allocated */ - /* __pyx_t_7 allocated */ - /* __pyx_t_8 allocated */ - PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); - if (unlikely(__Pyx_GetBuffer_nn___pyx_t_5numpy_float64_t((PyObject*)__pyx_v_ty, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0) == -1)) { - Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); - __Pyx_RaiseBufferFallbackError(); - } else { - PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8); - /* __pyx_t_6 released */ - /* __pyx_t_7 released */ - /* __pyx_t_8 released */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__order), ((PyObject *)__pyx_n_s__C)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); + __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); + if (unlikely(__pyx_t_7 < 0)) { + PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_v_ty, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { + Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); + __Pyx_RaiseBufferFallbackError(); + } else { + PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); + } } + __pyx_pybuffernd_ty.diminfo[0].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ty.diminfo[0].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ty.diminfo[1].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ty.diminfo[1].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[1]; + if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_bstride_0_ty = __pyx_bstruct_ty.strides[0]; __pyx_bstride_1_ty = __pyx_bstruct_ty.strides[1]; - __pyx_bshape_0_ty = __pyx_bstruct_ty.shape[0]; __pyx_bshape_1_ty = __pyx_bstruct_ty.shape[1]; - if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 released */ - __pyx_t_4 = 0; - /* __pyx_t_4 released */ - Py_DECREF(((PyObject *)__pyx_v_ty)); - __pyx_v_ty = ((PyArrayObject *)__pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_6 = 0; + __pyx_v_ty = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":649 + /* "audiolab/pysndfile/_sndfile.pyx":652 * dtype=np.float64, order='C') * * res = sf_readf_double(self.hdl, ty.data, nframes) # <<<<<<<<<<<<<< @@ -5699,94 +6898,90 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ */ __pyx_v_res = sf_readf_double(__pyx_v_self->hdl, ((double *)__pyx_v_ty->data), __pyx_v_nframes); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":650 + /* "audiolab/pysndfile/_sndfile.pyx":653 * * res = sf_readf_double(self.hdl, ty.data, nframes) * if not res == nframes: # <<<<<<<<<<<<<< * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty */ - /* __pyx_t_9 allocated */ - __pyx_t_9 = (!(__pyx_v_res == __pyx_v_nframes)); - if (__pyx_t_9) { - /* __pyx_t_9 released */ + __pyx_t_11 = (!(__pyx_v_res == __pyx_v_nframes)); + if (__pyx_t_11) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":651 + /* "audiolab/pysndfile/_sndfile.pyx":654 * res = sf_readf_double(self.hdl, ty.data, nframes) * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) # <<<<<<<<<<<<<< * return ty * */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyLong_FromLongLong(__pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __pyx_t_3 = 0; - __pyx_t_2 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_149, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_to_py___quad_t(__pyx_v_res); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_55), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":652 + /* "audiolab/pysndfile/_sndfile.pyx":655 * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty # <<<<<<<<<<<<<< * * cdef read_frames_float(Sndfile self, sf_count_t nframes): */ - Py_INCREF(((PyObject *)__pyx_v_ty)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_ty)); __pyx_r = ((PyObject *)__pyx_v_ty); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames_double"); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.read_frames_double", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __pyx_L2:; - Py_DECREF(__pyx_v_ty); + __Pyx_XDECREF((PyObject *)__pyx_v_ty); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":654 +/* "audiolab/pysndfile/_sndfile.pyx":657 * return ty * * cdef read_frames_float(Sndfile self, sf_count_t nframes): # <<<<<<<<<<<<<< @@ -5794,113 +6989,109 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ * cdef sf_count_t res */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_float(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { - PyArrayObject *__pyx_v_ty; +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_float(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { + PyArrayObject *__pyx_v_ty = 0; sf_count_t __pyx_v_res; - Py_buffer __pyx_bstruct_ty; - Py_ssize_t __pyx_bstride_0_ty = 0; - Py_ssize_t __pyx_bstride_1_ty = 0; - Py_ssize_t __pyx_bshape_0_ty = 0; - Py_ssize_t __pyx_bshape_1_ty = 0; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ty; + __Pyx_Buffer __pyx_pybuffer_ty; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyArrayObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - __pyx_v_ty = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - __pyx_bstruct_ty.buf = NULL; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":659 + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_frames_float", 0); + __pyx_pybuffer_ty.pybuffer.buf = NULL; + __pyx_pybuffer_ty.refcount = 0; + __pyx_pybuffernd_ty.data = NULL; + __pyx_pybuffernd_ty.rcbuffer = &__pyx_pybuffer_ty; + + /* "audiolab/pysndfile/_sndfile.pyx":661 + * cdef sf_count_t res * - * # Use Fortran order to cope with interleaving * ty = np.empty((nframes, self._sfinfo.channels), # <<<<<<<<<<<<<< - * dtype=np.float32, order='F') - * - */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + * dtype=np.float32, order='C') + * + */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; - __pyx_t_2 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":660 - * # Use Fortran order to cope with interleaving + /* "audiolab/pysndfile/_sndfile.pyx":662 + * * ty = np.empty((nframes, self._sfinfo.channels), - * dtype=np.float32, order='F') # <<<<<<<<<<<<<< + * dtype=np.float32, order='C') # <<<<<<<<<<<<<< * * res = sf_readf_float(self.hdl, ty.data, nframes) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_kp_144); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_order, __pyx_kp_150) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - /* __pyx_t_2 released */ - if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); - /* __pyx_t_5 allocated */ - __pyx_t_5 = __Pyx_GetBuffer_nn___pyx_t_5numpy_float32_t((PyObject*)__pyx_t_4, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0); - if (unlikely(__pyx_t_5 < 0)) { - /* __pyx_t_6 allocated */ - /* __pyx_t_7 allocated */ - /* __pyx_t_8 allocated */ - PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); - if (unlikely(__Pyx_GetBuffer_nn___pyx_t_5numpy_float32_t((PyObject*)__pyx_v_ty, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0) == -1)) { - Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); - __Pyx_RaiseBufferFallbackError(); - } else { - PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8); - /* __pyx_t_6 released */ - /* __pyx_t_7 released */ - /* __pyx_t_8 released */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__order), ((PyObject *)__pyx_n_s__C)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); + __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); + if (unlikely(__pyx_t_7 < 0)) { + PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_v_ty, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { + Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); + __Pyx_RaiseBufferFallbackError(); + } else { + PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); + } } + __pyx_pybuffernd_ty.diminfo[0].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ty.diminfo[0].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ty.diminfo[1].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ty.diminfo[1].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[1]; + if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_bstride_0_ty = __pyx_bstruct_ty.strides[0]; __pyx_bstride_1_ty = __pyx_bstruct_ty.strides[1]; - __pyx_bshape_0_ty = __pyx_bstruct_ty.shape[0]; __pyx_bshape_1_ty = __pyx_bstruct_ty.shape[1]; - if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 released */ - __pyx_t_4 = 0; - /* __pyx_t_4 released */ - Py_DECREF(((PyObject *)__pyx_v_ty)); - __pyx_v_ty = ((PyArrayObject *)__pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_6 = 0; + __pyx_v_ty = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":662 - * dtype=np.float32, order='F') + /* "audiolab/pysndfile/_sndfile.pyx":664 + * dtype=np.float32, order='C') * * res = sf_readf_float(self.hdl, ty.data, nframes) # <<<<<<<<<<<<<< * if not res == nframes: @@ -5908,94 +7099,90 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ */ __pyx_v_res = sf_readf_float(__pyx_v_self->hdl, ((float *)__pyx_v_ty->data), __pyx_v_nframes); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":663 + /* "audiolab/pysndfile/_sndfile.pyx":665 * * res = sf_readf_float(self.hdl, ty.data, nframes) * if not res == nframes: # <<<<<<<<<<<<<< * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty */ - /* __pyx_t_9 allocated */ - __pyx_t_9 = (!(__pyx_v_res == __pyx_v_nframes)); - if (__pyx_t_9) { - /* __pyx_t_9 released */ + __pyx_t_11 = (!(__pyx_v_res == __pyx_v_nframes)); + if (__pyx_t_11) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":664 + /* "audiolab/pysndfile/_sndfile.pyx":666 * res = sf_readf_float(self.hdl, ty.data, nframes) * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) # <<<<<<<<<<<<<< * return ty * */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyLong_FromLongLong(__pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __pyx_t_3 = 0; - __pyx_t_2 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_151, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_to_py___quad_t(__pyx_v_res); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_55), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":665 + /* "audiolab/pysndfile/_sndfile.pyx":667 * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty # <<<<<<<<<<<<<< * * cdef read_frames_int(Sndfile self, sf_count_t nframes): */ - Py_INCREF(((PyObject *)__pyx_v_ty)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_ty)); __pyx_r = ((PyObject *)__pyx_v_ty); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames_float"); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.read_frames_float", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __pyx_L2:; - Py_DECREF(__pyx_v_ty); + __Pyx_XDECREF((PyObject *)__pyx_v_ty); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":667 +/* "audiolab/pysndfile/_sndfile.pyx":669 * return ty * * cdef read_frames_int(Sndfile self, sf_count_t nframes): # <<<<<<<<<<<<<< @@ -6003,113 +7190,109 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ * cdef sf_count_t res */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_int(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { - PyArrayObject *__pyx_v_ty; +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_int(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { + PyArrayObject *__pyx_v_ty = 0; sf_count_t __pyx_v_res; - Py_buffer __pyx_bstruct_ty; - Py_ssize_t __pyx_bstride_0_ty = 0; - Py_ssize_t __pyx_bstride_1_ty = 0; - Py_ssize_t __pyx_bshape_0_ty = 0; - Py_ssize_t __pyx_bshape_1_ty = 0; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ty; + __Pyx_Buffer __pyx_pybuffer_ty; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyArrayObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - __pyx_v_ty = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - __pyx_bstruct_ty.buf = NULL; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":672 + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_frames_int", 0); + __pyx_pybuffer_ty.pybuffer.buf = NULL; + __pyx_pybuffer_ty.refcount = 0; + __pyx_pybuffernd_ty.data = NULL; + __pyx_pybuffernd_ty.rcbuffer = &__pyx_pybuffer_ty; + + /* "audiolab/pysndfile/_sndfile.pyx":673 + * cdef sf_count_t res * - * # Use Fortran order to cope with interleaving * ty = np.empty((nframes, self._sfinfo.channels), # <<<<<<<<<<<<<< - * dtype=np.int, order='F') - * - */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + * dtype=np.int, order='C') + * + */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; - __pyx_t_2 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":673 - * # Use Fortran order to cope with interleaving + /* "audiolab/pysndfile/_sndfile.pyx":674 + * * ty = np.empty((nframes, self._sfinfo.channels), - * dtype=np.int, order='F') # <<<<<<<<<<<<<< + * dtype=np.int, order='C') # <<<<<<<<<<<<<< * * res = sf_readf_int(self.hdl, ty.data, nframes) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_kp_int); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_order, __pyx_kp_152) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - /* __pyx_t_2 released */ - if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); - /* __pyx_t_5 allocated */ - __pyx_t_5 = __Pyx_GetBuffer_nn___pyx_t_5numpy_int32_t((PyObject*)__pyx_t_4, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0); - if (unlikely(__pyx_t_5 < 0)) { - /* __pyx_t_6 allocated */ - /* __pyx_t_7 allocated */ - /* __pyx_t_8 allocated */ - PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); - if (unlikely(__Pyx_GetBuffer_nn___pyx_t_5numpy_int32_t((PyObject*)__pyx_v_ty, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0) == -1)) { - Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); - __Pyx_RaiseBufferFallbackError(); - } else { - PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8); - /* __pyx_t_6 released */ - /* __pyx_t_7 released */ - /* __pyx_t_8 released */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__order), ((PyObject *)__pyx_n_s__C)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); + __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); + if (unlikely(__pyx_t_7 < 0)) { + PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_v_ty, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { + Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); + __Pyx_RaiseBufferFallbackError(); + } else { + PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); + } } + __pyx_pybuffernd_ty.diminfo[0].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ty.diminfo[0].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ty.diminfo[1].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ty.diminfo[1].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[1]; + if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_bstride_0_ty = __pyx_bstruct_ty.strides[0]; __pyx_bstride_1_ty = __pyx_bstruct_ty.strides[1]; - __pyx_bshape_0_ty = __pyx_bstruct_ty.shape[0]; __pyx_bshape_1_ty = __pyx_bstruct_ty.shape[1]; - if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 released */ - __pyx_t_4 = 0; - /* __pyx_t_4 released */ - Py_DECREF(((PyObject *)__pyx_v_ty)); - __pyx_v_ty = ((PyArrayObject *)__pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_6 = 0; + __pyx_v_ty = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":675 - * dtype=np.int, order='F') + /* "audiolab/pysndfile/_sndfile.pyx":676 + * dtype=np.int, order='C') * * res = sf_readf_int(self.hdl, ty.data, nframes) # <<<<<<<<<<<<<< * if not res == nframes: @@ -6117,94 +7300,90 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ */ __pyx_v_res = sf_readf_int(__pyx_v_self->hdl, ((int *)__pyx_v_ty->data), __pyx_v_nframes); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":676 + /* "audiolab/pysndfile/_sndfile.pyx":677 * * res = sf_readf_int(self.hdl, ty.data, nframes) * if not res == nframes: # <<<<<<<<<<<<<< * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty */ - /* __pyx_t_9 allocated */ - __pyx_t_9 = (!(__pyx_v_res == __pyx_v_nframes)); - if (__pyx_t_9) { - /* __pyx_t_9 released */ + __pyx_t_11 = (!(__pyx_v_res == __pyx_v_nframes)); + if (__pyx_t_11) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":677 + /* "audiolab/pysndfile/_sndfile.pyx":678 * res = sf_readf_int(self.hdl, ty.data, nframes) * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) # <<<<<<<<<<<<<< * return ty * */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyLong_FromLongLong(__pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __pyx_t_3 = 0; - __pyx_t_2 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_153, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_to_py___quad_t(__pyx_v_res); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_55), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":678 + /* "audiolab/pysndfile/_sndfile.pyx":679 * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty # <<<<<<<<<<<<<< * * cdef read_frames_short(Sndfile self, sf_count_t nframes): */ - Py_INCREF(((PyObject *)__pyx_v_ty)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_ty)); __pyx_r = ((PyObject *)__pyx_v_ty); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames_int"); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.read_frames_int", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __pyx_L2:; - Py_DECREF(__pyx_v_ty); + __Pyx_XDECREF((PyObject *)__pyx_v_ty); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":680 +/* "audiolab/pysndfile/_sndfile.pyx":681 * return ty * * cdef read_frames_short(Sndfile self, sf_count_t nframes): # <<<<<<<<<<<<<< @@ -6212,113 +7391,109 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ * cdef sf_count_t res */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_short(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { - PyArrayObject *__pyx_v_ty; +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_short(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_nframes) { + PyArrayObject *__pyx_v_ty = 0; sf_count_t __pyx_v_res; - Py_buffer __pyx_bstruct_ty; - Py_ssize_t __pyx_bstride_0_ty = 0; - Py_ssize_t __pyx_bstride_1_ty = 0; - Py_ssize_t __pyx_bshape_0_ty = 0; - Py_ssize_t __pyx_bshape_1_ty = 0; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ty; + __Pyx_Buffer __pyx_pybuffer_ty; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyArrayObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - __pyx_v_ty = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - __pyx_bstruct_ty.buf = NULL; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":685 + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_frames_short", 0); + __pyx_pybuffer_ty.pybuffer.buf = NULL; + __pyx_pybuffer_ty.refcount = 0; + __pyx_pybuffernd_ty.data = NULL; + __pyx_pybuffernd_ty.rcbuffer = &__pyx_pybuffer_ty; + + /* "audiolab/pysndfile/_sndfile.pyx":685 + * cdef sf_count_t res * - * # Use Fortran order to cope with interleaving * ty = np.empty((nframes, self._sfinfo.channels), # <<<<<<<<<<<<<< - * dtype=np.short, order='F') - * - */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + * dtype=np.short, order='C') + * + */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_1 = 0; - __pyx_t_2 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":686 - * # Use Fortran order to cope with interleaving + /* "audiolab/pysndfile/_sndfile.pyx":686 + * * ty = np.empty((nframes, self._sfinfo.channels), - * dtype=np.short, order='F') # <<<<<<<<<<<<<< + * dtype=np.short, order='C') # <<<<<<<<<<<<<< * * res = sf_readf_short(self.hdl, ty.data, nframes) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_kp_short); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_order, __pyx_kp_154) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - /* __pyx_t_2 released */ - if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = ((PyArrayObject *)__pyx_t_3); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); - /* __pyx_t_5 allocated */ - __pyx_t_5 = __Pyx_GetBuffer_nn___pyx_t_5numpy_int16_t((PyObject*)__pyx_t_4, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0); - if (unlikely(__pyx_t_5 < 0)) { - /* __pyx_t_6 allocated */ - /* __pyx_t_7 allocated */ - /* __pyx_t_8 allocated */ - PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); - if (unlikely(__Pyx_GetBuffer_nn___pyx_t_5numpy_int16_t((PyObject*)__pyx_v_ty, &__pyx_bstruct_ty, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0) == -1)) { - Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); - __Pyx_RaiseBufferFallbackError(); - } else { - PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8); - /* __pyx_t_6 released */ - /* __pyx_t_7 released */ - /* __pyx_t_8 released */ + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__short); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__order), ((PyObject *)__pyx_n_s__C)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); + __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); + if (unlikely(__pyx_t_7 < 0)) { + PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ty.rcbuffer->pybuffer, (PyObject*)__pyx_v_ty, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int16_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { + Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); + __Pyx_RaiseBufferFallbackError(); + } else { + PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); + } } + __pyx_pybuffernd_ty.diminfo[0].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ty.diminfo[0].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ty.diminfo[1].strides = __pyx_pybuffernd_ty.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ty.diminfo[1].shape = __pyx_pybuffernd_ty.rcbuffer->pybuffer.shape[1]; + if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_bstride_0_ty = __pyx_bstruct_ty.strides[0]; __pyx_bstride_1_ty = __pyx_bstruct_ty.strides[1]; - __pyx_bshape_0_ty = __pyx_bstruct_ty.shape[0]; __pyx_bshape_1_ty = __pyx_bstruct_ty.shape[1]; - if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 released */ - __pyx_t_4 = 0; - /* __pyx_t_4 released */ - Py_DECREF(((PyObject *)__pyx_v_ty)); - __pyx_v_ty = ((PyArrayObject *)__pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_6 = 0; + __pyx_v_ty = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":688 - * dtype=np.short, order='F') + /* "audiolab/pysndfile/_sndfile.pyx":688 + * dtype=np.short, order='C') * * res = sf_readf_short(self.hdl, ty.data, nframes) # <<<<<<<<<<<<<< * if not res == nframes: @@ -6326,94 +7501,107 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ */ __pyx_v_res = sf_readf_short(__pyx_v_self->hdl, ((short *)__pyx_v_ty->data), __pyx_v_nframes); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":689 + /* "audiolab/pysndfile/_sndfile.pyx":689 * * res = sf_readf_short(self.hdl, ty.data, nframes) * if not res == nframes: # <<<<<<<<<<<<<< * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty */ - /* __pyx_t_9 allocated */ - __pyx_t_9 = (!(__pyx_v_res == __pyx_v_nframes)); - if (__pyx_t_9) { - /* __pyx_t_9 released */ + __pyx_t_11 = (!(__pyx_v_res == __pyx_v_nframes)); + if (__pyx_t_11) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":690 + /* "audiolab/pysndfile/_sndfile.pyx":690 * res = sf_readf_short(self.hdl, ty.data, nframes) * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) # <<<<<<<<<<<<<< * return ty * */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyLong_FromLongLong(__pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __pyx_t_3 = 0; - __pyx_t_2 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_155, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_t_5 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_to_py___quad_t(__pyx_v_res); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_55), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":691 + /* "audiolab/pysndfile/_sndfile.pyx":691 * if not res == nframes: * raise RuntimeError("Asked %d frames, read %d" % (nframes, res)) * return ty # <<<<<<<<<<<<<< * * def write_frames(self, cnp.ndarray input): */ - Py_INCREF(((PyObject *)__pyx_v_ty)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_ty)); __pyx_r = ((PyObject *)__pyx_v_ty); goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.read_frames_short"); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.read_frames_short", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; goto __pyx_L2; __pyx_L0:; - __Pyx_SafeReleaseBuffer(&__pyx_bstruct_ty); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ty.rcbuffer->pybuffer); __pyx_L2:; - Py_DECREF(__pyx_v_ty); + __Pyx_XDECREF((PyObject *)__pyx_v_ty); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_13write_frames(PyObject *__pyx_v_self, PyObject *__pyx_v_input); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_12write_frames[] = "Sndfile.write_frames(self, ndarray input)\n write given number frames into file.\n\n Parameters\n ----------\n input : ndarray\n array containing data to write.\n\n Notes\n -----\n One column per channel.\n\n updates the write pointer.\n\n if the input type is float, and the file encoding is an integer type,\n you should make sure the input data are normalized normalized data\n (that is in the range [-1..1] - which will corresponds to the maximum\n range allowed by the integer bitwidth)."; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_13write_frames(PyObject *__pyx_v_self, PyObject *__pyx_v_input) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_frames (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_12write_frames(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), ((PyArrayObject *)__pyx_v_input)); + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":693 +/* "audiolab/pysndfile/_sndfile.pyx":693 * return ty * * def write_frames(self, cnp.ndarray input): # <<<<<<<<<<<<<< @@ -6421,70 +7609,82 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_ * write given number frames into file. */ -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames(PyObject *__pyx_v_self, PyObject *__pyx_v_input); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames[] = "Sndfile.write_frames(self, ndarray input)\n write given number frames into file.\n\n Parameters\n ----------\n input : ndarray\n array containing data to write.\n\n Notes\n -----\n One column per channel.\n\n updates the write pointer.\n\n if the input type is float, and the file encoding is an integer type,\n you should make sure the input data are normalized normalized data\n (that is in the range [-1..1] - which will corresponds to the maximum\n range allowed by the integer bitwidth)."; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames(PyObject *__pyx_v_self, PyObject *__pyx_v_input) { +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_12write_frames(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input) { int __pyx_v_nc; sf_count_t __pyx_v_nframes; - PyObject *__pyx_v_res; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; + PyObject *__pyx_v_res = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - sf_count_t __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - Py_INCREF(__pyx_v_input); - __pyx_v_res = Py_None; Py_INCREF(Py_None); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *__pyx_t_3 = NULL; + sf_count_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_frames", 0); + __Pyx_INCREF((PyObject *)__pyx_v_input); + + /* "audiolab/pysndfile/_sndfile.pyx":719 + * nc = input.shape[1] + * nframes = input.size / nc + * elif input.ndim == 1: # <<<<<<<<<<<<<< + * nc = 1 + * input = input[:, None] + */ + switch (__pyx_v_input->nd) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":716 + /* "audiolab/pysndfile/_sndfile.pyx":716 * * # First, get the number of channels and frames from input * if input.ndim == 2: # <<<<<<<<<<<<<< * nc = input.shape[1] * nframes = input.size / nc */ - switch (((PyArrayObject *)__pyx_v_input)->nd) { case 2: - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":717 + /* "audiolab/pysndfile/_sndfile.pyx":717 * # First, get the number of channels and frames from input * if input.ndim == 2: * nc = input.shape[1] # <<<<<<<<<<<<<< * nframes = input.size / nc * elif input.ndim == 1: */ - __pyx_v_nc = (((PyArrayObject *)__pyx_v_input)->dimensions[1]); + __pyx_v_nc = (__pyx_v_input->dimensions[1]); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":718 + /* "audiolab/pysndfile/_sndfile.pyx":718 * if input.ndim == 2: * nc = input.shape[1] * nframes = input.size / nc # <<<<<<<<<<<<<< * elif input.ndim == 1: * nc = 1 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_size); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(__pyx_v_nc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_1, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = __pyx_PyInt_AsLongLong(__pyx_t_2); if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __pyx_v_nframes = __pyx_t_3; - /* __pyx_t_3 released */ + __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_FromLong(__pyx_v_nc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyInt_from_py___quad_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (sf_count_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_nframes = __pyx_t_4; break; + + /* "audiolab/pysndfile/_sndfile.pyx":719 + * nc = input.shape[1] + * nframes = input.size / nc + * elif input.ndim == 1: # <<<<<<<<<<<<<< + * nc = 1 + * input = input[:, None] + */ case 1: - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":720 + /* "audiolab/pysndfile/_sndfile.pyx":720 * nframes = input.size / nc * elif input.ndim == 1: * nc = 1 # <<<<<<<<<<<<<< @@ -6493,413 +7693,376 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write */ __pyx_v_nc = 1; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":721 + /* "audiolab/pysndfile/_sndfile.pyx":721 * elif input.ndim == 1: * nc = 1 * input = input[:, None] # <<<<<<<<<<<<<< * nframes = input.size * else: */ - __pyx_1 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_1); - Py_INCREF(Py_None); - PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); - __pyx_1 = 0; - __pyx_1 = PyObject_GetItem(__pyx_v_input, ((PyObject *)__pyx_t_2)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (!(__Pyx_TypeTest(__pyx_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_input); - __pyx_v_input = __pyx_1; - __pyx_1 = 0; - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":722 + __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_input), ((PyObject *)__pyx_k_tuple_57)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_v_input)); + __pyx_v_input = ((PyArrayObject *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":722 * nc = 1 * input = input[:, None] * nframes = input.size # <<<<<<<<<<<<<< * else: * raise ValueError("Expect array of rank 2, got %d" % input.ndim) */ - __pyx_1 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_size); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = __pyx_PyInt_AsLongLong(__pyx_1); if (unlikely((__pyx_t_3 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_v_nframes = __pyx_t_3; - /* __pyx_t_3 released */ + __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_from_py___quad_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (sf_count_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_nframes = __pyx_t_4; break; default: - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":724 + /* "audiolab/pysndfile/_sndfile.pyx":724 * nframes = input.size * else: * raise ValueError("Expect array of rank 2, got %d" % input.ndim) # <<<<<<<<<<<<<< * * # Number of channels should be the one expected */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(((PyArrayObject *)__pyx_v_input)->nd); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_156, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_1, 0, 0); - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_3 = PyInt_FromLong(__pyx_v_input->nd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_58), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":727 + /* "audiolab/pysndfile/_sndfile.pyx":727 * * # Number of channels should be the one expected * if not nc == self._sfinfo.channels: # <<<<<<<<<<<<<< * raise ValueError("Expected %d channels, got %d" % * (self._sfinfo.channels, nc)) */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = (!(__pyx_v_nc == ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.channels)); - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_5 = (!(__pyx_v_nc == __pyx_v_self->_sfinfo.channels)); + if (__pyx_t_5) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":729 + /* "audiolab/pysndfile/_sndfile.pyx":729 * if not nc == self._sfinfo.channels: * raise ValueError("Expected %d channels, got %d" % * (self._sfinfo.channels, nc)) # <<<<<<<<<<<<<< * * input = np.require(input, requirements = 'C') */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->_sfinfo.channels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(__pyx_v_nc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); - __pyx_t_1 = 0; - __pyx_t_2 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_157, ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); + __pyx_t_2 = PyInt_FromLong(__pyx_v_self->_sfinfo.channels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyInt_FromLong(__pyx_v_nc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_59), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":731 + /* "audiolab/pysndfile/_sndfile.pyx":731 * (self._sfinfo.channels, nc)) * * input = np.require(input, requirements = 'C') # <<<<<<<<<<<<<< * * # XXX: check for overflow ? */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_require); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_input); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_input); - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_requirements, __pyx_kp_158) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - /* __pyx_t_2 released */ - if (!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_input); - __pyx_v_input = __pyx_t_5; - __pyx_t_5 = 0; - /* __pyx_t_5 released */ + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__require); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_v_input)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_input)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_input)); + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__requirements), ((PyObject *)__pyx_n_s__C)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_v_input)); + __pyx_v_input = ((PyArrayObject *)__pyx_t_6); + __pyx_t_6 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":734 + /* "audiolab/pysndfile/_sndfile.pyx":734 * * # XXX: check for overflow ? * if input.dtype == np.float64: # <<<<<<<<<<<<<< * res = self.write_frames_double(input, nframes) * elif input.dtype == np.float32: */ - __pyx_2 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_dtype); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_91); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_2, __pyx_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__float64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":735 + /* "audiolab/pysndfile/_sndfile.pyx":735 * # XXX: check for overflow ? * if input.dtype == np.float64: * res = self.write_frames_double(input, nframes) # <<<<<<<<<<<<<< * elif input.dtype == np.float32: * res = self.write_frames_float(input, nframes) */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyLong_FromLongLong(((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->write_frames_double(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), ((PyArrayObject *)__pyx_v_input), __pyx_v_nframes)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_res); - __pyx_v_res = __pyx_t_5; - __pyx_t_5 = 0; - /* __pyx_t_5 released */ - goto __pyx_L6; + __pyx_t_2 = __Pyx_PyInt_to_py___quad_t(((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->write_frames_double(__pyx_v_self, __pyx_v_input, __pyx_v_nframes)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_res = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L4; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":736 + /* "audiolab/pysndfile/_sndfile.pyx":736 * if input.dtype == np.float64: * res = self.write_frames_double(input, nframes) * elif input.dtype == np.float32: # <<<<<<<<<<<<<< * res = self.write_frames_float(input, nframes) * elif input.dtype == np.int: */ - __pyx_1 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_dtype); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_144); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_1, __pyx_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__float32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_5) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":737 + /* "audiolab/pysndfile/_sndfile.pyx":737 * res = self.write_frames_double(input, nframes) * elif input.dtype == np.float32: * res = self.write_frames_float(input, nframes) # <<<<<<<<<<<<<< * elif input.dtype == np.int: * res = self.write_frames_int(input, nframes) */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyLong_FromLongLong(((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->write_frames_float(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), ((PyArrayObject *)__pyx_v_input), __pyx_v_nframes)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_res); - __pyx_v_res = __pyx_t_5; - __pyx_t_5 = 0; - /* __pyx_t_5 released */ - goto __pyx_L6; + __pyx_t_3 = __Pyx_PyInt_to_py___quad_t(((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->write_frames_float(__pyx_v_self, __pyx_v_input, __pyx_v_nframes)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_res = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L4; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":738 + /* "audiolab/pysndfile/_sndfile.pyx":738 * elif input.dtype == np.float32: * res = self.write_frames_float(input, nframes) * elif input.dtype == np.int: # <<<<<<<<<<<<<< * res = self.write_frames_int(input, nframes) * elif input.dtype == np.short: */ - __pyx_2 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_dtype); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_int); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_2, __pyx_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__int); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_5) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":739 + /* "audiolab/pysndfile/_sndfile.pyx":739 * res = self.write_frames_float(input, nframes) * elif input.dtype == np.int: * res = self.write_frames_int(input, nframes) # <<<<<<<<<<<<<< * elif input.dtype == np.short: * res = self.write_frames_short(input, nframes) */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyLong_FromLongLong(((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->write_frames_int(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), ((PyArrayObject *)__pyx_v_input), __pyx_v_nframes)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_res); - __pyx_v_res = __pyx_t_5; - __pyx_t_5 = 0; - /* __pyx_t_5 released */ - goto __pyx_L6; + __pyx_t_6 = __Pyx_PyInt_to_py___quad_t(((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->write_frames_int(__pyx_v_self, __pyx_v_input, __pyx_v_nframes)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_res = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L4; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":740 + /* "audiolab/pysndfile/_sndfile.pyx":740 * elif input.dtype == np.int: * res = self.write_frames_int(input, nframes) * elif input.dtype == np.short: # <<<<<<<<<<<<<< * res = self.write_frames_short(input, nframes) * else: */ - __pyx_1 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_dtype); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_short); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_1, __pyx_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__short); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":741 + /* "audiolab/pysndfile/_sndfile.pyx":741 * res = self.write_frames_int(input, nframes) * elif input.dtype == np.short: * res = self.write_frames_short(input, nframes) # <<<<<<<<<<<<<< * else: * raise Exception("type of input &s not understood" % str(input.dtype)) */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyLong_FromLongLong(((struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->__pyx_vtab)->write_frames_short(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), ((PyArrayObject *)__pyx_v_input), __pyx_v_nframes)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_res); - __pyx_v_res = __pyx_t_5; - __pyx_t_5 = 0; - /* __pyx_t_5 released */ - goto __pyx_L6; + __pyx_t_2 = __Pyx_PyInt_to_py___quad_t(((struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self->__pyx_vtab)->write_frames_short(__pyx_v_self, __pyx_v_input, __pyx_v_nframes)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_res = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L4; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":743 + /* "audiolab/pysndfile/_sndfile.pyx":743 * res = self.write_frames_short(input, nframes) * else: * raise Exception("type of input &s not understood" % str(input.dtype)) # <<<<<<<<<<<<<< * * if not(res == nframes): */ - __pyx_2 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_dtype); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_2); - __pyx_2 = 0; - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyString_Type)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyNumber_Remainder(__pyx_kp_159, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ + __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_60), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); - __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_5, 0, 0); - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L6:; + __pyx_L4:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":745 + /* "audiolab/pysndfile/_sndfile.pyx":745 * raise Exception("type of input &s not understood" % str(input.dtype)) * * if not(res == nframes): # <<<<<<<<<<<<<< * raise IOError("write %d frames, expected to write %d" * % res, nframes) */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_res, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = (!__pyx_t_4); - if (__pyx_t_6) { - /* __pyx_t_6 released */ + __pyx_t_3 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_RichCompare(__pyx_v_res, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = (!__pyx_t_5); + if (__pyx_t_7) { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":747 + /* "audiolab/pysndfile/_sndfile.pyx":747 * if not(res == nframes): * raise IOError("write %d frames, expected to write %d" * % res, nframes) # <<<<<<<<<<<<<< * * cdef sf_count_t write_frames_double(self, cnp.ndarray input, */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_160, __pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyLong_FromLongLong(__pyx_v_nframes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_61), __pyx_v_res); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = __Pyx_PyInt_to_py___quad_t(__pyx_v_nframes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_2 = 0; - __pyx_t_5 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_5 released */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_5, 0, 0); - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + goto __pyx_L5; } - __pyx_L7:; + __pyx_L5:; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.write_frames"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.write_frames", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_res); - Py_DECREF(__pyx_v_input); + __Pyx_XDECREF(__pyx_v_res); + __Pyx_XDECREF((PyObject *)__pyx_v_input); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":749 +/* "audiolab/pysndfile/_sndfile.pyx":749 * % res, nframes) * * cdef sf_count_t write_frames_double(self, cnp.ndarray input, # <<<<<<<<<<<<<< @@ -6907,10 +8070,12 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write * cdef cnp.ndarray[cnp.float64_t, ndim=2] ty */ -static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_double(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { +static sf_count_t __pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_double(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { sf_count_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_frames_double", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":753 + /* "audiolab/pysndfile/_sndfile.pyx":753 * cdef cnp.ndarray[cnp.float64_t, ndim=2] ty * * return sf_writef_double(self.hdl, input.data, nframes) # <<<<<<<<<<<<<< @@ -6922,10 +8087,11 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_writ __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":755 +/* "audiolab/pysndfile/_sndfile.pyx":755 * return sf_writef_double(self.hdl, input.data, nframes) * * cdef sf_count_t write_frames_float(self, cnp.ndarray input, # <<<<<<<<<<<<<< @@ -6933,10 +8099,12 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_writ * cdef cnp.ndarray[cnp.float32_t, ndim=2] ty */ -static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_float(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { +static sf_count_t __pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_float(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { sf_count_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_frames_float", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":759 + /* "audiolab/pysndfile/_sndfile.pyx":759 * cdef cnp.ndarray[cnp.float32_t, ndim=2] ty * * return sf_writef_float(self.hdl, input.data, nframes) # <<<<<<<<<<<<<< @@ -6948,10 +8116,11 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_writ __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":761 +/* "audiolab/pysndfile/_sndfile.pyx":761 * return sf_writef_float(self.hdl, input.data, nframes) * * cdef sf_count_t write_frames_int(self, cnp.ndarray input, # <<<<<<<<<<<<<< @@ -6959,10 +8128,12 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_writ * cdef cnp.ndarray[cnp.int32_t, ndim=2] ty */ -static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_int(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { +static sf_count_t __pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_int(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { sf_count_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_frames_int", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":765 + /* "audiolab/pysndfile/_sndfile.pyx":765 * cdef cnp.ndarray[cnp.int32_t, ndim=2] ty * * return sf_writef_int(self.hdl, input.data, nframes) # <<<<<<<<<<<<<< @@ -6974,10 +8145,11 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_writ __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":767 +/* "audiolab/pysndfile/_sndfile.pyx":767 * return sf_writef_int(self.hdl, input.data, nframes) * * cdef sf_count_t write_frames_short(self, cnp.ndarray input, # <<<<<<<<<<<<<< @@ -6985,10 +8157,12 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_writ * cdef cnp.ndarray[cnp.int16_t, ndim=2] ty */ -static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_short(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { +static sf_count_t __pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_short(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, PyArrayObject *__pyx_v_input, sf_count_t __pyx_v_nframes) { sf_count_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_frames_short", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":771 + /* "audiolab/pysndfile/_sndfile.pyx":771 * cdef cnp.ndarray[cnp.int16_t, ndim=2] ty * * return sf_writef_short(self.hdl, input.data, nframes) # <<<<<<<<<<<<<< @@ -7000,120 +8174,140 @@ static sf_count_t __pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_writ __pyx_r = 0; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":773 - * return sf_writef_short(self.hdl, input.data, nframes) - * - * def seek(Sndfile self, sf_count_t offset, int whence=0, mode='rw'): # <<<<<<<<<<<<<< - * """\ - * Seek into audio file: similar to python seek function, taking only in - */ - -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek[] = "Sndfile.seek(self, scikits.audiolab.pysndfile.sndfile.sf_count_t offset, int whence=0, mode=rw)\n Seek into audio file: similar to python seek function, taking only in\n account audio data.\n\n Parameters\n ----------\n offset : int\n the number of frames (eg two samples for stereo files) to move\n relatively to position set by whence.\n whence : int\n only 0 (beginning), 1 (current) and 2 (end of the file) are\n valid.\n mode : string\n If set to 'rw', both read and write pointers are updated. If\n 'r' is given, only read pointer is updated, if 'w', only the\n write one is (this may of course make sense only if you open\n the file in a certain mode).\n\n Returns\n -------\n offset : int\n the number of frames from the beginning of the file\n\n Notes\n -----\n\n Offset relative to audio data: meta-data are ignored.\n\n if an invalid seek is given (beyond or before the file), an IOError is\n launched; note that this is different from the seek method of a File\n object."; -static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +/* Python wrapper */ +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_15seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_14seek[] = "Sndfile.seek(self, sf_count_t offset, int whence=0, mode='rw')\n Seek into audio file: similar to python seek function, taking only in\n account audio data.\n\n Parameters\n ----------\n offset : int\n the number of frames (eg two samples for stereo files) to move\n relatively to position set by whence.\n whence : int\n only 0 (beginning), 1 (current) and 2 (end of the file) are\n valid.\n mode : string\n If set to 'rw', both read and write pointers are updated. If\n 'r' is given, only read pointer is updated, if 'w', only the\n write one is (this may of course make sense only if you open\n the file in a certain mode).\n\n Returns\n -------\n offset : int\n the number of frames from the beginning of the file\n\n Notes\n -----\n\n Offset relative to audio data: meta-data are ignored.\n\n if an invalid seek is given (beyond or before the file), an IOError is\n launched; note that this is different from the seek method of a File\n object."; +static PyObject *__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_15seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { sf_count_t __pyx_v_offset; int __pyx_v_whence; PyObject *__pyx_v_mode = 0; - sf_count_t __pyx_v_st; - PyObject *__pyx_v_msg; - PyObject *__pyx_r; - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_offset,&__pyx_kp_whence,&__pyx_kp_mode,0}; - __pyx_v_whence = 0; - __pyx_v_mode = __pyx_kp_93; - if (unlikely(__pyx_kwds)) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("seek (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__offset,&__pyx_n_s__whence,&__pyx_n_s__mode,0}; PyObject* values[3] = {0,0,0}; - Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); - case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_offset); - if (likely(values[0])) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "seek") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - __pyx_v_offset = __pyx_PyInt_AsLongLong(values[0]); if (unlikely((__pyx_v_offset == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - if (values[1]) { - __pyx_v_whence = __pyx_PyInt_int(values[1]); if (unlikely((__pyx_v_whence == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - if (values[2]) { - __pyx_v_mode = values[2]; + values[2] = ((PyObject *)__pyx_n_s__rw); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__offset)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__whence); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } } - } else { - switch (PyTuple_GET_SIZE(__pyx_args)) { - case 3: __pyx_v_mode = PyTuple_GET_ITEM(__pyx_args, 2); - case 2: __pyx_v_whence = __pyx_PyInt_int(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_whence == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - case 1: __pyx_v_offset = __pyx_PyInt_AsLongLong(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_offset == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - break; - default: goto __pyx_L5_argtuple_error; + __pyx_v_offset = __Pyx_PyInt_from_py___quad_t(values[0]); if (unlikely((__pyx_v_offset == (sf_count_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (values[1]) { + __pyx_v_whence = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_whence == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_whence = ((int)0); } + __pyx_v_mode = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("seek", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.seek"); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_v_msg = Py_None; Py_INCREF(Py_None); + __pyx_r = __pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_14seek(((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self), __pyx_v_offset, __pyx_v_whence, __pyx_v_mode); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "audiolab/pysndfile/_sndfile.pyx":773 + * return sf_writef_short(self.hdl, input.data, nframes) + * + * def seek(Sndfile self, sf_count_t offset, int whence=0, mode='rw'): # <<<<<<<<<<<<<< + * """\ + * Seek into audio file: similar to python seek function, taking only in + */ + +static PyObject *__pyx_pf_8audiolab_9pysndfile_8_sndfile_7Sndfile_14seek(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *__pyx_v_self, sf_count_t __pyx_v_offset, int __pyx_v_whence, PyObject *__pyx_v_mode) { + sf_count_t __pyx_v_st; + PyObject *__pyx_v_msg = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("seek", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":806 + /* "audiolab/pysndfile/_sndfile.pyx":806 * object.""" * cdef sf_count_t st * if mode == 'rw': # <<<<<<<<<<<<<< * # Update both read and write pointers * st = sf_seek(self.hdl, offset, whence) */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_161, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__rw), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":808 + /* "audiolab/pysndfile/_sndfile.pyx":808 * if mode == 'rw': * # Update both read and write pointers * st = sf_seek(self.hdl, offset, whence) # <<<<<<<<<<<<<< * elif mode == 'r': * whence = whence | SFM_READ */ - __pyx_v_st = sf_seek(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl, __pyx_v_offset, __pyx_v_whence); - goto __pyx_L6; + __pyx_v_st = sf_seek(__pyx_v_self->hdl, __pyx_v_offset, __pyx_v_whence); + goto __pyx_L3; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":809 + /* "audiolab/pysndfile/_sndfile.pyx":809 * # Update both read and write pointers * st = sf_seek(self.hdl, offset, whence) * elif mode == 'r': # <<<<<<<<<<<<<< * whence = whence | SFM_READ * st = sf_seek(self.hdl, offset, whence) */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_162, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__r), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":810 + /* "audiolab/pysndfile/_sndfile.pyx":810 * st = sf_seek(self.hdl, offset, whence) * elif mode == 'r': * whence = whence | SFM_READ # <<<<<<<<<<<<<< @@ -7122,34 +8316,30 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek( */ __pyx_v_whence = (__pyx_v_whence | SFM_READ); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":811 + /* "audiolab/pysndfile/_sndfile.pyx":811 * elif mode == 'r': * whence = whence | SFM_READ * st = sf_seek(self.hdl, offset, whence) # <<<<<<<<<<<<<< * elif mode == 'w': * whence = whence | SFM_WRITE */ - __pyx_v_st = sf_seek(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl, __pyx_v_offset, __pyx_v_whence); - goto __pyx_L6; + __pyx_v_st = sf_seek(__pyx_v_self->hdl, __pyx_v_offset, __pyx_v_whence); + goto __pyx_L3; } - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":812 + /* "audiolab/pysndfile/_sndfile.pyx":812 * whence = whence | SFM_READ * st = sf_seek(self.hdl, offset, whence) * elif mode == 'w': # <<<<<<<<<<<<<< * whence = whence | SFM_WRITE * st = sf_seek(self.hdl, offset, whence) */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, __pyx_kp_163, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mode, ((PyObject *)__pyx_n_s__w), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":813 + /* "audiolab/pysndfile/_sndfile.pyx":813 * st = sf_seek(self.hdl, offset, whence) * elif mode == 'w': * whence = whence | SFM_WRITE # <<<<<<<<<<<<<< @@ -7158,120 +8348,109 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek( */ __pyx_v_whence = (__pyx_v_whence | SFM_WRITE); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":814 + /* "audiolab/pysndfile/_sndfile.pyx":814 * elif mode == 'w': * whence = whence | SFM_WRITE * st = sf_seek(self.hdl, offset, whence) # <<<<<<<<<<<<<< * else: * raise ValueError("mode should be one of 'r', 'w' or 'rw' only") */ - __pyx_v_st = sf_seek(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl, __pyx_v_offset, __pyx_v_whence); - goto __pyx_L6; + __pyx_v_st = sf_seek(__pyx_v_self->hdl, __pyx_v_offset, __pyx_v_whence); + goto __pyx_L3; } /*else*/ { - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":816 + /* "audiolab/pysndfile/_sndfile.pyx":816 * st = sf_seek(self.hdl, offset, whence) * else: * raise ValueError("mode should be one of 'r', 'w' or 'rw' only") # <<<<<<<<<<<<<< * * if st == -1: */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_164); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_164); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L6:; + __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":818 + /* "audiolab/pysndfile/_sndfile.pyx":818 * raise ValueError("mode should be one of 'r', 'w' or 'rw' only") * * if st == -1: # <<<<<<<<<<<<<< * msg = "Error while seeking, libsndfile error is %s" \ * % sf_strerror(self.hdl) */ - /* __pyx_t_2 allocated */ __pyx_t_2 = (__pyx_v_st == -1); if (__pyx_t_2) { - /* __pyx_t_2 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":820 + /* "audiolab/pysndfile/_sndfile.pyx":820 * if st == -1: * msg = "Error while seeking, libsndfile error is %s" \ * % sf_strerror(self.hdl) # <<<<<<<<<<<<<< * raise IOError(msg) * return st */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = __Pyx_PyBytes_FromString(sf_strerror(((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)__pyx_v_self)->hdl)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_165, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - Py_DECREF(__pyx_v_msg); - __pyx_v_msg = __pyx_t_1; - __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_1 = PyBytes_FromString(sf_strerror(__pyx_v_self->hdl)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_v_msg = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":821 + /* "audiolab/pysndfile/_sndfile.pyx":821 * msg = "Error while seeking, libsndfile error is %s" \ * % sf_strerror(self.hdl) * raise IOError(msg) # <<<<<<<<<<<<<< * return st * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_v_msg); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_msg); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_msg); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg); + __Pyx_GIVEREF(__pyx_v_msg); + __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + goto __pyx_L4; } - __pyx_L7:; + __pyx_L4:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":822 + /* "audiolab/pysndfile/_sndfile.pyx":822 * % sf_strerror(self.hdl) * raise IOError(msg) * return st # <<<<<<<<<<<<<< * * cdef int_to_format(int format): */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyLong_FromLongLong(__pyx_v_st); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_to_py___quad_t(__pyx_v_st); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_1); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.Sndfile.seek"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.Sndfile.seek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_msg); + __Pyx_XDECREF(__pyx_v_msg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":824 +/* "audiolab/pysndfile/_sndfile.pyx":824 * return st * * cdef int_to_format(int format): # <<<<<<<<<<<<<< @@ -7279,20 +8458,23 @@ static PyObject *__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek( * integer, as used internally by sndfile.""" */ -static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format(int __pyx_v_format) { +static PyObject *__pyx_f_8audiolab_9pysndfile_8_sndfile_int_to_format(int __pyx_v_format) { int __pyx_v_ctype; int __pyx_v_cencoding; int __pyx_v_cendian; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("int_to_format", 0); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":828 + /* "audiolab/pysndfile/_sndfile.pyx":828 * integer, as used internally by sndfile.""" * cdef int ctype, cencoding, cendian * ctype = format & SF_FORMAT_TYPEMASK # <<<<<<<<<<<<<< @@ -7301,7 +8483,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format( */ __pyx_v_ctype = (__pyx_v_format & SF_FORMAT_TYPEMASK); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":829 + /* "audiolab/pysndfile/_sndfile.pyx":829 * cdef int ctype, cencoding, cendian * ctype = format & SF_FORMAT_TYPEMASK * cencoding = format & SF_FORMAT_SUBMASK # <<<<<<<<<<<<<< @@ -7310,7 +8492,7 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format( */ __pyx_v_cencoding = (__pyx_v_format & SF_FORMAT_SUBMASK); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":830 + /* "audiolab/pysndfile/_sndfile.pyx":830 * ctype = format & SF_FORMAT_TYPEMASK * cencoding = format & SF_FORMAT_SUBMASK * cendian = format & SF_FORMAT_ENDMASK # <<<<<<<<<<<<<< @@ -7319,99 +8501,110 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format( */ __pyx_v_cendian = (__pyx_v_format & SF_FORMAT_ENDMASK); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":832 + /* "audiolab/pysndfile/_sndfile.pyx":832 * cendian = format & SF_FORMAT_ENDMASK * * if not format == (ctype | cencoding | cendian): # <<<<<<<<<<<<<< * raise RuntimeError("Inconsistent format: this is a bug") * */ - /* __pyx_t_1 allocated */ __pyx_t_1 = (!(__pyx_v_format == ((__pyx_v_ctype | __pyx_v_cencoding) | __pyx_v_cendian))); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":833 + /* "audiolab/pysndfile/_sndfile.pyx":833 * * if not format == (ctype | cencoding | cendian): * raise RuntimeError("Inconsistent format: this is a bug") # <<<<<<<<<<<<<< * * return _ENUM_TO_STR_FILE_FORMAT[ctype], \ */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_166); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_166); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_66), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":835 + /* "audiolab/pysndfile/_sndfile.pyx":835 * raise RuntimeError("Inconsistent format: this is a bug") * * return _ENUM_TO_STR_FILE_FORMAT[ctype], \ # <<<<<<<<<<<<<< * _ENUM_TO_STR_ENCODING[cencoding], \ * _ENUM_TO_STR_ENDIAN[cendian] */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_86); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = __Pyx_GetItemInt(__pyx_1, __pyx_v_ctype, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_19); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_ctype, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":836 + /* "audiolab/pysndfile/_sndfile.pyx":836 * * return _ENUM_TO_STR_FILE_FORMAT[ctype], \ * _ENUM_TO_STR_ENCODING[cencoding], \ # <<<<<<<<<<<<<< * _ENUM_TO_STR_ENDIAN[cendian] */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_85); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = __Pyx_GetItemInt(__pyx_1, __pyx_v_cencoding, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_cencoding, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":837 + /* "audiolab/pysndfile/_sndfile.pyx":837 * return _ENUM_TO_STR_FILE_FORMAT[ctype], \ * _ENUM_TO_STR_ENCODING[cencoding], \ * _ENUM_TO_STR_ENDIAN[cendian] # <<<<<<<<<<<<<< */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__ENUM_TO_STR_ENDIAN); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_4 = __Pyx_GetItemInt(__pyx_1, __pyx_v_cendian, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_2); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_3); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_4); - __pyx_2 = 0; - __pyx_3 = 0; - __pyx_4 = 0; - __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___ENUM_TO_STR_ENDIAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_cendian, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_r = ((PyObject *)__pyx_t_2); + __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; Py_INCREF(Py_None); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile.int_to_format"); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("audiolab.pysndfile._sndfile.int_to_format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":50 +/* Python wrapper */ +static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); + __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "numpy.pxd":194 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -7419,46 +8612,90 @@ static PyObject *__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_int_to_format( * # requirements, and does not yet fullfill the PEP. */ -static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ -static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { +static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_copy_shape; int __pyx_v_i; int __pyx_v_ndim; + int __pyx_v_endian_detector; + int __pyx_v_little_endian; int __pyx_v_t; char *__pyx_v_f; PyArray_Descr *__pyx_v_descr = 0; + int __pyx_v_offset; int __pyx_v_hasfields; int __pyx_r; + __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - char *__pyx_t_5; - if (__pyx_v_info == NULL) return 0; - __pyx_v_info->obj = Py_None; Py_INCREF(Py_None); - - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":56 + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + char *__pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getbuffer__", 0); + if (__pyx_v_info != NULL) { + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + } + + /* "numpy.pxd":200 * # of flags + * + * if info == NULL: return # <<<<<<<<<<<<<< + * + * cdef int copy_shape, i, ndim + */ + __pyx_t_1 = (__pyx_v_info == NULL); + if (__pyx_t_1) { + __pyx_r = 0; + goto __pyx_L0; + goto __pyx_L3; + } + __pyx_L3:; + + /* "numpy.pxd":203 + * + * cdef int copy_shape, i, ndim + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * + */ + __pyx_v_endian_detector = 1; + + /* "numpy.pxd":204 * cdef int copy_shape, i, ndim + * cdef int endian_detector = 1 + * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * + * ndim = PyArray_NDIM(self) + */ + __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "numpy.pxd":206 + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ - __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self)); + __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":58 + /* "numpy.pxd":208 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * copy_shape = 1 * else: */ - /* __pyx_t_1 allocated */ __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":59 + /* "numpy.pxd":209 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< @@ -7466,11 +8703,11 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf * copy_shape = 0 */ __pyx_v_copy_shape = 1; - goto __pyx_L5; + goto __pyx_L4; } /*else*/ { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":61 + /* "numpy.pxd":211 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< @@ -7479,202 +8716,187 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_copy_shape = 0; } - __pyx_L5:; + __pyx_L4:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":63 + /* "numpy.pxd":213 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") */ - if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) { + __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + if (__pyx_t_1) { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":64 + /* "numpy.pxd":214 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS)); + __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS)); + __pyx_t_3 = __pyx_t_2; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + __pyx_t_3 = __pyx_t_1; } - if (__pyx_t_1) { - /* __pyx_t_1 released */ + if (__pyx_t_3) { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":65 + /* "numpy.pxd":215 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1); - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; } - __pyx_L6:; + __pyx_L5:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":67 - * raise ValueError("ndarray is not C contiguous") + /* "numpy.pxd":217 + * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") */ - if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) { + __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + if (__pyx_t_3) { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":68 + /* "numpy.pxd":218 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS)); + __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS)); + __pyx_t_2 = __pyx_t_1; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + __pyx_t_2 = __pyx_t_3; } - if (__pyx_t_1) { - /* __pyx_t_1 released */ + if (__pyx_t_2) { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":69 + /* "numpy.pxd":219 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2); - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_70), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; } - __pyx_L7:; + __pyx_L6:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":71 - * raise ValueError("ndarray is not Fortran contiguous") + /* "numpy.pxd":221 + * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if copy_shape: */ - __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self)); + __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":72 + /* "numpy.pxd":222 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if copy_shape: - * # Allocate new buffer for strides and shape info. This is allocated + * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":73 + /* "numpy.pxd":223 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< - * # Allocate new buffer for strides and shape info. This is allocated - * # as one block, strides first. + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __pyx_v_copy_shape; - if (__pyx_t_4) { - /* __pyx_t_4 released */ + if (__pyx_v_copy_shape) { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":76 - * # Allocate new buffer for strides and shape info. This is allocated - * # as one block, strides first. - * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< + /* "numpy.pxd":226 + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ - __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2))); + __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":77 - * # as one block, strides first. - * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) + /* "numpy.pxd":227 + * # This is allocated as one block, strides first. + * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":78 - * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) + /* "numpy.pxd":228 + * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i+=1) { + __pyx_t_5 = __pyx_v_ndim; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":79 + /* "numpy.pxd":229 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< * info.shape[i] = PyArray_DIMS(self)[i] * else: */ - (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]); + (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":80 + /* "numpy.pxd":230 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< * else: * info.strides = PyArray_STRIDES(self) */ - (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]); + (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } - goto __pyx_L8; + goto __pyx_L7; } /*else*/ { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":82 + /* "numpy.pxd":232 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ - __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))); + __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":83 + /* "numpy.pxd":233 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) */ - __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(((PyArrayObject *)__pyx_v_self))); + __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); } - __pyx_L8:; + __pyx_L7:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":84 + /* "numpy.pxd":234 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -7683,25 +8905,25 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->suboffsets = NULL; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":85 + /* "numpy.pxd":235 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< * info.readonly = not PyArray_ISWRITEABLE(self) * */ - __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self)); + __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":86 + /* "numpy.pxd":236 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< * * cdef int t */ - __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self))); + __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self)); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":89 + /* "numpy.pxd":239 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -7710,403 +8932,519 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_f = NULL; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":90 + /* "numpy.pxd":240 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< * cdef list stack - * + * cdef int offset */ - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr)); - __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr; + __pyx_t_4 = ((PyObject *)__pyx_v_self->descr); + __Pyx_INCREF(__pyx_t_4); + __pyx_v_descr = ((PyArray_Descr *)__pyx_t_4); + __pyx_t_4 = 0; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":93 - * cdef list stack + /* "numpy.pxd":244 + * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< * - * # Ugly hack warning: + * if not hasfields and not copy_shape: */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":103 - * # functions). + /* "numpy.pxd":246 + * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ - if ((!__pyx_v_hasfields)) { - /* __pyx_t_1 allocated */ - __pyx_t_1 = (!__pyx_v_copy_shape); + __pyx_t_2 = (!__pyx_v_hasfields); + if (__pyx_t_2) { + __pyx_t_3 = (!__pyx_v_copy_shape); + __pyx_t_1 = __pyx_t_3; } else { - __pyx_t_1 = (!__pyx_v_hasfields); + __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":105 + /* "numpy.pxd":248 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< * else: * # need to call releasebuffer */ - Py_INCREF(Py_None); - Py_DECREF(__pyx_v_info->obj); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = Py_None; - goto __pyx_L11; + goto __pyx_L10; } /*else*/ { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":108 + /* "numpy.pxd":251 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< * * if not hasfields: */ - Py_INCREF(__pyx_v_self); - Py_DECREF(__pyx_v_info->obj); - __pyx_v_info->obj = __pyx_v_self; + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = ((PyObject *)__pyx_v_self); } - __pyx_L11:; + __pyx_L10:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":110 + /* "numpy.pxd":253 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< * t = descr.type_num - * if t == NPY_BYTE: f = "b" + * if ((descr.byteorder == c'>' and little_endian) or */ - /* __pyx_t_1 allocated */ __pyx_t_1 = (!__pyx_v_hasfields); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":111 + /* "numpy.pxd":254 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< - * if t == NPY_BYTE: f = "b" - * elif t == NPY_UBYTE: f = "B" + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): */ - __pyx_v_t = __pyx_v_descr->type_num; + __pyx_t_5 = __pyx_v_descr->type_num; + __pyx_v_t = __pyx_t_5; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":112 + /* "numpy.pxd":255 * if not hasfields: * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + if (__pyx_t_1) { + __pyx_t_2 = __pyx_v_little_endian; + } else { + __pyx_t_2 = __pyx_t_1; + } + if (!__pyx_t_2) { + + /* "numpy.pxd":256 + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * if t == NPY_BYTE: f = "b" + */ + __pyx_t_1 = (__pyx_v_descr->byteorder == '<'); + if (__pyx_t_1) { + __pyx_t_3 = (!__pyx_v_little_endian); + __pyx_t_7 = __pyx_t_3; + } else { + __pyx_t_7 = __pyx_t_1; + } + __pyx_t_1 = __pyx_t_7; + } else { + __pyx_t_1 = __pyx_t_2; + } + if (__pyx_t_1) { + + /* "numpy.pxd":257 + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + */ + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L12; + } + __pyx_L12:; + + /* "numpy.pxd":258 + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ - switch (__pyx_v_t) { - case NPY_BYTE: - __pyx_v_f = __pyx_k_3; - break; - case NPY_UBYTE: + __pyx_t_1 = (__pyx_v_t == NPY_BYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__b; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":113 - * t = descr.type_num + /* "numpy.pxd":259 + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ - __pyx_v_f = __pyx_k_4; - break; - case NPY_SHORT: + __pyx_t_1 = (__pyx_v_t == NPY_UBYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__B; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":114 + /* "numpy.pxd":260 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ - __pyx_v_f = __pyx_k_5; - break; - case NPY_USHORT: + __pyx_t_1 = (__pyx_v_t == NPY_SHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__h; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":115 + /* "numpy.pxd":261 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ - __pyx_v_f = __pyx_k_6; - break; - case NPY_INT: + __pyx_t_1 = (__pyx_v_t == NPY_USHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__H; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":116 + /* "numpy.pxd":262 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ - __pyx_v_f = __pyx_k_7; - break; - case NPY_UINT: + __pyx_t_1 = (__pyx_v_t == NPY_INT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__i; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":117 + /* "numpy.pxd":263 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ - __pyx_v_f = __pyx_k_8; - break; - case NPY_LONG: + __pyx_t_1 = (__pyx_v_t == NPY_UINT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__I; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":118 + /* "numpy.pxd":264 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ - __pyx_v_f = __pyx_k_9; - break; - case NPY_ULONG: + __pyx_t_1 = (__pyx_v_t == NPY_LONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__l; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":119 + /* "numpy.pxd":265 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ - __pyx_v_f = __pyx_k_10; - break; - case NPY_LONGLONG: + __pyx_t_1 = (__pyx_v_t == NPY_ULONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__L; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":120 + /* "numpy.pxd":266 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ - __pyx_v_f = __pyx_k_11; - break; - case NPY_ULONGLONG: + __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__q; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":121 + /* "numpy.pxd":267 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ - __pyx_v_f = __pyx_k_12; - break; - case NPY_FLOAT: + __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Q; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":122 + /* "numpy.pxd":268 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ - __pyx_v_f = __pyx_k_13; - break; - case NPY_DOUBLE: + __pyx_t_1 = (__pyx_v_t == NPY_FLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__f; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":123 + /* "numpy.pxd":269 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ - __pyx_v_f = __pyx_k_14; - break; - case NPY_LONGDOUBLE: + __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__d; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":124 + /* "numpy.pxd":270 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ - __pyx_v_f = __pyx_k_15; - break; - case NPY_CFLOAT: + __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__g; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":125 + /* "numpy.pxd":271 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ - __pyx_v_f = __pyx_k_16; - break; - case NPY_CDOUBLE: + __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zf; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":126 + /* "numpy.pxd":272 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ - __pyx_v_f = __pyx_k_17; - break; - case NPY_CLONGDOUBLE: + __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zd; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":127 + /* "numpy.pxd":273 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ - __pyx_v_f = __pyx_k_18; - break; - case NPY_OBJECT: + __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zg; + goto __pyx_L13; + } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":128 + /* "numpy.pxd":274 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_v_f = __pyx_k_19; - break; - default: + __pyx_t_1 = (__pyx_v_t == NPY_OBJECT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__O; + goto __pyx_L13; + } + /*else*/ { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":130 + /* "numpy.pxd":276 * elif t == NPY_OBJECT: f = "O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyNumber_Remainder(__pyx_kp_20, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); - __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_3, 0, 0); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; - } - - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":131 + __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_73), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_8)); + __pyx_t_8 = 0; + __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L13:; + + /* "numpy.pxd":277 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":132 - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + /* "numpy.pxd":278 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: - * info.format = stdlib.malloc(255) # static size + * info.format = stdlib.malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; - goto __pyx_L12; + goto __pyx_L11; } /*else*/ { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":134 + /* "numpy.pxd":280 * return * else: - * info.format = stdlib.malloc(255) # static size # <<<<<<<<<<<<<< - * f = _util_dtypestring(descr, info.format, info.format + 255) - * f[0] = 0 # Terminate format string + * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 */ __pyx_v_info->format = ((char *)malloc(255)); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":135 + /* "numpy.pxd":281 * else: - * info.format = stdlib.malloc(255) # static size - * f = _util_dtypestring(descr, info.format, info.format + 255) # <<<<<<<<<<<<<< - * f[0] = 0 # Terminate format string + * info.format = stdlib.malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< + * offset = 0 + * f = _util_dtypestring(descr, info.format + 1, + */ + (__pyx_v_info->format[0]) = '^'; + + /* "numpy.pxd":282 + * info.format = stdlib.malloc(_buffer_format_string_len) + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 # <<<<<<<<<<<<<< + * f = _util_dtypestring(descr, info.format + 1, + * info.format + _buffer_format_string_len, + */ + __pyx_v_offset = 0; + + /* "numpy.pxd":285 + * f = _util_dtypestring(descr, info.format + 1, + * info.format + _buffer_format_string_len, + * &offset) # <<<<<<<<<<<<<< + * f[0] = c'\0' # Terminate format string * */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, __pyx_v_info->format, (__pyx_v_info->format + 255)); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_5; - /* __pyx_t_5 released */ + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_9; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":136 - * info.format = stdlib.malloc(255) # static size - * f = _util_dtypestring(descr, info.format, info.format + 255) - * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< + /* "numpy.pxd":286 + * info.format + _buffer_format_string_len, + * &offset) + * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ - (__pyx_v_f[0]) = 0; + (__pyx_v_f[0]) = '\x00'; } - __pyx_L12:; + __pyx_L11:; __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("numpy.ndarray.__getbuffer__"); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; - Py_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; + if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; + } goto __pyx_L2; __pyx_L0:; - if (__pyx_v_info->obj == Py_None) { Py_DECREF(Py_None); __pyx_v_info->obj = NULL; } + if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(Py_None); + __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; + } __pyx_L2:; - Py_XDECREF(__pyx_v_descr); + __Pyx_XDECREF((PyObject *)__pyx_v_descr); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":138 - * f[0] = 0 # Terminate format string +/* Python wrapper */ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); + __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); + __Pyx_RefNannyFinishContext(); +} + +/* "numpy.pxd":288 + * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * stdlib.free(info.format) */ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { +static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + __Pyx_RefNannyDeclarations int __pyx_t_1; - int __pyx_t_2; + __Pyx_RefNannySetupContext("__releasebuffer__", 0); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":139 + /* "numpy.pxd":289 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); + __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self); if (__pyx_t_1) { - /* __pyx_t_1 released */ - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":140 + /* "numpy.pxd":290 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< @@ -8114,23 +9452,21 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P * stdlib.free(info.strides) */ free(__pyx_v_info->format); - goto __pyx_L5; + goto __pyx_L3; } - __pyx_L5:; + __pyx_L3:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":141 + /* "numpy.pxd":291 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * stdlib.free(info.strides) * # info.shape was stored after info.strides in the same block */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); - if (__pyx_t_2) { - /* __pyx_t_2 released */ + __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); + if (__pyx_t_1) { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":142 + /* "numpy.pxd":292 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< @@ -8138,654 +9474,940 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P * */ free(__pyx_v_info->strides); - goto __pyx_L6; + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; + __Pyx_RefNannyFinishContext(); } -/* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":248 +/* "numpy.pxd":768 + * ctypedef npy_cdouble complex_t * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) * - * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end) except NULL: # <<<<<<<<<<<<<< - * # Recursive utility function used in __getbuffer__ to get format - * # string. The new location in the format string is returned. */ -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end) { - PyArray_Descr *__pyx_v_child; - PyObject *__pyx_v_i; - PyObject *__pyx_v_t; - char *__pyx_r; - PyObject *__pyx_1 = 0; - Py_ssize_t __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - char *__pyx_t_6; - __pyx_v_child = ((PyArray_Descr *)Py_None); Py_INCREF(Py_None); - __pyx_v_i = ((PyObject *)Py_None); Py_INCREF(Py_None); - __pyx_v_t = Py_None; Py_INCREF(Py_None); +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":254 - * cdef dtype child - * cdef tuple i - * for i in descr.fields.itervalues(): # <<<<<<<<<<<<<< - * child = i[0] - * if not PyDataType_HASFIELDS(child): + /* "numpy.pxd":769 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): */ - /* __pyx_t_1 allocated */ - __pyx_1 = PyObject_GetAttr(__pyx_v_descr->fields, __pyx_kp_itervalues); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; Py_INCREF(__pyx_t_3); - } else { - __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - for (;;) { - /* __pyx_t_2 allocated */ - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); Py_INCREF(__pyx_t_2); __pyx_t_1++; - } else if (likely(PyTuple_CheckExact(__pyx_t_3))) { - if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); Py_INCREF(__pyx_t_2); __pyx_t_1++; - } else { - __pyx_t_2 = PyIter_Next(__pyx_t_3); - if (!__pyx_t_2) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; - } - } - if (!(likely(PyTuple_CheckExact(__pyx_t_2)) || (__pyx_t_2) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_v_i)); - __pyx_v_i = ((PyObject *)__pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":255 - * cdef tuple i - * for i in descr.fields.itervalues(): - * child = i[0] # <<<<<<<<<<<<<< - * if not PyDataType_HASFIELDS(child): - * t = child.type_num - */ - __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_i), 0, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (!(__Pyx_TypeTest(__pyx_1, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_v_child)); - __pyx_v_child = ((PyArray_Descr *)__pyx_1); - __pyx_1 = 0; + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":256 - * for i in descr.fields.itervalues(): - * child = i[0] - * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< - * t = child.type_num - * if end - f < 15: # this should leave room for "T{" and "}" as well +/* "numpy.pxd":771 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = (!PyDataType_HASFIELDS(__pyx_v_child)); - if (__pyx_t_4) { - /* __pyx_t_4 released */ - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":257 - * child = i[0] - * if not PyDataType_HASFIELDS(child): - * t = child.type_num # <<<<<<<<<<<<<< - * if end - f < 15: # this should leave room for "T{" and "}" as well - * raise RuntimeError("Format string allocated too short.") - */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_v_t); - __pyx_v_t = __pyx_t_2; - __pyx_t_2 = 0; - /* __pyx_t_2 released */ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":258 - * if not PyDataType_HASFIELDS(child): - * t = child.type_num - * if end - f < 15: # this should leave room for "T{" and "}" as well # <<<<<<<<<<<<<< - * raise RuntimeError("Format string allocated too short.") + /* "numpy.pxd":772 * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = ((__pyx_v_end - __pyx_v_f) < 15); - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":259 - * t = child.type_num - * if end - f < 15: # this should leave room for "T{" and "}" as well - * raise RuntimeError("Format string allocated too short.") # <<<<<<<<<<<<<< + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "numpy.pxd":774 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) * - * # Until ticket #99 is fixed, use integers to avoid warnings */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_INCREF(__pyx_kp_21); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_21); - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - __Pyx_Raise(__pyx_t_5, 0, 0); - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; - } - __pyx_L6:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":262 +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "numpy.pxd":775 * - * # Until ticket #99 is fixed, use integers to avoid warnings - * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ - (__pyx_v_f[0]) = 98; - goto __pyx_L7; - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":263 - * # Until ticket #99 is fixed, use integers to avoid warnings - * if t == NPY_BYTE: f[0] = 98 #"b" - * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" - */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ - (__pyx_v_f[0]) = 66; - goto __pyx_L7; - } + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":264 - * if t == NPY_BYTE: f[0] = 98 #"b" - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" +/* "numpy.pxd":777 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ - (__pyx_v_f[0]) = 104; - goto __pyx_L7; - } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":265 - * elif t == NPY_UBYTE: f[0] = 66 #"B" - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" - */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ - (__pyx_v_f[0]) = 72; - goto __pyx_L7; - } +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":266 - * elif t == NPY_SHORT: f[0] = 104 #"h" - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< - * elif t == NPY_UINT: f[0] = 73 #"I" - * elif t == NPY_LONG: f[0] = 108 #"l" + /* "numpy.pxd":778 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ - (__pyx_v_f[0]) = 105; - goto __pyx_L7; - } + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":267 - * elif t == NPY_USHORT: f[0] = 72 #"H" - * elif t == NPY_INT: f[0] = 105 #"i" - * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "numpy.pxd":780 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "numpy.pxd":781 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "numpy.pxd":783 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< + * # Recursive utility function used in __getbuffer__ to get format + * # string. The new location in the format string is returned. + */ + +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { + PyArray_Descr *__pyx_v_child = 0; + int __pyx_v_endian_detector; + int __pyx_v_little_endian; + PyObject *__pyx_v_fields = 0; + PyObject *__pyx_v_childname = NULL; + PyObject *__pyx_v_new_offset = NULL; + PyObject *__pyx_v_t = NULL; + char *__pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + int __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + int __pyx_t_10; + long __pyx_t_11; + char *__pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_util_dtypestring", 0); + + /* "numpy.pxd":790 + * cdef int delta_offset + * cdef tuple i + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * cdef tuple fields + */ + __pyx_v_endian_detector = 1; + + /* "numpy.pxd":791 + * cdef tuple i + * cdef int endian_detector = 1 + * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef tuple fields + * + */ + __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); + + /* "numpy.pxd":794 + * cdef tuple fields + * + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields + */ + if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_XDECREF(__pyx_v_childname); + __pyx_v_childname = __pyx_t_3; + __pyx_t_3 = 0; + + /* "numpy.pxd":795 + * + * for childname in descr.names: + * fields = descr.fields[childname] # <<<<<<<<<<<<<< + * child, new_offset = fields + * + */ + __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF(((PyObject *)__pyx_v_fields)); + __pyx_v_fields = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "numpy.pxd":796 + * for childname in descr.names: + * fields = descr.fields[childname] + * child, new_offset = fields # <<<<<<<<<<<<<< + * + * if (end - f) - (new_offset - offset[0]) < 15: + */ + if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) { + PyObject* sequence = ((PyObject *)__pyx_v_fields); + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (1) { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } else + { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; + index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L6_unpacking_done:; + } + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF(((PyObject *)__pyx_v_child)); + __pyx_v_child = ((PyArray_Descr *)__pyx_t_3); + __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_v_new_offset); + __pyx_v_new_offset = __pyx_t_4; + __pyx_t_4 = 0; + + /* "numpy.pxd":798 + * child, new_offset = fields + * + * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + */ + __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { + + /* "numpy.pxd":799 + * + * if (end - f) - (new_offset - offset[0]) < 15: + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * + * if ((child.byteorder == c'>' and little_endian) or + */ + __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_75), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; + } + __pyx_L7:; + + /* "numpy.pxd":801 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") + * + * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") + */ + __pyx_t_7 = (__pyx_v_child->byteorder == '>'); + if (__pyx_t_7) { + __pyx_t_8 = __pyx_v_little_endian; + } else { + __pyx_t_8 = __pyx_t_7; + } + if (!__pyx_t_8) { + + /* "numpy.pxd":802 + * + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") + * # One could encode it in the format string and have Cython + */ + __pyx_t_7 = (__pyx_v_child->byteorder == '<'); + if (__pyx_t_7) { + __pyx_t_9 = (!__pyx_v_little_endian); + __pyx_t_10 = __pyx_t_9; + } else { + __pyx_t_10 = __pyx_t_7; + } + __pyx_t_7 = __pyx_t_10; + } else { + __pyx_t_7 = __pyx_t_8; + } + if (__pyx_t_7) { + + /* "numpy.pxd":803 + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * # One could encode it in the format string and have Cython + * # complain instead, BUT: < and > in format strings also imply + */ + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L8; + } + __pyx_L8:; + + /* "numpy.pxd":813 + * + * # Output padding bytes + * while offset[0] < new_offset: # <<<<<<<<<<<<<< + * f[0] = 120 # "x"; pad byte + * f += 1 + */ + while (1) { + __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_7) break; + + /* "numpy.pxd":814 + * # Output padding bytes + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< + * f += 1 + * offset[0] += 1 + */ + (__pyx_v_f[0]) = 120; + + /* "numpy.pxd":815 + * while offset[0] < new_offset: + * f[0] = 120 # "x"; pad byte + * f += 1 # <<<<<<<<<<<<<< + * offset[0] += 1 + * + */ + __pyx_v_f = (__pyx_v_f + 1); + + /* "numpy.pxd":816 + * f[0] = 120 # "x"; pad byte + * f += 1 + * offset[0] += 1 # <<<<<<<<<<<<<< + * + * offset[0] += child.itemsize + */ + __pyx_t_11 = 0; + (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1); + } + + /* "numpy.pxd":818 + * offset[0] += 1 + * + * offset[0] += child.itemsize # <<<<<<<<<<<<<< + * + * if not PyDataType_HASFIELDS(child): + */ + __pyx_t_11 = 0; + (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize); + + /* "numpy.pxd":820 + * offset[0] += child.itemsize + * + * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< + * t = child.type_num + * if end - f < 5: + */ + __pyx_t_7 = (!PyDataType_HASFIELDS(__pyx_v_child)); + if (__pyx_t_7) { + + /* "numpy.pxd":821 + * + * if not PyDataType_HASFIELDS(child): + * t = child.type_num # <<<<<<<<<<<<<< + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") + */ + __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_v_t); + __pyx_v_t = __pyx_t_3; + __pyx_t_3 = 0; + + /* "numpy.pxd":822 + * if not PyDataType_HASFIELDS(child): + * t = child.type_num + * if end - f < 5: # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") + * + */ + __pyx_t_7 = ((__pyx_v_end - __pyx_v_f) < 5); + if (__pyx_t_7) { + + /* "numpy.pxd":823 + * t = child.type_num + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + * + * # Until ticket #99 is fixed, use integers to avoid warnings + */ + __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_78), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L12; + } + __pyx_L12:; + + /* "numpy.pxd":826 + * + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + */ + __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { + (__pyx_v_f[0]) = 98; + goto __pyx_L13; + } + + /* "numpy.pxd":827 + * # Until ticket #99 is fixed, use integers to avoid warnings + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + */ + __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + (__pyx_v_f[0]) = 66; + goto __pyx_L13; + } + + /* "numpy.pxd":828 + * if t == NPY_BYTE: f[0] = 98 #"b" + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + */ + __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { + (__pyx_v_f[0]) = 104; + goto __pyx_L13; + } + + /* "numpy.pxd":829 + * elif t == NPY_UBYTE: f[0] = 66 #"B" + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" + */ + __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { + (__pyx_v_f[0]) = 72; + goto __pyx_L13; + } + + /* "numpy.pxd":830 + * elif t == NPY_SHORT: f[0] = 104 #"h" + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< + * elif t == NPY_UINT: f[0] = 73 #"I" + * elif t == NPY_LONG: f[0] = 108 #"l" + */ + __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { + (__pyx_v_f[0]) = 105; + goto __pyx_L13; + } + + /* "numpy.pxd":831 + * elif t == NPY_USHORT: f[0] = 72 #"H" + * elif t == NPY_INT: f[0] = 105 #"i" + * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 73; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":268 + /* "numpy.pxd":832 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 108; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":269 + /* "numpy.pxd":833 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 76; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":270 + /* "numpy.pxd":834 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 113; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":271 + /* "numpy.pxd":835 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 81; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":272 + /* "numpy.pxd":836 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 102; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":273 + /* "numpy.pxd":837 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 - */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + */ + __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 100; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":274 + /* "numpy.pxd":838 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 - */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + */ + __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 103; - goto __pyx_L7; + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":275 + /* "numpy.pxd":839 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # <<<<<<<<<<<<<< - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 - */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg + */ + __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; - __pyx_v_f += 1; - goto __pyx_L7; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":276 + /* "numpy.pxd":840 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # <<<<<<<<<<<<<< - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; - __pyx_v_f += 1; - goto __pyx_L7; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":277 - * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # <<<<<<<<<<<<<< + /* "numpy.pxd":841 + * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; - __pyx_v_f += 1; - goto __pyx_L7; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L13; } - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":278 - * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 - * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 + /* "numpy.pxd":842 + * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd + * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) - */ - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - if (__pyx_t_4) { - /* __pyx_t_4 released */ + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + */ + __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_7) { (__pyx_v_f[0]) = 79; - goto __pyx_L7; + goto __pyx_L13; } /*else*/ { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":280 + /* "numpy.pxd":844 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_22, __pyx_v_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_5 allocated */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); - __pyx_t_2 = 0; - /* __pyx_t_2 released */ - /* __pyx_t_2 allocated */ - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* __pyx_t_5 released */ - __Pyx_Raise(__pyx_t_2, 0, 0); - Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* __pyx_t_2 released */ - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_73), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L7:; + __pyx_L13:; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":281 + /* "numpy.pxd":845 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: - * f[0] = 84 #"T" + * # Cython ignores struct boundary information ("T{...}"), */ - __pyx_v_f += 1; - goto __pyx_L5; + __pyx_v_f = (__pyx_v_f + 1); + goto __pyx_L11; } /*else*/ { - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":283 - * f += 1 - * else: - * f[0] = 84 #"T" # <<<<<<<<<<<<<< - * f[1] = 123 #"{" - * f += 2 - */ - (__pyx_v_f[0]) = 84; - - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":284 - * else: - * f[0] = 84 #"T" - * f[1] = 123 #"{" # <<<<<<<<<<<<<< - * f += 2 - * f = _util_dtypestring(child, f, end) - */ - (__pyx_v_f[1]) = 123; - - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":285 - * f[0] = 84 #"T" - * f[1] = 123 #"{" - * f += 2 # <<<<<<<<<<<<<< - * f = _util_dtypestring(child, f, end) - * f[0] = 125 #"}" - */ - __pyx_v_f += 2; - - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":286 - * f[1] = 123 #"{" - * f += 2 - * f = _util_dtypestring(child, f, end) # <<<<<<<<<<<<<< - * f[0] = 125 #"}" - * f += 1 - */ - /* __pyx_t_6 allocated */ - __pyx_t_6 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_6; - /* __pyx_t_6 released */ - - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":287 - * f += 2 - * f = _util_dtypestring(child, f, end) - * f[0] = 125 #"}" # <<<<<<<<<<<<<< - * f += 1 - * return f - */ - (__pyx_v_f[0]) = 125; - - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":288 - * f = _util_dtypestring(child, f, end) - * f[0] = 125 #"}" - * f += 1 # <<<<<<<<<<<<<< + /* "numpy.pxd":849 + * # Cython ignores struct boundary information ("T{...}"), + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ - __pyx_v_f += 1; + __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_12; } - __pyx_L5:; + __pyx_L11:; } - /* __pyx_t_1 released */ - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":289 - * f[0] = 125 #"}" - * f += 1 + /* "numpy.pxd":850 + * # so don't output it + * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * + * */ __pyx_r = __pyx_v_f; goto __pyx_L0; @@ -8793,26 +10415,164 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_t_2); - Py_XDECREF(__pyx_t_3); - Py_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("numpy._util_dtypestring"); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - Py_DECREF(__pyx_v_child); - Py_DECREF(__pyx_v_i); - Py_DECREF(__pyx_v_t); + __Pyx_XDECREF((PyObject *)__pyx_v_child); + __Pyx_XDECREF(__pyx_v_fields); + __Pyx_XDECREF(__pyx_v_childname); + __Pyx_XDECREF(__pyx_v_new_offset); + __Pyx_XDECREF(__pyx_v_t); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "numpy.pxd":965 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + PyObject *__pyx_v_baseptr; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "numpy.pxd":967 + * cdef inline void set_array_base(ndarray arr, object base): + * cdef PyObject* baseptr + * if base is None: # <<<<<<<<<<<<<< + * baseptr = NULL + * else: + */ + __pyx_t_1 = (__pyx_v_base == Py_None); + if (__pyx_t_1) { + + /* "numpy.pxd":968 + * cdef PyObject* baseptr + * if base is None: + * baseptr = NULL # <<<<<<<<<<<<<< + * else: + * Py_INCREF(base) # important to do this before decref below! + */ + __pyx_v_baseptr = NULL; + goto __pyx_L3; + } + /*else*/ { + + /* "numpy.pxd":970 + * baseptr = NULL + * else: + * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< + * baseptr = base + * Py_XDECREF(arr.base) + */ + Py_INCREF(__pyx_v_base); + + /* "numpy.pxd":971 + * else: + * Py_INCREF(base) # important to do this before decref below! + * baseptr = base # <<<<<<<<<<<<<< + * Py_XDECREF(arr.base) + * arr.base = baseptr + */ + __pyx_v_baseptr = ((PyObject *)__pyx_v_base); + } + __pyx_L3:; + + /* "numpy.pxd":972 + * Py_INCREF(base) # important to do this before decref below! + * baseptr = base + * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< + * arr.base = baseptr + * + */ + Py_XDECREF(__pyx_v_arr->base); + + /* "numpy.pxd":973 + * baseptr = base + * Py_XDECREF(arr.base) + * arr.base = baseptr # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + __pyx_v_arr->base = __pyx_v_baseptr; + + __Pyx_RefNannyFinishContext(); +} + +/* "numpy.pxd":975 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "numpy.pxd":976 + * + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_1 = (__pyx_v_arr->base == NULL); + if (__pyx_t_1) { + + /* "numpy.pxd":977 + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: + * return None # <<<<<<<<<<<<<< + * else: + * return arr.base + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + goto __pyx_L3; + } + /*else*/ { + + /* "numpy.pxd":979 + * return None + * else: + * return arr.base # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); + __pyx_r = ((PyObject *)__pyx_v_arr->base); + goto __pyx_L0; + } + __pyx_L3:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -static struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Format __pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format; +static struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Format __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Format; -static PyObject *__pyx_tp_new_7scikits_8audiolab_9pysndfile_8_sndfile_Format(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *p; +static PyObject *__pyx_tp_new_8audiolab_9pysndfile_8_sndfile_Format(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; - p = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)o); - p->__pyx_vtab = __pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Format; + p = ((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)o); + p->__pyx_vtab = __pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Format; p->_type = Py_None; Py_INCREF(Py_None); p->_encoding = Py_None; Py_INCREF(Py_None); p->_endianness = Py_None; Py_INCREF(Py_None); @@ -8822,20 +10582,22 @@ static PyObject *__pyx_tp_new_7scikits_8audiolab_9pysndfile_8_sndfile_Format(PyT return o; } -static void __pyx_tp_dealloc_7scikits_8audiolab_9pysndfile_8_sndfile_Format(PyObject *o) { - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *p = (struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)o; - Py_XDECREF(p->_type); - Py_XDECREF(p->_encoding); - Py_XDECREF(p->_endianness); - Py_XDECREF(p->_format_str); - Py_XDECREF(p->_encoding_str); - Py_XDECREF(p->_endian_str); +static void __pyx_tp_dealloc_8audiolab_9pysndfile_8_sndfile_Format(PyObject *o) { + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *p = (struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_type); + Py_CLEAR(p->_encoding); + Py_CLEAR(p->_endianness); + Py_CLEAR(p->_format_str); + Py_CLEAR(p->_encoding_str); + Py_CLEAR(p->_endian_str); + PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_7scikits_8audiolab_9pysndfile_8_sndfile_Format(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_8audiolab_9pysndfile_8_sndfile_Format(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *p = (struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)o; + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *p = (struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)o; if (p->_type) { e = (*v)(p->_type, a); if (e) return e; } @@ -8857,8 +10619,8 @@ static int __pyx_tp_traverse_7scikits_8audiolab_9pysndfile_8_sndfile_Format(PyOb return 0; } -static int __pyx_tp_clear_7scikits_8audiolab_9pysndfile_8_sndfile_Format(PyObject *o) { - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *p = (struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)o; +static int __pyx_tp_clear_8audiolab_9pysndfile_8_sndfile_Format(PyObject *o) { + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *p = (struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)o; PyObject* tmp; tmp = ((PyObject*)p->_type); p->_type = Py_None; Py_INCREF(Py_None); @@ -8881,40 +10643,38 @@ static int __pyx_tp_clear_7scikits_8audiolab_9pysndfile_8_sndfile_Format(PyObjec return 0; } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_11file_format___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_file_format(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_11file_format_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_8encoding___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_encoding(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_8encoding_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_endianness(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_10endianness___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_endianness(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_10endianness_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format_description(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_file_format_description(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_23file_format_description_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding_description(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_encoding_description(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_20encoding_description_1__get__(o); } -static struct PyMethodDef __pyx_methods_7scikits_8audiolab_9pysndfile_8_sndfile_Format[] = { - {"__copy__", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___copy__, METH_NOARGS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___copy__}, - {"__deepcopy__", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___deepcopy__, METH_NOARGS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___deepcopy__}, - {"__str__", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___str__, METH_NOARGS|METH_COEXIST, 0}, - {"__repr__", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___repr__, METH_NOARGS|METH_COEXIST, 0}, +static PyMethodDef __pyx_methods_8audiolab_9pysndfile_8_sndfile_Format[] = { + {__Pyx_NAMESTR("__copy__"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_3__copy__, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_6Format_2__copy__)}, + {__Pyx_NAMESTR("__deepcopy__"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_5__deepcopy__, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_6Format_4__deepcopy__)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_7scikits_8audiolab_9pysndfile_8_sndfile_Format[] = { - {(char *)"file_format", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format, 0, __pyx_k_23, 0}, - {(char *)"encoding", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding, 0, __pyx_k_24, 0}, - {(char *)"endianness", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_endianness, 0, __pyx_k_25, 0}, - {(char *)"file_format_description", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format_description, 0, __pyx_k_26, 0}, - {(char *)"encoding_description", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding_description, 0, __pyx_k_27, 0}, +static struct PyGetSetDef __pyx_getsets_8audiolab_9pysndfile_8_sndfile_Format[] = { + {(char *)"file_format", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_file_format, 0, __Pyx_DOCSTR(__pyx_k_79), 0}, + {(char *)"encoding", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_encoding, 0, __Pyx_DOCSTR(__pyx_k_80), 0}, + {(char *)"endianness", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_endianness, 0, __Pyx_DOCSTR(__pyx_k_81), 0}, + {(char *)"file_format_description", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_file_format_description, 0, __Pyx_DOCSTR(__pyx_k_82), 0}, + {(char *)"encoding_description", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_6Format_encoding_description, 0, __Pyx_DOCSTR(__pyx_k_83), 0}, {0, 0, 0, 0, 0} }; @@ -8942,7 +10702,11 @@ static PyNumberMethods __pyx_tp_as_number_Format = { 0, /*nb_coerce*/ #endif 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ @@ -8967,7 +10731,7 @@ static PyNumberMethods __pyx_tp_as_number_Format = { 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ - #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX) + #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; @@ -9012,45 +10776,49 @@ static PyBufferProcs __pyx_tp_as_buffer_Format = { #endif }; -PyTypeObject __pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Format = { +static PyTypeObject __pyx_type_8audiolab_9pysndfile_8_sndfile_Format = { PyVarObject_HEAD_INIT(0, 0) - "scikits.audiolab.pysndfile._sndfile.Format", /*tp_name*/ - sizeof(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format), /*tp_basicsize*/ + __Pyx_NAMESTR("audiolab.pysndfile._sndfile.Format"), /*tp_name*/ + sizeof(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7scikits_8audiolab_9pysndfile_8_sndfile_Format, /*tp_dealloc*/ + __pyx_tp_dealloc_8audiolab_9pysndfile_8_sndfile_Format, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ - __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___repr__, /*tp_repr*/ + #else + 0, /*reserved*/ + #endif + __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_11__repr__, /*tp_repr*/ &__pyx_tp_as_number_Format, /*tp_as_number*/ &__pyx_tp_as_sequence_Format, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Format, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___str__, /*tp_str*/ + __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_9__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Format, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - "Format(type=wav, encoding=pcm16, endianness=file)\n This class represents an audio file format. It knows about audio file\n format (wav, aiff, etc...), encoding (pcm, etc...) and endianness.\n\n Parameters\n ----------\n type : str\n the major file format (wav, etc...).\n encoding : str\n the encoding (pcm16, etc..).\n endianness : str\n the endianess.\n\n Notes\n -----\n The possible values for type, and encoding depend on your installed\n libsndfile. You can query the possible values with the functions\n available_file_formats and available_encodings.\n\n See also\n --------\n Sndfile class.\n ", /*tp_doc*/ - __pyx_tp_traverse_7scikits_8audiolab_9pysndfile_8_sndfile_Format, /*tp_traverse*/ - __pyx_tp_clear_7scikits_8audiolab_9pysndfile_8_sndfile_Format, /*tp_clear*/ - __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___richcmp__, /*tp_richcompare*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("Format(type='wav', encoding='pcm16', endianness='file')\n This class represents an audio file format. It knows about audio file\n format (wav, aiff, etc...), encoding (pcm, etc...) and endianness.\n\n Parameters\n ----------\n type : str\n the major file format (wav, etc...).\n encoding : str\n the encoding (pcm16, etc..).\n endianness : str\n the endianess.\n\n Notes\n -----\n The possible values for type, and encoding depend on your installed\n libsndfile. You can query the possible values with the functions\n available_file_formats and available_encodings.\n\n See also\n --------\n Sndfile class.\n "), /*tp_doc*/ + __pyx_tp_traverse_8audiolab_9pysndfile_8_sndfile_Format, /*tp_traverse*/ + __pyx_tp_clear_8audiolab_9pysndfile_8_sndfile_Format, /*tp_clear*/ + __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_7__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_7scikits_8audiolab_9pysndfile_8_sndfile_Format, /*tp_methods*/ + __pyx_methods_8audiolab_9pysndfile_8_sndfile_Format, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_7scikits_8audiolab_9pysndfile_8_sndfile_Format, /*tp_getset*/ + __pyx_getsets_8audiolab_9pysndfile_8_sndfile_Format, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_6Format___init__, /*tp_init*/ + __pyx_pw_8audiolab_9pysndfile_8_sndfile_6Format_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_7scikits_8audiolab_9pysndfile_8_sndfile_Format, /*tp_new*/ + __pyx_tp_new_8audiolab_9pysndfile_8_sndfile_Format, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9058,39 +10826,45 @@ PyTypeObject __pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Format = { 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ + 0, /*tp_del*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ + #endif }; -static struct __pyx_vtabstruct_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile __pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile; +static struct __pyx_vtabstruct_8audiolab_9pysndfile_8_sndfile_Sndfile __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile; -static PyObject *__pyx_tp_new_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *p; +static PyObject *__pyx_tp_new_8audiolab_9pysndfile_8_sndfile_Sndfile(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *p; PyObject *o = (*t->tp_alloc)(t, 0); if (!o) return 0; - p = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)o); - p->__pyx_vtab = __pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile; + p = ((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)o); + p->__pyx_vtab = __pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Sndfile; p->filename = Py_None; Py_INCREF(Py_None); - p->_format = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)Py_None); Py_INCREF(Py_None); + p->_format = ((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile(PyObject *o) { - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *p = (struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)o; +static void __pyx_tp_dealloc_8audiolab_9pysndfile_8_sndfile_Sndfile(PyObject *o) { + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *p = (struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)o; + PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___dealloc__(o); + __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_3__dealloc__(o); if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } - Py_XDECREF(p->filename); - Py_XDECREF(((PyObject *)p->_format)); + Py_CLEAR(p->filename); + Py_CLEAR(p->_format); + PyObject_GC_Track(o); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_8audiolab_9pysndfile_8_sndfile_Sndfile(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *p = (struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)o; + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *p = (struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)o; if (p->filename) { e = (*v)(p->filename, a); if (e) return e; } @@ -9100,64 +10874,63 @@ static int __pyx_tp_traverse_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile(PyO return 0; } -static int __pyx_tp_clear_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile(PyObject *o) { - struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *p = (struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile *)o; +static int __pyx_tp_clear_8audiolab_9pysndfile_8_sndfile_Sndfile(PyObject *o) { + struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *p = (struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *)o; PyObject* tmp; tmp = ((PyObject*)p->filename); p->filename = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_format); - p->_format = ((struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Format *)Py_None); Py_INCREF(Py_None); + p->_format = ((struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_nframes(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_nframes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_7nframes_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_samplerate(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_samplerate(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_10samplerate_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_channels(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_channels(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_8channels_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_format(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_format(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_6format_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_file_format(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_file_format(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_11file_format_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_encoding(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_encoding(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_8encoding_1__get__(o); } -static PyObject *__pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_endianness(PyObject *o, void *x) { - return __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness___get__(o); +static PyObject *__pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_endianness(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_10endianness_1__get__(o); } -static struct PyMethodDef __pyx_methods_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile[] = { - {"close", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_close, METH_NOARGS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_close}, - {"sync", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_sync, METH_NOARGS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_sync}, - {"__str__", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___str__, METH_NOARGS|METH_COEXIST, 0}, - {"read_frames", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames}, - {"write_frames", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames, METH_O, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames}, - {"seek", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_seek}, +static PyMethodDef __pyx_methods_8audiolab_9pysndfile_8_sndfile_Sndfile[] = { + {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_5close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_4close)}, + {__Pyx_NAMESTR("sync"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_7sync, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_6sync)}, + {__Pyx_NAMESTR("read_frames"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_11read_frames, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_10read_frames)}, + {__Pyx_NAMESTR("write_frames"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_13write_frames, METH_O, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_12write_frames)}, + {__Pyx_NAMESTR("seek"), (PyCFunction)__pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_15seek, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8audiolab_9pysndfile_8_sndfile_7Sndfile_14seek)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile[] = { - {(char *)"nframes", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_nframes, 0, __pyx_k_28, 0}, - {(char *)"samplerate", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_samplerate, 0, __pyx_k_29, 0}, - {(char *)"channels", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_channels, 0, __pyx_k_30, 0}, - {(char *)"format", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_format, 0, __pyx_k_31, 0}, - {(char *)"file_format", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_file_format, 0, 0, 0}, - {(char *)"encoding", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_encoding, 0, 0, 0}, - {(char *)"endianness", __pyx_getprop_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_endianness, 0, 0, 0}, +static struct PyGetSetDef __pyx_getsets_8audiolab_9pysndfile_8_sndfile_Sndfile[] = { + {(char *)"nframes", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_nframes, 0, __Pyx_DOCSTR(__pyx_k_84), 0}, + {(char *)"samplerate", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_samplerate, 0, __Pyx_DOCSTR(__pyx_k_85), 0}, + {(char *)"channels", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_channels, 0, __Pyx_DOCSTR(__pyx_k_86), 0}, + {(char *)"format", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_format, 0, __Pyx_DOCSTR(__pyx_k_87), 0}, + {(char *)"file_format", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_file_format, 0, 0, 0}, + {(char *)"encoding", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_encoding, 0, 0, 0}, + {(char *)"endianness", __pyx_getprop_8audiolab_9pysndfile_8_sndfile_7Sndfile_endianness, 0, 0, 0}, {0, 0, 0, 0, 0} }; @@ -9185,7 +10958,11 @@ static PyNumberMethods __pyx_tp_as_number_Sndfile = { 0, /*nb_coerce*/ #endif 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 0, /*nb_oct*/ @@ -9210,7 +10987,7 @@ static PyNumberMethods __pyx_tp_as_number_Sndfile = { 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ - #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX) + #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ #endif }; @@ -9255,45 +11032,49 @@ static PyBufferProcs __pyx_tp_as_buffer_Sndfile = { #endif }; -PyTypeObject __pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile = { +static PyTypeObject __pyx_type_8audiolab_9pysndfile_8_sndfile_Sndfile = { PyVarObject_HEAD_INIT(0, 0) - "scikits.audiolab.pysndfile._sndfile.Sndfile", /*tp_name*/ - sizeof(struct __pyx_obj_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile), /*tp_basicsize*/ + __Pyx_NAMESTR("audiolab.pysndfile._sndfile.Sndfile"), /*tp_name*/ + sizeof(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_dealloc*/ + __pyx_tp_dealloc_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Sndfile, /*tp_as_number*/ &__pyx_tp_as_sequence_Sndfile, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Sndfile, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___str__, /*tp_str*/ + __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_9__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Sndfile, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - "Sndfile(filename, mode=r, Format format=None, int channels=0, int samplerate=0)\n Sndfile is the core class to read/write audio files. Once an instance is\n created, it can be used to read and/or writes data from numpy arrays, query\n the audio file meta-data, etc...\n\n Parameters\n ----------\n filename : string or int\n name of the file to open (string), or file descriptor (integer)\n mode : string\n 'r' for read, 'w' for write, or 'rw' for read and\n write.\n format : Format\n Required when opening a new file for writing, or to read raw audio\n files (without header).\n channels : int\n number of channels.\n samplerate : int\n sampling rate.\n\n Returns\n -------\n sndfile: as Sndfile instance.\n\n Notes\n -----\n format, channels and samplerate need to be given only in the write modes\n and for raw files.", /*tp_doc*/ - __pyx_tp_traverse_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_traverse*/ - __pyx_tp_clear_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_clear*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + __Pyx_DOCSTR("Sndfile(filename, mode='r', Format format=None, int channels=0, int samplerate=0)\n Sndfile is the core class to read/write audio files. Once an instance is\n created, it can be used to read and/or write data from numpy arrays, query\n the audio file meta-data, etc...\n\n Parameters\n ----------\n filename : string or int\n name of the file to open (string), or file descriptor (integer)\n mode : string\n 'r' for read, 'w' for write, or 'rw' for read and\n write.\n format : Format\n Required when opening a new file for writing, or to read raw audio\n files (without header).\n channels : int\n number of channels.\n samplerate : int\n sampling rate.\n\n Returns\n -------\n sndfile : Sndfile\n a Sndfile instance.\n\n Notes\n -----\n format, channels and samplerate need to be given only in the write modes\n and for raw files."), /*tp_doc*/ + __pyx_tp_traverse_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_traverse*/ + __pyx_tp_clear_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_methods*/ + __pyx_methods_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_getset*/ + __pyx_getsets_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile___init__, /*tp_init*/ + __pyx_pw_8audiolab_9pysndfile_8_sndfile_7Sndfile_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_new*/ + __pyx_tp_new_8audiolab_9pysndfile_8_sndfile_Sndfile, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -9301,21 +11082,20 @@ PyTypeObject __pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile = { 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ + 0, /*tp_del*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ + #endif }; -static struct PyMethodDef __pyx_methods[] = { - {"sndfile_version", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_version, METH_NOARGS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_version}, - {"available_file_formats", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_file_formats, METH_NOARGS, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_available_file_formats}, - {"available_encodings", (PyCFunction)__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_available_encodings, METH_O, __pyx_doc_7scikits_8audiolab_9pysndfile_8_sndfile_available_encodings}, +static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; -static void __pyx_init_filenames(void); /*proto*/ - #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, - "_sndfile", + __Pyx_NAMESTR("_sndfile"), 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, @@ -9327,237 +11107,568 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp___init__, __pyx_k___init__, sizeof(__pyx_k___init__), 1, 1, 1}, - {&__pyx_kp___copy__, __pyx_k___copy__, sizeof(__pyx_k___copy__), 1, 1, 1}, - {&__pyx_kp___deepcopy__, __pyx_k___deepcopy__, sizeof(__pyx_k___deepcopy__), 1, 1, 1}, - {&__pyx_kp___richcmp__, __pyx_k___richcmp__, sizeof(__pyx_k___richcmp__), 1, 1, 1}, - {&__pyx_kp___str__, __pyx_k___str__, sizeof(__pyx_k___str__), 1, 1, 1}, - {&__pyx_kp___repr__, __pyx_k___repr__, sizeof(__pyx_k___repr__), 1, 1, 1}, - {&__pyx_kp___dealloc__, __pyx_k___dealloc__, sizeof(__pyx_k___dealloc__), 1, 1, 1}, - {&__pyx_kp_close, __pyx_k_close, sizeof(__pyx_k_close), 1, 1, 1}, - {&__pyx_kp_sync, __pyx_k_sync, sizeof(__pyx_k_sync), 1, 1, 1}, - {&__pyx_kp_read_frames, __pyx_k_read_frames, sizeof(__pyx_k_read_frames), 1, 1, 1}, - {&__pyx_kp_write_frames, __pyx_k_write_frames, sizeof(__pyx_k_write_frames), 1, 1, 1}, - {&__pyx_kp_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 1, 1, 1}, - {&__pyx_kp_type, __pyx_k_type, sizeof(__pyx_k_type), 1, 1, 1}, - {&__pyx_kp_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 1, 1, 1}, - {&__pyx_kp_endianness, __pyx_k_endianness, sizeof(__pyx_k_endianness), 1, 1, 1}, - {&__pyx_kp_self, __pyx_k_self, sizeof(__pyx_k_self), 1, 1, 1}, - {&__pyx_kp_other, __pyx_k_other, sizeof(__pyx_k_other), 1, 1, 1}, - {&__pyx_kp_op, __pyx_k_op, sizeof(__pyx_k_op), 1, 1, 1}, - {&__pyx_kp_major, __pyx_k_major, sizeof(__pyx_k_major), 1, 1, 1}, - {&__pyx_kp_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 1, 1, 1}, - {&__pyx_kp_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 1, 1, 1}, - {&__pyx_kp_format, __pyx_k_format, sizeof(__pyx_k_format), 1, 1, 1}, - {&__pyx_kp_channels, __pyx_k_channels, sizeof(__pyx_k_channels), 1, 1, 1}, - {&__pyx_kp_samplerate, __pyx_k_samplerate, sizeof(__pyx_k_samplerate), 1, 1, 1}, - {&__pyx_kp_nframes, __pyx_k_nframes, sizeof(__pyx_k_nframes), 1, 1, 1}, - {&__pyx_kp_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 1, 1, 1}, - {&__pyx_kp_input, __pyx_k_input, sizeof(__pyx_k_input), 1, 1, 1}, - {&__pyx_kp_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 1, 1, 1}, - {&__pyx_kp_whence, __pyx_k_whence, sizeof(__pyx_k_whence), 1, 1, 1}, - {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1}, - {&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1}, - {&__pyx_kp_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 1, 1, 1}, - {&__pyx_kp_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 1, 1, 1}, - {&__pyx_kp_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 1, 0}, - {&__pyx_kp_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 1, 0}, - {&__pyx_kp_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 1, 0}, - {&__pyx_kp_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 1, 0}, - {&__pyx_kp_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 1, 0}, - {&__pyx_kp_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 1, 0}, - {&__pyx_kp_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 1, 0}, - {&__pyx_kp_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 1, 0}, - {&__pyx_kp_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 1, 0}, - {&__pyx_kp_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 1, 0}, - {&__pyx_kp_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 1, 0}, - {&__pyx_kp_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 1, 0}, - {&__pyx_kp_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 1, 0}, - {&__pyx_kp_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 1, 0}, - {&__pyx_kp_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 1, 0}, - {&__pyx_kp_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 1, 0}, - {&__pyx_kp_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 1, 0}, - {&__pyx_kp_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 1, 0}, - {&__pyx_kp_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 1, 0}, - {&__pyx_kp_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 1, 0}, - {&__pyx_kp_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 1, 0}, - {&__pyx_kp_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 1, 0}, - {&__pyx_kp__SNDFILE_ENCODING, __pyx_k__SNDFILE_ENCODING, sizeof(__pyx_k__SNDFILE_ENCODING), 1, 1, 1}, - {&__pyx_kp_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 1, 0}, - {&__pyx_kp_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 1, 0}, - {&__pyx_kp_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 1, 0}, - {&__pyx_kp_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 1, 0}, - {&__pyx_kp_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 1, 0}, - {&__pyx_kp_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 1, 0}, - {&__pyx_kp_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 1, 0}, - {&__pyx_kp_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 1, 0}, - {&__pyx_kp_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 1, 0}, - {&__pyx_kp_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 1, 0}, - {&__pyx_kp_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 1, 0}, - {&__pyx_kp_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 1, 0}, - {&__pyx_kp_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 1, 0}, - {&__pyx_kp_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 1, 0}, - {&__pyx_kp_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 1, 0}, - {&__pyx_kp_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 1, 0}, - {&__pyx_kp_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 1, 0}, - {&__pyx_kp_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 1, 0}, - {&__pyx_kp_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 1, 0}, - {&__pyx_kp_73, __pyx_k_73, sizeof(__pyx_k_73), 1, 1, 1}, - {&__pyx_kp_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 1, 0}, - {&__pyx_kp_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 1, 0}, - {&__pyx_kp_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 1, 0}, - {&__pyx_kp_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 1, 0}, - {&__pyx_kp_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 1, 0}, - {&__pyx_kp_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 1, 0}, - {&__pyx_kp_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 1, 0}, - {&__pyx_kp_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 1, 0}, - {&__pyx_kp_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 1, 0}, - {&__pyx_kp_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 1, 0}, - {&__pyx_kp_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 1, 0}, - {&__pyx_kp__SNDFILE_ENDIAN, __pyx_k__SNDFILE_ENDIAN, sizeof(__pyx_k__SNDFILE_ENDIAN), 1, 1, 1}, - {&__pyx_kp_85, __pyx_k_85, sizeof(__pyx_k_85), 1, 1, 1}, - {&__pyx_kp_j, __pyx_k_j, sizeof(__pyx_k_j), 1, 1, 1}, - {&__pyx_kp_i, __pyx_k_i, sizeof(__pyx_k_i), 1, 1, 1}, - {&__pyx_kp_items, __pyx_k_items, sizeof(__pyx_k_items), 1, 1, 1}, - {&__pyx_kp_86, __pyx_k_86, sizeof(__pyx_k_86), 1, 1, 1}, - {&__pyx_kp__ENUM_TO_STR_ENDIAN, __pyx_k__ENUM_TO_STR_ENDIAN, sizeof(__pyx_k__ENUM_TO_STR_ENDIAN), 1, 1, 1}, - {&__pyx_kp_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 1, 0}, - {&__pyx_kp_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 1, 0}, - {&__pyx_kp_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 1, 0}, - {&__pyx_kp_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 1, 0}, - {&__pyx_kp_91, __pyx_k_91, sizeof(__pyx_k_91), 1, 1, 1}, - {&__pyx_kp_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 1, 0}, - {&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1}, - {&__pyx_kp_split, __pyx_k_split, sizeof(__pyx_k_split), 1, 1, 1}, - {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1}, - {&__pyx_kp_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 1, 0}, - {&__pyx_kp_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 1, 1, 1}, - {&__pyx_kp___class__, __pyx_k___class__, sizeof(__pyx_k___class__), 1, 1, 1}, - {&__pyx_kp_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 1, 1, 1}, - {&__pyx_kp_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 1, 1, 1}, - {&__pyx_kp_join, __pyx_k_join, sizeof(__pyx_k_join), 1, 1, 1}, - {&__pyx_kp_has_key, __pyx_k_has_key, sizeof(__pyx_k_has_key), 1, 1, 1}, - {&__pyx_kp_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 1, 1, 1}, - {&__pyx_kp_append, __pyx_k_append, sizeof(__pyx_k_append), 1, 1, 1}, - {&__pyx_kp_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 1, 0}, - {&__pyx_kp_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 1, 0}, - {&__pyx_kp_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 1, 0}, - {&__pyx_kp_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 1, 0}, - {&__pyx_kp_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 1, 1, 1}, - {&__pyx_kp_129, __pyx_k_129, sizeof(__pyx_k_129), 0, 1, 0}, - {&__pyx_kp_file_format, __pyx_k_file_format, sizeof(__pyx_k_file_format), 1, 1, 1}, - {&__pyx_kp_144, __pyx_k_144, sizeof(__pyx_k_144), 1, 1, 1}, - {&__pyx_kp_145, __pyx_k_145, sizeof(__pyx_k_145), 1, 1, 1}, - {&__pyx_kp_146, __pyx_k_146, sizeof(__pyx_k_146), 1, 1, 1}, - {&__pyx_kp_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 1, 1, 1}, - {&__pyx_kp_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 1, 1, 1}, - {&__pyx_kp_order, __pyx_k_order, sizeof(__pyx_k_order), 1, 1, 1}, - {&__pyx_kp_148, __pyx_k_148, sizeof(__pyx_k_148), 0, 1, 0}, - {&__pyx_kp_150, __pyx_k_150, sizeof(__pyx_k_150), 0, 1, 0}, - {&__pyx_kp_int, __pyx_k_int, sizeof(__pyx_k_int), 1, 1, 1}, - {&__pyx_kp_152, __pyx_k_152, sizeof(__pyx_k_152), 0, 1, 0}, - {&__pyx_kp_short, __pyx_k_short, sizeof(__pyx_k_short), 1, 1, 1}, - {&__pyx_kp_154, __pyx_k_154, sizeof(__pyx_k_154), 0, 1, 0}, - {&__pyx_kp_size, __pyx_k_size, sizeof(__pyx_k_size), 1, 1, 1}, - {&__pyx_kp_require, __pyx_k_require, sizeof(__pyx_k_require), 1, 1, 1}, - {&__pyx_kp_requirements, __pyx_k_requirements, sizeof(__pyx_k_requirements), 1, 1, 1}, - {&__pyx_kp_158, __pyx_k_158, sizeof(__pyx_k_158), 0, 1, 0}, - {&__pyx_kp_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 1, 1, 1}, - {&__pyx_kp_161, __pyx_k_161, sizeof(__pyx_k_161), 0, 1, 0}, - {&__pyx_kp_162, __pyx_k_162, sizeof(__pyx_k_162), 0, 1, 0}, - {&__pyx_kp_163, __pyx_k_163, sizeof(__pyx_k_163), 0, 1, 0}, - {&__pyx_kp_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 0}, - {&__pyx_kp_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 0}, - {&__pyx_kp_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 0}, - {&__pyx_kp_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 0}, - {&__pyx_kp_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 0}, - {&__pyx_kp_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 0}, - {&__pyx_kp_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 0}, - {&__pyx_kp_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 0}, - {&__pyx_kp_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 0}, - {&__pyx_kp_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 0}, - {&__pyx_kp_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 0}, - {&__pyx_kp_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 0}, - {&__pyx_kp_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 0}, - {&__pyx_kp_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 0}, - {&__pyx_kp_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 0, 0}, - {&__pyx_kp_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 0}, - {&__pyx_kp_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 0}, - {&__pyx_kp_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 0}, - {&__pyx_kp_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 0}, - {&__pyx_kp_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 0}, - {&__pyx_kp_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 0}, - {&__pyx_kp_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 0}, - {&__pyx_kp_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 0}, - {&__pyx_kp_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 0}, - {&__pyx_kp_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 0}, - {&__pyx_kp_124, __pyx_k_124, sizeof(__pyx_k_124), 0, 0, 0}, - {&__pyx_kp_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 0, 0}, - {&__pyx_kp_126, __pyx_k_126, sizeof(__pyx_k_126), 0, 0, 0}, - {&__pyx_kp_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 0, 0}, - {&__pyx_kp_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 0, 0}, - {&__pyx_kp_130, __pyx_k_130, sizeof(__pyx_k_130), 0, 0, 0}, - {&__pyx_kp_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 0, 0}, - {&__pyx_kp_132, __pyx_k_132, sizeof(__pyx_k_132), 0, 0, 0}, - {&__pyx_kp_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 0}, - {&__pyx_kp_134, __pyx_k_134, sizeof(__pyx_k_134), 0, 0, 0}, - {&__pyx_kp_135, __pyx_k_135, sizeof(__pyx_k_135), 0, 0, 0}, - {&__pyx_kp_136, __pyx_k_136, sizeof(__pyx_k_136), 0, 0, 0}, - {&__pyx_kp_137, __pyx_k_137, sizeof(__pyx_k_137), 0, 0, 0}, - {&__pyx_kp_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 0}, - {&__pyx_kp_139, __pyx_k_139, sizeof(__pyx_k_139), 0, 0, 0}, - {&__pyx_kp_140, __pyx_k_140, sizeof(__pyx_k_140), 0, 0, 0}, - {&__pyx_kp_141, __pyx_k_141, sizeof(__pyx_k_141), 0, 0, 0}, - {&__pyx_kp_142, __pyx_k_142, sizeof(__pyx_k_142), 0, 0, 0}, - {&__pyx_kp_143, __pyx_k_143, sizeof(__pyx_k_143), 0, 0, 0}, - {&__pyx_kp_147, __pyx_k_147, sizeof(__pyx_k_147), 0, 0, 0}, - {&__pyx_kp_149, __pyx_k_149, sizeof(__pyx_k_149), 0, 0, 0}, - {&__pyx_kp_151, __pyx_k_151, sizeof(__pyx_k_151), 0, 0, 0}, - {&__pyx_kp_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 0}, - {&__pyx_kp_155, __pyx_k_155, sizeof(__pyx_k_155), 0, 0, 0}, - {&__pyx_kp_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 0}, - {&__pyx_kp_157, __pyx_k_157, sizeof(__pyx_k_157), 0, 0, 0}, - {&__pyx_kp_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 0}, - {&__pyx_kp_160, __pyx_k_160, sizeof(__pyx_k_160), 0, 0, 0}, - {&__pyx_kp_164, __pyx_k_164, sizeof(__pyx_k_164), 0, 0, 0}, - {&__pyx_kp_165, __pyx_k_165, sizeof(__pyx_k_165), 0, 0, 0}, - {&__pyx_kp_166, __pyx_k_166, sizeof(__pyx_k_166), 0, 0, 0}, - {&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1}, - {&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1}, - {&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1}, - {&__pyx_kp_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 1, 1, 1}, - {&__pyx_kp_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 1, 1, 1}, - {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0}, - {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0}, - {&__pyx_kp_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 0}, - {&__pyx_kp_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 0}, - {&__pyx_kp_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 0}, - {0, 0, 0, 0, 0, 0} + {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, + {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, + {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, + {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, + {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, + {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0}, + {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, + {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, + {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, + {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, + {&__pyx_n_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 1}, + {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, + {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, + {&__pyx_n_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 1}, + {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, + {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, + {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, + {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, + {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, + {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, + {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, + {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0}, + {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0}, + {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, + {&__pyx_kp_s_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 1, 0}, + {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, + {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0}, + {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0}, + {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, + {&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0}, + {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, + {&__pyx_kp_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 0}, + {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, + {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0}, + {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, + {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0}, + {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, + {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0}, + {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, + {&__pyx_kp_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 0}, + {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0}, + {&__pyx_kp_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 0}, + {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, + {&__pyx_kp_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0}, + {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0}, + {&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0}, + {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0}, + {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0}, + {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0}, + {&__pyx_kp_u_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 1, 0, 0}, + {&__pyx_kp_u_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 1, 0, 0}, + {&__pyx_kp_u_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 1, 0, 0}, + {&__pyx_kp_u_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 1, 0, 0}, + {&__pyx_kp_u_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 1, 0, 0}, + {&__pyx_kp_u_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 1, 0, 0}, + {&__pyx_n_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 1}, + {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, + {&__pyx_kp_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 0}, + {&__pyx_n_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 1}, + {&__pyx_n_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 1}, + {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1}, + {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1}, + {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 0, 0, 1, 1}, + {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, + {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, + {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, + {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, + {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, + {&__pyx_n_s___ENUM_TO_STR_ENDIAN, __pyx_k___ENUM_TO_STR_ENDIAN, sizeof(__pyx_k___ENUM_TO_STR_ENDIAN), 0, 0, 1, 1}, + {&__pyx_n_s___SNDFILE_ENCODING, __pyx_k___SNDFILE_ENCODING, sizeof(__pyx_k___SNDFILE_ENCODING), 0, 0, 1, 1}, + {&__pyx_n_s___SNDFILE_ENDIAN, __pyx_k___SNDFILE_ENDIAN, sizeof(__pyx_k___SNDFILE_ENDIAN), 0, 0, 1, 1}, + {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, + {&__pyx_n_s____copy__, __pyx_k____copy__, sizeof(__pyx_k____copy__), 0, 0, 1, 1}, + {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, + {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1}, + {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, + {&__pyx_n_s__aiff, __pyx_k__aiff, sizeof(__pyx_k__aiff), 0, 0, 1, 1}, + {&__pyx_n_s__alaw, __pyx_k__alaw, sizeof(__pyx_k__alaw), 0, 0, 1, 1}, + {&__pyx_n_s__au, __pyx_k__au, sizeof(__pyx_k__au), 0, 0, 1, 1}, + {&__pyx_n_s__available_encodings, __pyx_k__available_encodings, sizeof(__pyx_k__available_encodings), 0, 0, 1, 1}, + {&__pyx_n_s__avr, __pyx_k__avr, sizeof(__pyx_k__avr), 0, 0, 1, 1}, + {&__pyx_n_s__big, __pyx_k__big, sizeof(__pyx_k__big), 0, 0, 1, 1}, + {&__pyx_n_s__buff, __pyx_k__buff, sizeof(__pyx_k__buff), 0, 0, 1, 1}, + {&__pyx_n_s__caf, __pyx_k__caf, sizeof(__pyx_k__caf), 0, 0, 1, 1}, + {&__pyx_n_s__channels, __pyx_k__channels, sizeof(__pyx_k__channels), 0, 0, 1, 1}, + {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1}, + {&__pyx_n_s__cpu, __pyx_k__cpu, sizeof(__pyx_k__cpu), 0, 0, 1, 1}, + {&__pyx_n_s__dpcm16, __pyx_k__dpcm16, sizeof(__pyx_k__dpcm16), 0, 0, 1, 1}, + {&__pyx_n_s__dpcm8, __pyx_k__dpcm8, sizeof(__pyx_k__dpcm8), 0, 0, 1, 1}, + {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, + {&__pyx_n_s__dww12, __pyx_k__dww12, sizeof(__pyx_k__dww12), 0, 0, 1, 1}, + {&__pyx_n_s__dww16, __pyx_k__dww16, sizeof(__pyx_k__dww16), 0, 0, 1, 1}, + {&__pyx_n_s__dww24, __pyx_k__dww24, sizeof(__pyx_k__dww24), 0, 0, 1, 1}, + {&__pyx_n_s__dwwN, __pyx_k__dwwN, sizeof(__pyx_k__dwwN), 0, 0, 1, 1}, + {&__pyx_n_s__e, __pyx_k__e, sizeof(__pyx_k__e), 0, 0, 1, 1}, + {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, + {&__pyx_n_s__encoding, __pyx_k__encoding, sizeof(__pyx_k__encoding), 0, 0, 1, 1}, + {&__pyx_n_s__endianness, __pyx_k__endianness, sizeof(__pyx_k__endianness), 0, 0, 1, 1}, + {&__pyx_n_s__file, __pyx_k__file, sizeof(__pyx_k__file), 0, 0, 1, 1}, + {&__pyx_n_s__file_format, __pyx_k__file_format, sizeof(__pyx_k__file_format), 0, 0, 1, 1}, + {&__pyx_n_s__filename, __pyx_k__filename, sizeof(__pyx_k__filename), 0, 0, 1, 1}, + {&__pyx_n_s__flac, __pyx_k__flac, sizeof(__pyx_k__flac), 0, 0, 1, 1}, + {&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1}, + {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, + {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, + {&__pyx_n_s__g721_32, __pyx_k__g721_32, sizeof(__pyx_k__g721_32), 0, 0, 1, 1}, + {&__pyx_n_s__g723_24, __pyx_k__g723_24, sizeof(__pyx_k__g723_24), 0, 0, 1, 1}, + {&__pyx_n_s__g723_40, __pyx_k__g723_40, sizeof(__pyx_k__g723_40), 0, 0, 1, 1}, + {&__pyx_n_s__gsm610, __pyx_k__gsm610, sizeof(__pyx_k__gsm610), 0, 0, 1, 1}, + {&__pyx_n_s__has_key, __pyx_k__has_key, sizeof(__pyx_k__has_key), 0, 0, 1, 1}, + {&__pyx_n_s__htk, __pyx_k__htk, sizeof(__pyx_k__htk), 0, 0, 1, 1}, + {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, + {&__pyx_n_s__ima_adpcm, __pyx_k__ima_adpcm, sizeof(__pyx_k__ima_adpcm), 0, 0, 1, 1}, + {&__pyx_n_s__int, __pyx_k__int, sizeof(__pyx_k__int), 0, 0, 1, 1}, + {&__pyx_n_s__int16, __pyx_k__int16, sizeof(__pyx_k__int16), 0, 0, 1, 1}, + {&__pyx_n_s__int32, __pyx_k__int32, sizeof(__pyx_k__int32), 0, 0, 1, 1}, + {&__pyx_n_s__ircam, __pyx_k__ircam, sizeof(__pyx_k__ircam), 0, 0, 1, 1}, + {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1}, + {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1}, + {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, + {&__pyx_n_s__little, __pyx_k__little, sizeof(__pyx_k__little), 0, 0, 1, 1}, + {&__pyx_n_s__major, __pyx_k__major, sizeof(__pyx_k__major), 0, 0, 1, 1}, + {&__pyx_n_s__mat4, __pyx_k__mat4, sizeof(__pyx_k__mat4), 0, 0, 1, 1}, + {&__pyx_n_s__mat5, __pyx_k__mat5, sizeof(__pyx_k__mat5), 0, 0, 1, 1}, + {&__pyx_n_s__micro, __pyx_k__micro, sizeof(__pyx_k__micro), 0, 0, 1, 1}, + {&__pyx_n_s__minor, __pyx_k__minor, sizeof(__pyx_k__minor), 0, 0, 1, 1}, + {&__pyx_n_s__mode, __pyx_k__mode, sizeof(__pyx_k__mode), 0, 0, 1, 1}, + {&__pyx_n_s__mpc2k, __pyx_k__mpc2k, sizeof(__pyx_k__mpc2k), 0, 0, 1, 1}, + {&__pyx_n_s__ms_adpcm, __pyx_k__ms_adpcm, sizeof(__pyx_k__ms_adpcm), 0, 0, 1, 1}, + {&__pyx_n_s__nframes, __pyx_k__nframes, sizeof(__pyx_k__nframes), 0, 0, 1, 1}, + {&__pyx_n_s__nist, __pyx_k__nist, sizeof(__pyx_k__nist), 0, 0, 1, 1}, + {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, + {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, + {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1}, + {&__pyx_n_s__ogg, __pyx_k__ogg, sizeof(__pyx_k__ogg), 0, 0, 1, 1}, + {&__pyx_n_s__order, __pyx_k__order, sizeof(__pyx_k__order), 0, 0, 1, 1}, + {&__pyx_n_s__paf, __pyx_k__paf, sizeof(__pyx_k__paf), 0, 0, 1, 1}, + {&__pyx_n_s__pcm16, __pyx_k__pcm16, sizeof(__pyx_k__pcm16), 0, 0, 1, 1}, + {&__pyx_n_s__pcm24, __pyx_k__pcm24, sizeof(__pyx_k__pcm24), 0, 0, 1, 1}, + {&__pyx_n_s__pcm32, __pyx_k__pcm32, sizeof(__pyx_k__pcm32), 0, 0, 1, 1}, + {&__pyx_n_s__pcms8, __pyx_k__pcms8, sizeof(__pyx_k__pcms8), 0, 0, 1, 1}, + {&__pyx_n_s__pcmu8, __pyx_k__pcmu8, sizeof(__pyx_k__pcmu8), 0, 0, 1, 1}, + {&__pyx_n_s__pre, __pyx_k__pre, sizeof(__pyx_k__pre), 0, 0, 1, 1}, + {&__pyx_n_s__prerelease, __pyx_k__prerelease, sizeof(__pyx_k__prerelease), 0, 0, 1, 1}, + {&__pyx_n_s__pvf, __pyx_k__pvf, sizeof(__pyx_k__pvf), 0, 0, 1, 1}, + {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1}, + {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, + {&__pyx_n_s__raw, __pyx_k__raw, sizeof(__pyx_k__raw), 0, 0, 1, 1}, + {&__pyx_n_s__require, __pyx_k__require, sizeof(__pyx_k__require), 0, 0, 1, 1}, + {&__pyx_n_s__requirements, __pyx_k__requirements, sizeof(__pyx_k__requirements), 0, 0, 1, 1}, + {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1}, + {&__pyx_n_s__rf64, __pyx_k__rf64, sizeof(__pyx_k__rf64), 0, 0, 1, 1}, + {&__pyx_n_s__rw, __pyx_k__rw, sizeof(__pyx_k__rw), 0, 0, 1, 1}, + {&__pyx_n_s__samplerate, __pyx_k__samplerate, sizeof(__pyx_k__samplerate), 0, 0, 1, 1}, + {&__pyx_n_s__sd2, __pyx_k__sd2, sizeof(__pyx_k__sd2), 0, 0, 1, 1}, + {&__pyx_n_s__sds, __pyx_k__sds, sizeof(__pyx_k__sds), 0, 0, 1, 1}, + {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, + {&__pyx_n_s__short, __pyx_k__short, sizeof(__pyx_k__short), 0, 0, 1, 1}, + {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1}, + {&__pyx_n_s__sndfile_version, __pyx_k__sndfile_version, sizeof(__pyx_k__sndfile_version), 0, 0, 1, 1}, + {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1}, + {&__pyx_n_s__st, __pyx_k__st, sizeof(__pyx_k__st), 0, 0, 1, 1}, + {&__pyx_n_s__svx, __pyx_k__svx, sizeof(__pyx_k__svx), 0, 0, 1, 1}, + {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1}, + {&__pyx_n_s__ulaw, __pyx_k__ulaw, sizeof(__pyx_k__ulaw), 0, 0, 1, 1}, + {&__pyx_n_s__ver, __pyx_k__ver, sizeof(__pyx_k__ver), 0, 0, 1, 1}, + {&__pyx_n_s__version, __pyx_k__version, sizeof(__pyx_k__version), 0, 0, 1, 1}, + {&__pyx_n_s__voc, __pyx_k__voc, sizeof(__pyx_k__voc), 0, 0, 1, 1}, + {&__pyx_n_s__vorbis, __pyx_k__vorbis, sizeof(__pyx_k__vorbis), 0, 0, 1, 1}, + {&__pyx_n_s__vox_adpcm, __pyx_k__vox_adpcm, sizeof(__pyx_k__vox_adpcm), 0, 0, 1, 1}, + {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, + {&__pyx_n_s__warn, __pyx_k__warn, sizeof(__pyx_k__warn), 0, 0, 1, 1}, + {&__pyx_n_s__warnings, __pyx_k__warnings, sizeof(__pyx_k__warnings), 0, 0, 1, 1}, + {&__pyx_n_s__wav, __pyx_k__wav, sizeof(__pyx_k__wav), 0, 0, 1, 1}, + {&__pyx_n_s__wav64, __pyx_k__wav64, sizeof(__pyx_k__wav64), 0, 0, 1, 1}, + {&__pyx_n_s__wavex, __pyx_k__wavex, sizeof(__pyx_k__wavex), 0, 0, 1, 1}, + {&__pyx_n_s__whence, __pyx_k__whence, sizeof(__pyx_k__whence), 0, 0, 1, 1}, + {&__pyx_n_s__wve, __pyx_k__wve, sizeof(__pyx_k__wve), 0, 0, 1, 1}, + {&__pyx_n_s__xi, __pyx_k__xi, sizeof(__pyx_k__xi), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_kp_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_kp_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_kp_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_kp_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_kp_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + return 0; + __pyx_L1_error:; + return -1; +} + +static int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "audiolab/pysndfile/_sndfile.pyx":115 + * st = sf_command(NULL, SFC_GET_LIB_VERSION, buff, sizeof(buff)) + * if st < 1: + * raise RuntimeError("Error while getting version of libsndfile") # <<<<<<<<<<<<<< + * + * ver = PyString_FromStringAndSize(buff, strlen(buff)) + */ + __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_2); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_1)); + PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_kp_s_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); + + /* "audiolab/pysndfile/_sndfile.pyx":121 + * # Get major, minor and micro from version + * # Template: libsndfile-X.X.XpreX with preX being optional + * version = ver.split('-')[1] # <<<<<<<<<<<<<< + * prerelease = 0 + * major, minor, micro = [i for i in version.split('.')] + */ + __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_3)); + PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4)); + + /* "audiolab/pysndfile/_sndfile.pyx":123 + * version = ver.split('-')[1] + * prerelease = 0 + * major, minor, micro = [i for i in version.split('.')] # <<<<<<<<<<<<<< + * try: + * micro = int(micro) + */ + __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_6); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_5)); + PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); + + /* "audiolab/pysndfile/_sndfile.pyx":128 + * except ValueError,e: + * #print "micro is " + str(micro) + * micro, prerelease = micro.split('pre') # <<<<<<<<<<<<<< + * + * return int(major), int(minor), int(micro), prerelease + */ + __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_7); + __Pyx_INCREF(((PyObject *)__pyx_n_s__pre)); + PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_n_s__pre)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pre)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7)); + + /* "audiolab/pysndfile/_sndfile.pyx":351 + * st = sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &nsub, sizeof(int)) + * if st: + * raise RuntimeError("Error while calling sf_command") # <<<<<<<<<<<<<< + * + * subs = [] + */ + __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_25); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_24)); + PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_24)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); + + /* "audiolab/pysndfile/_sndfile.pyx":376 + * st = sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &nmajor, sizeof(int)) + * if st: + * raise RuntimeError("Error while calling sf_command") # <<<<<<<<<<<<<< + * + * majors = [] + */ + __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_26); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_24)); + PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_24)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26)); + + /* "audiolab/pysndfile/_sndfile.pyx":466 + * self._sfinfo.format = format.format_int() + * if sf_format_check(&self._sfinfo) == SF_FALSE: + * raise ValueError("Bad format specification: check arguments.") # <<<<<<<<<<<<<< + * + * # XXX: check how cython behave with this kind of code + */ + __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_31); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_30)); + PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_30)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_30)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31)); + + /* "audiolab/pysndfile/_sndfile.pyx":535 + * # In write/rwrite mode, the only reliable way to get the number of + * # frames is to use seek. + * raise NotImplementedError("Sorry, getting the current number of" # <<<<<<<<<<<<<< + * "frames in write modes is not supported yet") + * + */ + __pyx_k_tuple_38 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_38); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_37)); + PyTuple_SET_ITEM(__pyx_k_tuple_38, 0, ((PyObject *)__pyx_kp_s_37)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38)); + + /* "audiolab/pysndfile/_sndfile.pyx":642 + * + * if y.shape[1] == 1: + * return y[:, 0] # <<<<<<<<<<<<<< + * return y + * + */ + __pyx_k_slice_53 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_53); + __Pyx_GIVEREF(__pyx_k_slice_53); + __pyx_k_tuple_54 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_54); + __Pyx_INCREF(__pyx_k_slice_53); + PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, __pyx_k_slice_53); + __Pyx_GIVEREF(__pyx_k_slice_53); + __Pyx_INCREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_k_tuple_54, 1, __pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_54)); + + /* "audiolab/pysndfile/_sndfile.pyx":721 + * elif input.ndim == 1: + * nc = 1 + * input = input[:, None] # <<<<<<<<<<<<<< + * nframes = input.size + * else: + */ + __pyx_k_slice_56 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_slice_56); + __Pyx_GIVEREF(__pyx_k_slice_56); + __pyx_k_tuple_57 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_57); + __Pyx_INCREF(__pyx_k_slice_56); + PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, __pyx_k_slice_56); + __Pyx_GIVEREF(__pyx_k_slice_56); + __Pyx_INCREF(Py_None); + PyTuple_SET_ITEM(__pyx_k_tuple_57, 1, Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57)); + + /* "audiolab/pysndfile/_sndfile.pyx":816 + * st = sf_seek(self.hdl, offset, whence) + * else: + * raise ValueError("mode should be one of 'r', 'w' or 'rw' only") # <<<<<<<<<<<<<< + * + * if st == -1: + */ + __pyx_k_tuple_63 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_63); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_62)); + PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_kp_s_62)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_62)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); + + /* "audiolab/pysndfile/_sndfile.pyx":833 + * + * if not format == (ctype | cencoding | cendian): + * raise RuntimeError("Inconsistent format: this is a bug") # <<<<<<<<<<<<<< + * + * return _ENUM_TO_STR_FILE_FORMAT[ctype], \ + */ + __pyx_k_tuple_66 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_66); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_65)); + PyTuple_SET_ITEM(__pyx_k_tuple_66, 0, ((PyObject *)__pyx_kp_s_65)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_65)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66)); + + /* "numpy.pxd":215 + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + */ + __pyx_k_tuple_68 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_68); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_67)); + PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_u_67)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_67)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68)); + + /* "numpy.pxd":219 + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * + * info.buf = PyArray_DATA(self) + */ + __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_70); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_69)); + PyTuple_SET_ITEM(__pyx_k_tuple_70, 0, ((PyObject *)__pyx_kp_u_69)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_69)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70)); + + /* "numpy.pxd":257 + * if ((descr.byteorder == c'>' and little_endian) or + * (descr.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * if t == NPY_BYTE: f = "b" + * elif t == NPY_UBYTE: f = "B" + */ + __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_72); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_71)); + PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_kp_u_71)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_71)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72)); + + /* "numpy.pxd":799 + * + * if (end - f) - (new_offset - offset[0]) < 15: + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * + * if ((child.byteorder == c'>' and little_endian) or + */ + __pyx_k_tuple_75 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_75); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_74)); + PyTuple_SET_ITEM(__pyx_k_tuple_75, 0, ((PyObject *)__pyx_kp_u_74)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_74)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_75)); + + /* "numpy.pxd":803 + * if ((child.byteorder == c'>' and little_endian) or + * (child.byteorder == c'<' and not little_endian)): + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< + * # One could encode it in the format string and have Cython + * # complain instead, BUT: < and > in format strings also imply + */ + __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_76); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_71)); + PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_kp_u_71)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_71)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76)); + + /* "numpy.pxd":823 + * t = child.type_num + * if end - f < 5: + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< + * + * # Until ticket #99 is fixed, use integers to avoid warnings + */ + __pyx_k_tuple_78 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_78)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_78); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_77)); + PyTuple_SET_ITEM(__pyx_k_tuple_78, 0, ((PyObject *)__pyx_kp_u_77)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_77)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_78)); + + /* "audiolab/pysndfile/_sndfile.pyx":108 + * dict([(i, j) for j, i in _SNDFILE_ENDIAN.items()]) + * + * def sndfile_version(): # <<<<<<<<<<<<<< + * """Return version of sndfile.""" + * cdef int st + */ + __pyx_k_tuple_88 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_88); + __Pyx_INCREF(((PyObject *)__pyx_n_s__st)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_n_s__st)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__st)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__buff)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 1, ((PyObject *)__pyx_n_s__buff)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buff)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__ver)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 2, ((PyObject *)__pyx_n_s__ver)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ver)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__version)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 3, ((PyObject *)__pyx_n_s__version)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__version)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__prerelease)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 4, ((PyObject *)__pyx_n_s__prerelease)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prerelease)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__major)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 5, ((PyObject *)__pyx_n_s__major)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__major)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__minor)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 6, ((PyObject *)__pyx_n_s__minor)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minor)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__micro)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 7, ((PyObject *)__pyx_n_s__micro)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__micro)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__e)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 8, ((PyObject *)__pyx_n_s__e)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__e)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); + PyTuple_SET_ITEM(__pyx_k_tuple_88, 9, ((PyObject *)__pyx_n_s__i)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88)); + __pyx_k_codeobj_89 = (PyObject*)__Pyx_PyCode_New(0, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_90, __pyx_n_s__sndfile_version, 108, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "audiolab/pysndfile/_sndfile.pyx":310 + * return self.__str__() + * + * def available_file_formats(): # <<<<<<<<<<<<<< + * """Return lists of available file formats supported by audiolab.""" + * ret = [] + */ + __pyx_k_tuple_92 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_92); + __Pyx_INCREF(((PyObject *)__pyx_n_s__ret)); + PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_n_s__ret)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); + PyTuple_SET_ITEM(__pyx_k_tuple_92, 1, ((PyObject *)__pyx_n_s__i)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92)); + __pyx_k_codeobj_93 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_90, __pyx_n_s_94, 310, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "audiolab/pysndfile/_sndfile.pyx":323 + * return ret + * + * def available_encodings(major): # <<<<<<<<<<<<<< + * """Return lists of available encoding for the given major format.""" + * if not _SNDFILE_FILE_FORMAT.has_key(major): + */ + __pyx_k_tuple_95 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_95); + __Pyx_INCREF(((PyObject *)__pyx_n_s__major)); + PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, ((PyObject *)__pyx_n_s__major)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__major)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__ret)); + PyTuple_SET_ITEM(__pyx_k_tuple_95, 1, ((PyObject *)__pyx_n_s__ret)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); + PyTuple_SET_ITEM(__pyx_k_tuple_95, 2, ((PyObject *)__pyx_n_s__i)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95)); + __pyx_k_codeobj_96 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_90, __pyx_n_s__available_encodings, 323, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { - __pyx_int_0x0060 = PyInt_FromLong(0x0060); if (unlikely(!__pyx_int_0x0060)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0x170000 = PyInt_FromLong(0x170000); if (unlikely(!__pyx_int_0x170000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0x180000 = PyInt_FromLong(0x180000); if (unlikely(!__pyx_int_0x180000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0x190000 = PyInt_FromLong(0x190000); if (unlikely(!__pyx_int_0x190000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0x200000 = PyInt_FromLong(0x200000); if (unlikely(!__pyx_int_0x200000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0x210000 = PyInt_FromLong(0x210000); if (unlikely(!__pyx_int_0x210000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0x220000 = PyInt_FromLong(0x220000); if (unlikely(!__pyx_int_0x220000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_96 = PyInt_FromLong(96); if (unlikely(!__pyx_int_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_1507328 = PyInt_FromLong(1507328); if (unlikely(!__pyx_int_1507328)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_1572864 = PyInt_FromLong(1572864); if (unlikely(!__pyx_int_1572864)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_1638400 = PyInt_FromLong(1638400); if (unlikely(!__pyx_int_1638400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_2097152 = PyInt_FromLong(2097152); if (unlikely(!__pyx_int_2097152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_2162688 = PyInt_FromLong(2162688); if (unlikely(!__pyx_int_2162688)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_2228224 = PyInt_FromLong(2228224); if (unlikely(!__pyx_int_2228224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; @@ -9571,1151 +11682,1644 @@ PyMODINIT_FUNC PyInit__sndfile(void); /*proto*/ PyMODINIT_FUNC PyInit__sndfile(void) #endif { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - int __pyx_4; PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + __Pyx_RefNannyDeclarations + #if CYTHON_REFNANNY + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); + } + #endif + __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__sndfile(void)", 0); + if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #ifdef __Pyx_CyFunction_USED + if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif /*--- Library function declarations ---*/ - __pyx_init_filenames(); - /*--- Initialize various global constants etc. ---*/ - if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4("_sndfile", __pyx_methods, 0, 0, PYTHON_API_VERSION); + __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_sndfile"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif - if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - #if PY_MAJOR_VERSION < 3 - Py_INCREF(__pyx_m); + if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!PyDict_GetItemString(modules, "audiolab.pysndfile._sndfile")) { + if (unlikely(PyDict_SetItemString(modules, "audiolab.pysndfile._sndfile", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + #endif + __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if CYTHON_COMPILING_IN_PYPY + Py_INCREF(__pyx_b); #endif - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); - if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_module_is_main_audiolab__pysndfile___sndfile) { + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_skip_dispatch = 0; + /*--- Constants init code ---*/ + if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ + /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - __pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Format = &__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.format_int = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_format_int; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.file_format_int = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_file_format_int; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.encoding_int = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_encoding_int; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format.endianness_int = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format_endianness_int; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Format._is_equal = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_6Format__is_equal; - if (PyType_Ready(&__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Format.tp_dict, __pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttrString(__pyx_m, "Format", (PyObject *)&__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Format = &__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Format; - __pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile = &__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile._close = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__close; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile._get_nframes = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile__get_nframes; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_double = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_double; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_float = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_float; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_int = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_int; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_short = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_short; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_double = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_double; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_float = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_float; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_int = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_int; - *(void(**)(void))&__pyx_vtable_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_short = (void(*)(void))__pyx_f_7scikits_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_short; - if (PyType_Ready(&__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile.tp_dict, __pyx_vtabptr_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttrString(__pyx_m, "Sndfile", (PyObject *)&__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile = &__pyx_type_7scikits_8audiolab_9pysndfile_8_sndfile_Sndfile; + __pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Format = &__pyx_vtable_8audiolab_9pysndfile_8_sndfile_Format; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Format.format_int = (int (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *))__pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_format_int; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Format.file_format_int = (int (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *))__pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_file_format_int; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Format.encoding_int = (int (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *))__pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_encoding_int; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Format.endianness_int = (int (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *))__pyx_f_8audiolab_9pysndfile_8_sndfile_6Format_endianness_int; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Format._is_equal = (int (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *, struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Format *))__pyx_f_8audiolab_9pysndfile_8_sndfile_6Format__is_equal; + if (PyType_Ready(&__pyx_type_8audiolab_9pysndfile_8_sndfile_Format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_8audiolab_9pysndfile_8_sndfile_Format.tp_dict, __pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Format", (PyObject *)&__pyx_type_8audiolab_9pysndfile_8_sndfile_Format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_8audiolab_9pysndfile_8_sndfile_Format = &__pyx_type_8audiolab_9pysndfile_8_sndfile_Format; + __pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Sndfile = &__pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile._close = (PyObject *(*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile__close; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile._get_nframes = (sf_count_t (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile__get_nframes; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_double = (PyObject *(*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_double; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_float = (PyObject *(*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_float; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_int = (PyObject *(*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_int; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.read_frames_short = (PyObject *(*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_read_frames_short; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_double = (sf_count_t (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_double; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_float = (sf_count_t (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_float; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_int = (sf_count_t (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_int; + __pyx_vtable_8audiolab_9pysndfile_8_sndfile_Sndfile.write_frames_short = (sf_count_t (*)(struct __pyx_obj_8audiolab_9pysndfile_8_sndfile_Sndfile *, PyArrayObject *, sf_count_t))__pyx_f_8audiolab_9pysndfile_8_sndfile_7Sndfile_write_frames_short; + if (PyType_Ready(&__pyx_type_8audiolab_9pysndfile_8_sndfile_Sndfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_8audiolab_9pysndfile_8_sndfile_Sndfile.tp_dict, __pyx_vtabptr_8audiolab_9pysndfile_8_sndfile_Sndfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Sndfile", (PyObject *)&__pyx_type_8audiolab_9pysndfile_8_sndfile_Sndfile) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_8audiolab_9pysndfile_8_sndfile_Sndfile = &__pyx_type_8audiolab_9pysndfile_8_sndfile_Sndfile; /*--- Type import code ---*/ - __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", + #if CYTHON_COMPILING_IN_PYPY + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":3 + /* "audiolab/pysndfile/_sndfile.pyx":3 * # cython: embedsignature=True * * import numpy as np # <<<<<<<<<<<<<< * import warnings * import copy */ - __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":4 + /* "audiolab/pysndfile/_sndfile.pyx":4 * * import numpy as np * import warnings # <<<<<<<<<<<<<< * import copy * */ - __pyx_1 = __Pyx_Import(__pyx_kp_warnings, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttr(__pyx_m, __pyx_kp_warnings, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__warnings), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__warnings, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":5 + /* "audiolab/pysndfile/_sndfile.pyx":5 * import numpy as np * import warnings * import copy # <<<<<<<<<<<<<< * * cimport numpy as cnp */ - __pyx_1 = __Pyx_Import(__pyx_kp_copy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttr(__pyx_m, __pyx_kp_copy, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__copy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__copy, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":24 + /* "audiolab/pysndfile/_sndfile.pyx":26 * # format equivalence: dic used to create internally * # the right enum values from user friendly strings * _SNDFILE_ENCODING = { # <<<<<<<<<<<<<< * 'pcms8' : SF_FORMAT_PCM_S8, * 'pcm16' : SF_FORMAT_PCM_16, */ - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":25 + /* "audiolab/pysndfile/_sndfile.pyx":27 * # the right enum values from user friendly strings * _SNDFILE_ENCODING = { * 'pcms8' : SF_FORMAT_PCM_S8, # <<<<<<<<<<<<<< * 'pcm16' : SF_FORMAT_PCM_16, * 'pcm24' : SF_FORMAT_PCM_24, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_PCM_S8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_32, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_PCM_S8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pcms8), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":26 + /* "audiolab/pysndfile/_sndfile.pyx":28 * _SNDFILE_ENCODING = { * 'pcms8' : SF_FORMAT_PCM_S8, * 'pcm16' : SF_FORMAT_PCM_16, # <<<<<<<<<<<<<< * 'pcm24' : SF_FORMAT_PCM_24, * 'pcm32' : SF_FORMAT_PCM_32, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_PCM_16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_33, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_PCM_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pcm16), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":27 + /* "audiolab/pysndfile/_sndfile.pyx":29 * 'pcms8' : SF_FORMAT_PCM_S8, * 'pcm16' : SF_FORMAT_PCM_16, * 'pcm24' : SF_FORMAT_PCM_24, # <<<<<<<<<<<<<< * 'pcm32' : SF_FORMAT_PCM_32, * 'pcmu8' : SF_FORMAT_PCM_U8, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_PCM_24); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_34, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_PCM_24); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pcm24), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":28 + /* "audiolab/pysndfile/_sndfile.pyx":30 * 'pcm16' : SF_FORMAT_PCM_16, * 'pcm24' : SF_FORMAT_PCM_24, * 'pcm32' : SF_FORMAT_PCM_32, # <<<<<<<<<<<<<< * 'pcmu8' : SF_FORMAT_PCM_U8, * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_PCM_32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_35, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_PCM_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pcm32), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":29 + /* "audiolab/pysndfile/_sndfile.pyx":31 * 'pcm24' : SF_FORMAT_PCM_24, * 'pcm32' : SF_FORMAT_PCM_32, * 'pcmu8' : SF_FORMAT_PCM_U8, # <<<<<<<<<<<<<< * * 'float32' : SF_FORMAT_FLOAT, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_PCM_U8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_36, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_PCM_U8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pcmu8), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":31 + /* "audiolab/pysndfile/_sndfile.pyx":33 * 'pcmu8' : SF_FORMAT_PCM_U8, * * 'float32' : SF_FORMAT_FLOAT, # <<<<<<<<<<<<<< * 'float64' : SF_FORMAT_DOUBLE, * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_FLOAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_37, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_FLOAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__float32), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":32 + /* "audiolab/pysndfile/_sndfile.pyx":34 * * 'float32' : SF_FORMAT_FLOAT, * 'float64' : SF_FORMAT_DOUBLE, # <<<<<<<<<<<<<< * * 'ulaw' : SF_FORMAT_ULAW, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_DOUBLE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_38, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_DOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__float64), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":34 + /* "audiolab/pysndfile/_sndfile.pyx":36 * 'float64' : SF_FORMAT_DOUBLE, * * 'ulaw' : SF_FORMAT_ULAW, # <<<<<<<<<<<<<< * 'alaw' : SF_FORMAT_ALAW, * 'ima_adpcm' : SF_FORMAT_IMA_ADPCM, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_ULAW); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_39, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_ULAW); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ulaw), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":35 + /* "audiolab/pysndfile/_sndfile.pyx":37 * * 'ulaw' : SF_FORMAT_ULAW, * 'alaw' : SF_FORMAT_ALAW, # <<<<<<<<<<<<<< * 'ima_adpcm' : SF_FORMAT_IMA_ADPCM, * 'ms_adpcm' : SF_FORMAT_MS_ADPCM, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_ALAW); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_40, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_ALAW); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__alaw), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":36 + /* "audiolab/pysndfile/_sndfile.pyx":38 * 'ulaw' : SF_FORMAT_ULAW, * 'alaw' : SF_FORMAT_ALAW, * 'ima_adpcm' : SF_FORMAT_IMA_ADPCM, # <<<<<<<<<<<<<< * 'ms_adpcm' : SF_FORMAT_MS_ADPCM, * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_IMA_ADPCM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_41, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_IMA_ADPCM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ima_adpcm), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":37 + /* "audiolab/pysndfile/_sndfile.pyx":39 * 'alaw' : SF_FORMAT_ALAW, * 'ima_adpcm' : SF_FORMAT_IMA_ADPCM, * 'ms_adpcm' : SF_FORMAT_MS_ADPCM, # <<<<<<<<<<<<<< * * 'gsm610' : SF_FORMAT_GSM610, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_MS_ADPCM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_42, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_MS_ADPCM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ms_adpcm), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":39 + /* "audiolab/pysndfile/_sndfile.pyx":41 * 'ms_adpcm' : SF_FORMAT_MS_ADPCM, * * 'gsm610' : SF_FORMAT_GSM610, # <<<<<<<<<<<<<< * 'vox_adpcm' : SF_FORMAT_VOX_ADPCM, * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_GSM610); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_43, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_GSM610); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__gsm610), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":40 + /* "audiolab/pysndfile/_sndfile.pyx":42 * * 'gsm610' : SF_FORMAT_GSM610, * 'vox_adpcm' : SF_FORMAT_VOX_ADPCM, # <<<<<<<<<<<<<< * * 'g721_32' : SF_FORMAT_G721_32, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_VOX_ADPCM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_44, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_VOX_ADPCM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__vox_adpcm), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":42 + /* "audiolab/pysndfile/_sndfile.pyx":44 * 'vox_adpcm' : SF_FORMAT_VOX_ADPCM, * * 'g721_32' : SF_FORMAT_G721_32, # <<<<<<<<<<<<<< * 'g723_24' : SF_FORMAT_G723_24, * 'g723_40' : SF_FORMAT_G723_40, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_G721_32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_45, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_G721_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__g721_32), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":43 + /* "audiolab/pysndfile/_sndfile.pyx":45 * * 'g721_32' : SF_FORMAT_G721_32, * 'g723_24' : SF_FORMAT_G723_24, # <<<<<<<<<<<<<< * 'g723_40' : SF_FORMAT_G723_40, * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_G723_24); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_46, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_G723_24); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__g723_24), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":44 + /* "audiolab/pysndfile/_sndfile.pyx":46 * 'g721_32' : SF_FORMAT_G721_32, * 'g723_24' : SF_FORMAT_G723_24, * 'g723_40' : SF_FORMAT_G723_40, # <<<<<<<<<<<<<< * * 'dww12' : SF_FORMAT_DWVW_12, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_G723_40); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_47, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_G723_40); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__g723_40), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":46 + /* "audiolab/pysndfile/_sndfile.pyx":48 * 'g723_40' : SF_FORMAT_G723_40, * * 'dww12' : SF_FORMAT_DWVW_12, # <<<<<<<<<<<<<< * 'dww16' : SF_FORMAT_DWVW_16, * 'dww24' : SF_FORMAT_DWVW_24, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_DWVW_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_48, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_DWVW_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dww12), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":47 + /* "audiolab/pysndfile/_sndfile.pyx":49 * * 'dww12' : SF_FORMAT_DWVW_12, * 'dww16' : SF_FORMAT_DWVW_16, # <<<<<<<<<<<<<< * 'dww24' : SF_FORMAT_DWVW_24, * 'dwwN' : SF_FORMAT_DWVW_N, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_DWVW_16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_49, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_DWVW_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dww16), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":48 + /* "audiolab/pysndfile/_sndfile.pyx":50 * 'dww12' : SF_FORMAT_DWVW_12, * 'dww16' : SF_FORMAT_DWVW_16, * 'dww24' : SF_FORMAT_DWVW_24, # <<<<<<<<<<<<<< * 'dwwN' : SF_FORMAT_DWVW_N, * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_DWVW_24); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_50, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_DWVW_24); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dww24), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":49 + /* "audiolab/pysndfile/_sndfile.pyx":51 * 'dww16' : SF_FORMAT_DWVW_16, * 'dww24' : SF_FORMAT_DWVW_24, * 'dwwN' : SF_FORMAT_DWVW_N, # <<<<<<<<<<<<<< * * 'dpcm8' : SF_FORMAT_DPCM_8, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_DWVW_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_51, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_DWVW_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dwwN), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":51 + /* "audiolab/pysndfile/_sndfile.pyx":53 * 'dwwN' : SF_FORMAT_DWVW_N, * * 'dpcm8' : SF_FORMAT_DPCM_8, # <<<<<<<<<<<<<< * 'dpcm16': SF_FORMAT_DPCM_16, * } */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_DPCM_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_52, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_DPCM_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dpcm8), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":52 + /* "audiolab/pysndfile/_sndfile.pyx":54 * * 'dpcm8' : SF_FORMAT_DPCM_8, * 'dpcm16': SF_FORMAT_DPCM_16, # <<<<<<<<<<<<<< * } * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_DPCM_16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_53, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - if (PyObject_SetAttr(__pyx_m, __pyx_kp__SNDFILE_ENCODING, ((PyObject *)__pyx_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_DPCM_16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dpcm16), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s___SNDFILE_ENCODING, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":55 + /* "audiolab/pysndfile/_sndfile.pyx":57 * } * * _SNDFILE_FILE_FORMAT = { # <<<<<<<<<<<<<< * 'wav' : SF_FORMAT_WAV, * 'aiff' : SF_FORMAT_AIFF, */ - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":56 + /* "audiolab/pysndfile/_sndfile.pyx":58 * * _SNDFILE_FILE_FORMAT = { * 'wav' : SF_FORMAT_WAV, # <<<<<<<<<<<<<< * 'aiff' : SF_FORMAT_AIFF, * 'au' : SF_FORMAT_AU, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_WAV); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_54, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_WAV); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__wav), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":57 + /* "audiolab/pysndfile/_sndfile.pyx":59 * _SNDFILE_FILE_FORMAT = { * 'wav' : SF_FORMAT_WAV, * 'aiff' : SF_FORMAT_AIFF, # <<<<<<<<<<<<<< * 'au' : SF_FORMAT_AU, * 'raw' : SF_FORMAT_RAW, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_AIFF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_55, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_AIFF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__aiff), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":58 + /* "audiolab/pysndfile/_sndfile.pyx":60 * 'wav' : SF_FORMAT_WAV, * 'aiff' : SF_FORMAT_AIFF, * 'au' : SF_FORMAT_AU, # <<<<<<<<<<<<<< * 'raw' : SF_FORMAT_RAW, * 'paf' : SF_FORMAT_PAF, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_AU); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_56, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_AU); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__au), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":59 + /* "audiolab/pysndfile/_sndfile.pyx":61 * 'aiff' : SF_FORMAT_AIFF, * 'au' : SF_FORMAT_AU, * 'raw' : SF_FORMAT_RAW, # <<<<<<<<<<<<<< * 'paf' : SF_FORMAT_PAF, * 'svx' : SF_FORMAT_SVX, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_RAW); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_57, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_RAW); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__raw), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":60 + /* "audiolab/pysndfile/_sndfile.pyx":62 * 'au' : SF_FORMAT_AU, * 'raw' : SF_FORMAT_RAW, * 'paf' : SF_FORMAT_PAF, # <<<<<<<<<<<<<< * 'svx' : SF_FORMAT_SVX, * 'nist' : SF_FORMAT_NIST, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_PAF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_58, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_PAF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__paf), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":61 + /* "audiolab/pysndfile/_sndfile.pyx":63 * 'raw' : SF_FORMAT_RAW, * 'paf' : SF_FORMAT_PAF, * 'svx' : SF_FORMAT_SVX, # <<<<<<<<<<<<<< * 'nist' : SF_FORMAT_NIST, * 'voc' : SF_FORMAT_VOC, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_SVX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_59, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_SVX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__svx), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":62 + /* "audiolab/pysndfile/_sndfile.pyx":64 * 'paf' : SF_FORMAT_PAF, * 'svx' : SF_FORMAT_SVX, * 'nist' : SF_FORMAT_NIST, # <<<<<<<<<<<<<< * 'voc' : SF_FORMAT_VOC, * 'ircam' : SF_FORMAT_IRCAM, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_NIST); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_60, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_NIST); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__nist), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":63 + /* "audiolab/pysndfile/_sndfile.pyx":65 * 'svx' : SF_FORMAT_SVX, * 'nist' : SF_FORMAT_NIST, * 'voc' : SF_FORMAT_VOC, # <<<<<<<<<<<<<< * 'ircam' : SF_FORMAT_IRCAM, * 'wav64' : SF_FORMAT_W64, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_VOC); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_61, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_VOC); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__voc), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":64 + /* "audiolab/pysndfile/_sndfile.pyx":66 * 'nist' : SF_FORMAT_NIST, * 'voc' : SF_FORMAT_VOC, * 'ircam' : SF_FORMAT_IRCAM, # <<<<<<<<<<<<<< * 'wav64' : SF_FORMAT_W64, * 'mat4' : SF_FORMAT_MAT4, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_IRCAM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_62, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_IRCAM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ircam), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":65 + /* "audiolab/pysndfile/_sndfile.pyx":67 * 'voc' : SF_FORMAT_VOC, * 'ircam' : SF_FORMAT_IRCAM, * 'wav64' : SF_FORMAT_W64, # <<<<<<<<<<<<<< * 'mat4' : SF_FORMAT_MAT4, * 'mat5' : SF_FORMAT_MAT5, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_W64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_63, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_W64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__wav64), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":66 + /* "audiolab/pysndfile/_sndfile.pyx":68 * 'ircam' : SF_FORMAT_IRCAM, * 'wav64' : SF_FORMAT_W64, * 'mat4' : SF_FORMAT_MAT4, # <<<<<<<<<<<<<< * 'mat5' : SF_FORMAT_MAT5, * 'pvf' : SF_FORMAT_PVF, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_MAT4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_64, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_MAT4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mat4), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":67 + /* "audiolab/pysndfile/_sndfile.pyx":69 * 'wav64' : SF_FORMAT_W64, * 'mat4' : SF_FORMAT_MAT4, * 'mat5' : SF_FORMAT_MAT5, # <<<<<<<<<<<<<< * 'pvf' : SF_FORMAT_PVF, * 'xi' : SF_FORMAT_XI, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_MAT5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_65, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_MAT5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mat5), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":68 + /* "audiolab/pysndfile/_sndfile.pyx":70 * 'mat4' : SF_FORMAT_MAT4, * 'mat5' : SF_FORMAT_MAT5, * 'pvf' : SF_FORMAT_PVF, # <<<<<<<<<<<<<< * 'xi' : SF_FORMAT_XI, * 'htk' : SF_FORMAT_HTK, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_PVF); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_66, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_PVF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pvf), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":69 + /* "audiolab/pysndfile/_sndfile.pyx":71 * 'mat5' : SF_FORMAT_MAT5, * 'pvf' : SF_FORMAT_PVF, * 'xi' : SF_FORMAT_XI, # <<<<<<<<<<<<<< * 'htk' : SF_FORMAT_HTK, * 'sds' : SF_FORMAT_SDS, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_XI); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_67, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_XI); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__xi), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":70 + /* "audiolab/pysndfile/_sndfile.pyx":72 * 'pvf' : SF_FORMAT_PVF, * 'xi' : SF_FORMAT_XI, * 'htk' : SF_FORMAT_HTK, # <<<<<<<<<<<<<< * 'sds' : SF_FORMAT_SDS, * 'avr' : SF_FORMAT_AVR, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_HTK); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_68, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_HTK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__htk), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":71 + /* "audiolab/pysndfile/_sndfile.pyx":73 * 'xi' : SF_FORMAT_XI, * 'htk' : SF_FORMAT_HTK, * 'sds' : SF_FORMAT_SDS, # <<<<<<<<<<<<<< * 'avr' : SF_FORMAT_AVR, * 'wavex' : SF_FORMAT_WAVEX, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_SDS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_69, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_SDS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__sds), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":72 + /* "audiolab/pysndfile/_sndfile.pyx":74 * 'htk' : SF_FORMAT_HTK, * 'sds' : SF_FORMAT_SDS, * 'avr' : SF_FORMAT_AVR, # <<<<<<<<<<<<<< * 'wavex' : SF_FORMAT_WAVEX, * 'sd2' : SF_FORMAT_SD2, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_AVR); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_70, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_AVR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__avr), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":73 + /* "audiolab/pysndfile/_sndfile.pyx":75 * 'sds' : SF_FORMAT_SDS, * 'avr' : SF_FORMAT_AVR, * 'wavex' : SF_FORMAT_WAVEX, # <<<<<<<<<<<<<< * 'sd2' : SF_FORMAT_SD2, * } */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_WAVEX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_71, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_WAVEX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__wavex), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":74 + /* "audiolab/pysndfile/_sndfile.pyx":76 * 'avr' : SF_FORMAT_AVR, * 'wavex' : SF_FORMAT_WAVEX, * 'sd2' : SF_FORMAT_SD2, # <<<<<<<<<<<<<< * } * */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_FORMAT_SD2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_72, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - if (PyObject_SetAttr(__pyx_m, __pyx_kp_73, ((PyObject *)__pyx_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; + __pyx_t_2 = PyInt_FromLong(SF_FORMAT_SD2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__sd2), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_8, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":80 + /* "audiolab/pysndfile/_sndfile.pyx":82 * # relatively recent and not available on all sndfile available, harcode the * # values to avoid breaking compilation older sndfile. * _SNDFILE_ENCODING['vorbis'] = 0x0060 # <<<<<<<<<<<<<< * * _SNDFILE_FILE_FORMAT['flac'] = 0x170000 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__SNDFILE_ENCODING); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetItem(__pyx_1, __pyx_kp_74, __pyx_int_0x0060) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___SNDFILE_ENCODING); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__vorbis), __pyx_int_96) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":82 + /* "audiolab/pysndfile/_sndfile.pyx":84 * _SNDFILE_ENCODING['vorbis'] = 0x0060 * * _SNDFILE_FILE_FORMAT['flac'] = 0x170000 # <<<<<<<<<<<<<< * _SNDFILE_FILE_FORMAT['caf'] = 0x180000 * _SNDFILE_FILE_FORMAT['wve'] = 0x190000 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetItem(__pyx_1, __pyx_kp_75, __pyx_int_0x170000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__flac), __pyx_int_1507328) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":83 + /* "audiolab/pysndfile/_sndfile.pyx":85 * * _SNDFILE_FILE_FORMAT['flac'] = 0x170000 * _SNDFILE_FILE_FORMAT['caf'] = 0x180000 # <<<<<<<<<<<<<< * _SNDFILE_FILE_FORMAT['wve'] = 0x190000 * _SNDFILE_FILE_FORMAT['ogg'] = 0x200000 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetItem(__pyx_1, __pyx_kp_76, __pyx_int_0x180000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__caf), __pyx_int_1572864) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":84 + /* "audiolab/pysndfile/_sndfile.pyx":86 * _SNDFILE_FILE_FORMAT['flac'] = 0x170000 * _SNDFILE_FILE_FORMAT['caf'] = 0x180000 * _SNDFILE_FILE_FORMAT['wve'] = 0x190000 # <<<<<<<<<<<<<< * _SNDFILE_FILE_FORMAT['ogg'] = 0x200000 * _SNDFILE_FILE_FORMAT['mpc2k'] = 0x210000 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetItem(__pyx_1, __pyx_kp_77, __pyx_int_0x190000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__wve), __pyx_int_1638400) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":85 + /* "audiolab/pysndfile/_sndfile.pyx":87 * _SNDFILE_FILE_FORMAT['caf'] = 0x180000 * _SNDFILE_FILE_FORMAT['wve'] = 0x190000 * _SNDFILE_FILE_FORMAT['ogg'] = 0x200000 # <<<<<<<<<<<<<< * _SNDFILE_FILE_FORMAT['mpc2k'] = 0x210000 * _SNDFILE_FILE_FORMAT['rf64'] = 0x220000 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetItem(__pyx_1, __pyx_kp_78, __pyx_int_0x200000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ogg), __pyx_int_2097152) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":86 + /* "audiolab/pysndfile/_sndfile.pyx":88 * _SNDFILE_FILE_FORMAT['wve'] = 0x190000 * _SNDFILE_FILE_FORMAT['ogg'] = 0x200000 * _SNDFILE_FILE_FORMAT['mpc2k'] = 0x210000 # <<<<<<<<<<<<<< * _SNDFILE_FILE_FORMAT['rf64'] = 0x220000 * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetItem(__pyx_1, __pyx_kp_79, __pyx_int_0x210000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__mpc2k), __pyx_int_2162688) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":87 + /* "audiolab/pysndfile/_sndfile.pyx":89 * _SNDFILE_FILE_FORMAT['ogg'] = 0x200000 * _SNDFILE_FILE_FORMAT['mpc2k'] = 0x210000 * _SNDFILE_FILE_FORMAT['rf64'] = 0x220000 # <<<<<<<<<<<<<< * * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetItem(__pyx_1, __pyx_kp_80, __pyx_int_0x220000) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__rf64), __pyx_int_2228224) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":90 + /* "audiolab/pysndfile/_sndfile.pyx":92 * * * _SNDFILE_ENDIAN = { # <<<<<<<<<<<<<< * 'file' : SF_ENDIAN_FILE, * 'little' : SF_ENDIAN_LITTLE, */ - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":91 + /* "audiolab/pysndfile/_sndfile.pyx":93 * * _SNDFILE_ENDIAN = { * 'file' : SF_ENDIAN_FILE, # <<<<<<<<<<<<<< * 'little' : SF_ENDIAN_LITTLE, * 'big' : SF_ENDIAN_BIG, */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_ENDIAN_FILE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_81, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_ENDIAN_FILE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__file), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":92 + /* "audiolab/pysndfile/_sndfile.pyx":94 * _SNDFILE_ENDIAN = { * 'file' : SF_ENDIAN_FILE, * 'little' : SF_ENDIAN_LITTLE, # <<<<<<<<<<<<<< * 'big' : SF_ENDIAN_BIG, * 'cpu' : SF_ENDIAN_CPU */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_ENDIAN_LITTLE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_82, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_ENDIAN_LITTLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__little), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":93 + /* "audiolab/pysndfile/_sndfile.pyx":95 * 'file' : SF_ENDIAN_FILE, * 'little' : SF_ENDIAN_LITTLE, * 'big' : SF_ENDIAN_BIG, # <<<<<<<<<<<<<< * 'cpu' : SF_ENDIAN_CPU * } */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_ENDIAN_BIG); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_83, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ + __pyx_t_2 = PyInt_FromLong(SF_ENDIAN_BIG); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__big), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":95 + /* "audiolab/pysndfile/_sndfile.pyx":97 * 'big' : SF_ENDIAN_BIG, * 'cpu' : SF_ENDIAN_CPU * } # <<<<<<<<<<<<<< * * # Those following dic are used internally to get user-friendly values from */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyInt_FromLong(SF_ENDIAN_CPU); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_84, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - if (PyObject_SetAttr(__pyx_m, __pyx_kp__SNDFILE_ENDIAN, ((PyObject *)__pyx_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; + __pyx_t_2 = PyInt_FromLong(SF_ENDIAN_CPU); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cpu), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s___SNDFILE_ENDIAN, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":100 + /* "audiolab/pysndfile/_sndfile.pyx":102 * # sndfile enum * _ENUM_TO_STR_ENCODING = \ * dict([(i, j) for j, i in _SNDFILE_ENCODING.items()]) # <<<<<<<<<<<<<< * _ENUM_TO_STR_FILE_FORMAT = \ * dict([(i, j) for j, i in _SNDFILE_FILE_FORMAT.items()]) */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__SNDFILE_ENCODING); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_items); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_4 allocated */ - if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; Py_INCREF(__pyx_t_4); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___SNDFILE_ENCODING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { - /* __pyx_t_3 allocated */ - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break; - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); Py_INCREF(__pyx_t_3); __pyx_t_2++; - } else if (likely(PyTuple_CheckExact(__pyx_t_4))) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); Py_INCREF(__pyx_t_3); __pyx_t_2++; + if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_3 = PyIter_Next(__pyx_t_4); - if (!__pyx_t_3) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_t_5(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } break; } - } - if (PyTuple_CheckExact(__pyx_t_3) && PyTuple_GET_SIZE(__pyx_t_3) == 2) { - PyObject* tuple = __pyx_t_3; - __pyx_2 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(__pyx_2); - __pyx_3 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(__pyx_3); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_j, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_i, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - } else { - __pyx_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_j, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_i, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - } - /* __pyx_t_3 released */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_i); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_j); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_2); - __pyx_1 = 0; - __pyx_2 = 0; - __pyx_4 = PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3); if (unlikely(__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - } - /* __pyx_t_2 released */ - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - if (PyObject_SetAttr(__pyx_m, __pyx_kp_85, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":102 + __Pyx_GOTREF(__pyx_t_2); + } + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L4_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L5_unpacking_done; + __pyx_L4_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L5_unpacking_done:; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__j, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__i, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__j); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_2 = 0; + __pyx_t_7 = 0; + if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_22, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":104 * dict([(i, j) for j, i in _SNDFILE_ENCODING.items()]) * _ENUM_TO_STR_FILE_FORMAT = \ * dict([(i, j) for j, i in _SNDFILE_FILE_FORMAT.items()]) # <<<<<<<<<<<<<< * _ENUM_TO_STR_ENDIAN = \ * dict([(i, j) for j, i in _SNDFILE_ENDIAN.items()]) */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_73); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_kp_items); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; Py_INCREF(__pyx_t_3); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; } - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* __pyx_t_4 released */ + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - /* __pyx_t_4 allocated */ - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); Py_INCREF(__pyx_t_4); __pyx_t_2++; - } else if (likely(PyTuple_CheckExact(__pyx_t_3))) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); Py_INCREF(__pyx_t_4); __pyx_t_2++; + if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_6)) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_6)) { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_4 = PyIter_Next(__pyx_t_3); - if (!__pyx_t_4) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_t_5(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } break; } - } - if (PyTuple_CheckExact(__pyx_t_4) && PyTuple_GET_SIZE(__pyx_t_4) == 2) { - PyObject* tuple = __pyx_t_4; - __pyx_3 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(__pyx_3); - __pyx_1 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(__pyx_1); - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_j, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_i, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - } else { - __pyx_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_3 = __Pyx_UnpackItem(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_1 = __Pyx_UnpackItem(__pyx_2, 1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_j, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_i, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - } - /* __pyx_t_4 released */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_i); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_j); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_3); - __pyx_2 = 0; - __pyx_3 = 0; - __pyx_4 = PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4); if (unlikely(__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - } - /* __pyx_t_2 released */ - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1)); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - if (PyObject_SetAttr(__pyx_m, __pyx_kp_86, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":104 + __Pyx_GOTREF(__pyx_t_3); + } + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); + #else + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L9_unpacking_done:; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__j, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__i, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__j); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_2 = 0; + if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_19, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":106 * dict([(i, j) for j, i in _SNDFILE_FILE_FORMAT.items()]) * _ENUM_TO_STR_ENDIAN = \ * dict([(i, j) for j, i in _SNDFILE_ENDIAN.items()]) # <<<<<<<<<<<<<< * * def sndfile_version(): */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_2 allocated */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__SNDFILE_ENDIAN); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_items); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - /* __pyx_t_4 allocated */ - if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; Py_INCREF(__pyx_t_4); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s___SNDFILE_ENDIAN); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__items); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; } - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* __pyx_t_3 released */ + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { - /* __pyx_t_3 allocated */ - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break; - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); Py_INCREF(__pyx_t_3); __pyx_t_2++; - } else if (likely(PyTuple_CheckExact(__pyx_t_4))) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); Py_INCREF(__pyx_t_3); __pyx_t_2++; + if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_7)) { + if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_7)) { + if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif } else { - __pyx_t_3 = PyIter_Next(__pyx_t_4); - if (!__pyx_t_3) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_t_5(__pyx_t_7); + if (unlikely(!__pyx_t_6)) { + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } break; } - } - if (PyTuple_CheckExact(__pyx_t_3) && PyTuple_GET_SIZE(__pyx_t_3) == 2) { - PyObject* tuple = __pyx_t_3; - __pyx_1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(__pyx_1); - __pyx_2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(__pyx_2); - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_j, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_i, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - } else { - __pyx_3 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_1 = __Pyx_UnpackItem(__pyx_3, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_2 = __Pyx_UnpackItem(__pyx_3, 1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_j, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_i, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - } - /* __pyx_t_3 released */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_i); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_j); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* __pyx_t_3 allocated */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_3); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_1); - __pyx_3 = 0; - __pyx_1 = 0; - __pyx_4 = PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3); if (unlikely(__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* __pyx_t_3 released */ - } - /* __pyx_t_2 released */ - Py_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - /* __pyx_t_4 allocated */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); - __pyx_t_1 = 0; - /* __pyx_t_1 released */ - /* __pyx_t_1 allocated */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - /* __pyx_t_4 released */ - if (PyObject_SetAttr(__pyx_m, __pyx_kp__ENUM_TO_STR_ENDIAN, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* __pyx_t_1 released */ - - /* "/usr/media/src/dsp/scikits/git/audiolab/scikits/audiolab/pysndfile/_sndfile.pyx":591 + __Pyx_GOTREF(__pyx_t_6); + } + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } else + { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L13_unpacking_done; + __pyx_L12_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L13_unpacking_done:; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__j, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__i, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__j); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_6 = 0; + __pyx_t_3 = 0; + if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s___ENUM_TO_STR_ENDIAN, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":108 + * dict([(i, j) for j, i in _SNDFILE_ENDIAN.items()]) + * + * def sndfile_version(): # <<<<<<<<<<<<<< + * """Return version of sndfile.""" + * cdef int st + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8audiolab_9pysndfile_8_sndfile_1sndfile_version, NULL, __pyx_n_s_91); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sndfile_version, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":310 + * return self.__str__() + * + * def available_file_formats(): # <<<<<<<<<<<<<< + * """Return lists of available file formats supported by audiolab.""" + * ret = [] + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8audiolab_9pysndfile_8_sndfile_3available_file_formats, NULL, __pyx_n_s_91); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_94, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":323 + * return ret + * + * def available_encodings(major): # <<<<<<<<<<<<<< + * """Return lists of available encoding for the given major format.""" + * if not _SNDFILE_FILE_FORMAT.has_key(major): + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8audiolab_9pysndfile_8_sndfile_5available_encodings, NULL, __pyx_n_s_91); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__available_encodings, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":594 * return "\n".join(repstr) * * def read_frames(self, sf_count_t nframes, dtype=np.float64): # <<<<<<<<<<<<<< * """\ * Read the given number of frames and put the data into a numpy array of */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_91); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_k_92 = __pyx_3; - __pyx_3 = 0; + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_k_50 = __pyx_t_7; + __Pyx_GIVEREF(__pyx_t_7); + __pyx_t_7 = 0; + + /* "audiolab/pysndfile/_sndfile.pyx":1 + * # cython: embedsignature=True # <<<<<<<<<<<<<< + * + * import numpy as np + */ + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - /* "/home/david/local/lib/python2.5/site-packages/Cython/Includes/stdlib.pxd":2 + /* "numpy.pxd":975 + * arr.base = baseptr * - * cdef extern from "stdlib.h": # <<<<<<<<<<<<<< - * ctypedef unsigned long size_t - * void free(void *ptr) + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + if (__pyx_m) { + __Pyx_AddTraceback("init audiolab.pysndfile._sndfile", __pyx_clineno, __pyx_lineno, __pyx_filename); + Py_DECREF(__pyx_m); __pyx_m = 0; + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init audiolab.pysndfile._sndfile"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif - __pyx_L1_error:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - __Pyx_AddTraceback("scikits.audiolab.pysndfile._sndfile"); - #if PY_MAJOR_VERSION >= 3 - return NULL; - #endif } -static const char *__pyx_filenames[] = { - "_sndfile.pyx", - "numpy.pxd", -}; - /* Runtime support code */ - -static void __pyx_init_filenames(void) { - __pyx_f = __pyx_filenames; +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule((char *)modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; } +#endif /* CYTHON_REFNANNY */ +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { + PyObject *result; + result = PyObject_GetAttr(dict, name); + if (!result) { + if (dict != __pyx_b) { + PyErr_Clear(); + result = PyObject_GetAttr(__pyx_b, name); + } + if (!result) { + PyErr_SetObject(PyExc_NameError, name); + } + } + return result; +} -static void __Pyx_RaiseDoubleKeywordsError( - const char* func_name, - PyObject* kw_name) -{ - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION >= 3 - "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_Restore(type, value, tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(type, value, tb); +#endif +} + +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + #if PY_VERSION_HEX < 0x02050000 + if (PyClass_Check(type)) { + #else + if (PyType_Check(type)) { + #endif +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + #if PY_VERSION_HEX < 0x02050000 + if (PyInstance_Check(type)) { + type = (PyObject*) ((PyInstanceObject*)type)->in_class; + Py_INCREF(type); + } + else { + type = 0; + PyErr_SetString(PyExc_TypeError, + "raise: exception must be an old-style class or instance"); + goto raise_error; + } #else - "%s() got multiple values for keyword argument '%s'", func_name, - PyString_AS_STRING(kw_name)); + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } #endif + } + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; } +#else /* Python 3+ */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } + else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyEval_CallObject(type, args); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause && cause != Py_None) { + PyObject *fixed_cause; + if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } + else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } + else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { + PyThreadState *tstate = PyThreadState_GET(); + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif -static void __Pyx_RaiseArgtupleInvalid( - const char* func_name, - int exact, - Py_ssize_t num_min, - Py_ssize_t num_max, - Py_ssize_t num_found) -{ - Py_ssize_t num_expected; - const char *number, *more_or_less; +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} - if (num_found < num_min) { - num_expected = num_min; - more_or_less = "at least"; - } else { - num_expected = num_max; - more_or_less = "at most"; +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", + index, (index == 1) ? "" : "s"); +} + +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } } - if (exact) { - more_or_less = "exactly"; + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } } - number = (num_expected == 1) ? "" : "s"; + return 0; +#endif +} + +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + #endif + Py_INCREF(local_type); + Py_INCREF(local_value); + Py_INCREF(local_tb); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_COMPILING_IN_CPYTHON + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + /* Make sure tstate is in a consistent state when we XDECREF + these objects (DECREF may run arbitrary code). */ + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ PyErr_Format(PyExc_TypeError, - #if PY_VERSION_HEX < 0x02050000 - "%s() takes %s %d positional argument%s (%d given)", + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else - "%s() takes %s %zd positional argument%s (%zd given)", + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); #endif - func_name, more_or_less, num_expected, number, num_found); } static int __Pyx_ParseOptionalKeywords( @@ -10730,58 +13334,77 @@ static int __Pyx_ParseOptionalKeywords( Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; - while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) { - #else - if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) { - #endif - goto invalid_keyword_type; - } else { - name = argnames; - while (*name && (**name != key)) name++; - if (*name) { - if (name < first_kw_arg) goto arg_passed_twice; - values[name-argnames] = value; - } else { - for (name = first_kw_arg; *name; name++) { - #if PY_MAJOR_VERSION >= 3 - if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) && - PyUnicode_Compare(**name, key) == 0) break; - #else - if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) && - strcmp(PyString_AS_STRING(**name), - PyString_AS_STRING(key)) == 0) break; - #endif - } - if (*name) { + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { values[name-argnames] = value; - } else { - /* unexpected keyword found */ - for (name=argnames; name != first_kw_arg; name++) { - if (**name == key) goto arg_passed_twice; - #if PY_MAJOR_VERSION >= 3 - if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) && - PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice; - #else - if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) && - strcmp(PyString_AS_STRING(**name), - PyString_AS_STRING(key)) == 0) goto arg_passed_twice; - #endif - } - if (kwds2) { - if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; - } else { - goto invalid_keyword; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; } + name++; } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; } } return 0; arg_passed_twice: - __Pyx_RaiseDoubleKeywordsError(function_name, **name); + __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, @@ -10800,342 +13423,597 @@ static int __Pyx_ParseOptionalKeywords( return -1; } -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (!type) { +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } - if (obj == Py_None || PyObject_TypeCheck(obj, type)) + if (likely(PyObject_TypeCheck(obj, type))) return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", - Py_TYPE(obj)->tp_name, type->tp_name); + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); return 0; } -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { - if (info->buf == NULL) return; - if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; - __Pyx_ReleaseBuffer(info); +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact) +{ + if (!type) { + PyErr_Format(PyExc_SystemError, "Missing type object"); + return 0; + } + if (none_allowed && obj == Py_None) return 1; + else if (exact) { + if (Py_TYPE(obj) == type) return 1; + } + else { + if (PyObject_TypeCheck(obj, type)) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%s' has incorrect type (expected %s, got %s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; } -static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { - buf->buf = NULL; - buf->obj = NULL; - buf->strides = __Pyx_zeros; - buf->shape = __Pyx_zeros; - buf->suboffsets = __Pyx_minusones; +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } -static INLINE const char* __Pyx_ConsumeWhitespace(const char* ts) { - while (1) { - switch (*ts) { - case '@': - case 10: - case 13: - case ' ': - ++ts; - break; - case '=': - case '<': - case '>': - case '!': - PyErr_SetString(PyExc_ValueError, "Buffer acquisition error: Only native byte order, size and alignment supported."); - return NULL; - default: - return ts; - } +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { + unsigned int n = 1; + return *(unsigned char*)(&n) != 0; +} +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; } } - -static void __Pyx_BufferNdimError(Py_buffer* buffer, int expected_ndim) { - PyErr_Format(PyExc_ValueError, - "Buffer has wrong number of dimensions (expected %d, got %d)", - expected_ndim, buffer->ndim); -} - -static const char* __Pyx_DescribeTokenInFormatString(const char* ts) { - switch (*ts) { - case 'b': return "char"; - case 'B': return "unsigned char"; - case 'h': return "short"; - case 'H': return "unsigned short"; - case 'i': return "int"; - case 'I': return "unsigned int"; - case 'l': return "long"; - case 'L': return "unsigned long"; - case 'q': return "long long"; - case 'Q': return "unsigned long long"; - case 'f': return "float"; - case 'd': return "double"; - case 'g': return "long double"; - case 'Z': switch (*(ts+1)) { - case 'f': return "complex float"; - case 'd': return "complex double"; - case 'g': return "complex long double"; - default: return "unparseable format string"; +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t < '9') { + count *= 10; + count += *t++ - '0'; + } } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) /* First char was not a digit */ + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; default: return "unparseable format string"; } } - -static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_float64_t(const char* ts) { - int ok; - ts = __Pyx_ConsumeWhitespace(ts); if (!ts) return NULL; - if (*ts == '1') ++ts; - switch (*ts) { - case 'f': ok = (sizeof(__pyx_t_5numpy_float64_t) == sizeof(float) && (__pyx_t_5numpy_float64_t)-1 < 0); break; - case 'd': ok = (sizeof(__pyx_t_5numpy_float64_t) == sizeof(double) && (__pyx_t_5numpy_float64_t)-1 < 0); break; - case 'g': ok = (sizeof(__pyx_t_5numpy_float64_t) == sizeof(long double) && (__pyx_t_5numpy_float64_t)-1 < 0); break; - default: ok = 0; - } - if (!(ok)) { - PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch (expected numpy.float64_t, got %s)", __Pyx_DescribeTokenInFormatString(ts)); - return NULL; - } - ++ts; - return ts; - } - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_float64_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast) { - const char* ts; - if (obj == Py_None) { - __Pyx_ZeroBuffer(buf); - return 0; - } - buf->buf = NULL; - if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; - if (buf->ndim != nd) { - __Pyx_BufferNdimError(buf, nd); - goto fail; - } - if (!cast) { - ts = buf->format; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - ts = __Pyx_CheckTypestring_nn___pyx_t_5numpy_float64_t(ts); - if (!ts) goto fail; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - if (*ts != 0) { - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch (expected end, got %s)", - __Pyx_DescribeTokenInFormatString(ts)); - goto fail; +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; } - } else { - if (buf->itemsize != sizeof(__pyx_t_5numpy_float64_t)) { - PyErr_SetString(PyExc_ValueError, - "Attempted cast of buffer to datatype of different size."); - goto fail; +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; } } - if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; - return 0; -fail:; - __Pyx_ZeroBuffer(buf); - return -1; -} -static void __Pyx_RaiseBufferFallbackError(void) { - PyErr_Format(PyExc_ValueError, - "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); -} - - -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); - - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); } - -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { - PyThreadState *tstate = PyThreadState_GET(); - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } } - -static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_float32_t(const char* ts) { - int ok; - ts = __Pyx_ConsumeWhitespace(ts); if (!ts) return NULL; - if (*ts == '1') ++ts; - switch (*ts) { - case 'f': ok = (sizeof(__pyx_t_5numpy_float32_t) == sizeof(float) && (__pyx_t_5numpy_float32_t)-1 < 0); break; - case 'd': ok = (sizeof(__pyx_t_5numpy_float32_t) == sizeof(double) && (__pyx_t_5numpy_float32_t)-1 < 0); break; - case 'g': ok = (sizeof(__pyx_t_5numpy_float32_t) == sizeof(long double) && (__pyx_t_5numpy_float32_t)-1 < 0); break; - default: ok = 0; +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; } - if (!(ok)) { - PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch (expected numpy.float32_t, got %s)", __Pyx_DescribeTokenInFormatString(ts)); - return NULL; +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; } - ++ts; - return ts; - } - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_float32_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast) { - const char* ts; - if (obj == Py_None) { - __Pyx_ZeroBuffer(buf); - return 0; - } - buf->buf = NULL; - if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; - if (buf->ndim != nd) { - __Pyx_BufferNdimError(buf, nd); - goto fail; } - if (!cast) { - ts = buf->format; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - ts = __Pyx_CheckTypestring_nn___pyx_t_5numpy_float32_t(ts); - if (!ts) goto fail; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - if (*ts != 0) { - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch (expected end, got %s)", - __Pyx_DescribeTokenInFormatString(ts)); - goto fail; +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { - if (buf->itemsize != sizeof(__pyx_t_5numpy_float32_t)) { - PyErr_SetString(PyExc_ValueError, - "Attempted cast of buffer to datatype of different size."); - goto fail; - } + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); } - if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; - return 0; -fail:; - __Pyx_ZeroBuffer(buf); - return -1; -}static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_int32_t(const char* ts) { - int ok; - ts = __Pyx_ConsumeWhitespace(ts); if (!ts) return NULL; - if (*ts == '1') ++ts; - switch (*ts) { - case 'b': ok = (sizeof(__pyx_t_5numpy_int32_t) == sizeof(char) && (__pyx_t_5numpy_int32_t)-1 < 0); break; - case 'h': ok = (sizeof(__pyx_t_5numpy_int32_t) == sizeof(short) && (__pyx_t_5numpy_int32_t)-1 < 0); break; - case 'i': ok = (sizeof(__pyx_t_5numpy_int32_t) == sizeof(int) && (__pyx_t_5numpy_int32_t)-1 < 0); break; - case 'l': ok = (sizeof(__pyx_t_5numpy_int32_t) == sizeof(long) && (__pyx_t_5numpy_int32_t)-1 < 0); break; - case 'q': ok = (sizeof(__pyx_t_5numpy_int32_t) == sizeof(long long) && (__pyx_t_5numpy_int32_t)-1 < 0); break; - default: ok = 0; - } - if (!(ok)) { - PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch (expected numpy.int32_t, got %s)", __Pyx_DescribeTokenInFormatString(ts)); - return NULL; +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } } - ++ts; - return ts; - } - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_int32_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast) { - const char* ts; - if (obj == Py_None) { - __Pyx_ZeroBuffer(buf); - return 0; - } - buf->buf = NULL; - if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; - if (buf->ndim != nd) { - __Pyx_BufferNdimError(buf, nd); - goto fail; - } - if (!cast) { - ts = buf->format; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - ts = __Pyx_CheckTypestring_nn___pyx_t_5numpy_int32_t(ts); - if (!ts) goto fail; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - if (*ts != 0) { - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch (expected end, got %s)", - __Pyx_DescribeTokenInFormatString(ts)); - goto fail; + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; } - } else { - if (buf->itemsize != sizeof(__pyx_t_5numpy_int32_t)) { - PyErr_SetString(PyExc_ValueError, - "Attempted cast of buffer to datatype of different size."); - goto fail; + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; } + ctx->is_valid_array = 0; + ctx->enc_count = 1; } - if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; - return 0; -fail:; - __Pyx_ZeroBuffer(buf); - return -1; -}static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_int16_t(const char* ts) { - int ok; - ts = __Pyx_ConsumeWhitespace(ts); if (!ts) return NULL; - if (*ts == '1') ++ts; - switch (*ts) { - case 'b': ok = (sizeof(__pyx_t_5numpy_int16_t) == sizeof(char) && (__pyx_t_5numpy_int16_t)-1 < 0); break; - case 'h': ok = (sizeof(__pyx_t_5numpy_int16_t) == sizeof(short) && (__pyx_t_5numpy_int16_t)-1 < 0); break; - case 'i': ok = (sizeof(__pyx_t_5numpy_int16_t) == sizeof(int) && (__pyx_t_5numpy_int16_t)-1 < 0); break; - case 'l': ok = (sizeof(__pyx_t_5numpy_int16_t) == sizeof(long) && (__pyx_t_5numpy_int16_t)-1 < 0); break; - case 'q': ok = (sizeof(__pyx_t_5numpy_int16_t) == sizeof(long long) && (__pyx_t_5numpy_int16_t)-1 < 0); break; - default: ok = 0; - } - if (!(ok)) { - PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch (expected numpy.int16_t, got %s)", __Pyx_DescribeTokenInFormatString(ts)); - return NULL; + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; /* Consume from buffer string */ + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; /* breaks both loops as ctx->enc_count == 0 */ + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; /* empty struct */ + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static CYTHON_INLINE PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number; + int ndim = ctx->head->field->type->ndim; +; ++ts; - return ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + while (*ts && *ts != ')') { + if (isspace(*ts)) + continue; + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case 10: + case 13: + ++ts; + break; + case '<': + if (!__Pyx_IsLittleEndian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_IsLittleEndian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': /* substruct */ + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; /* Erase processed last struct element */ + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': /* end of substruct; either repeat or move on */ + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; /* Erase processed last struct element */ + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } /* fall through */ + case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 's': case 'p': + if (ctx->enc_type == *ts && got_Z == ctx->is_complex && + ctx->enc_packmode == ctx->new_packmode) { + ctx->enc_count += ctx->new_count; + } else { + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + } + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } } - -static int __Pyx_GetBuffer_nn___pyx_t_5numpy_int16_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast) { - const char* ts; - if (obj == Py_None) { +} +static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} +static CYTHON_INLINE int __Pyx_GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + if (obj == Py_None || obj == NULL) { __Pyx_ZeroBuffer(buf); return 0; } buf->buf = NULL; if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; if (buf->ndim != nd) { - __Pyx_BufferNdimError(buf, nd); + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); goto fail; } if (!cast) { - ts = buf->format; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - ts = __Pyx_CheckTypestring_nn___pyx_t_5numpy_int16_t(ts); - if (!ts) goto fail; - ts = __Pyx_ConsumeWhitespace(ts); - if (!ts) goto fail; - if (*ts != 0) { - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch (expected end, got %s)", - __Pyx_DescribeTokenInFormatString(ts)); - goto fail; - } - } else { - if (buf->itemsize != sizeof(__pyx_t_5numpy_int16_t)) { - PyErr_SetString(PyExc_ValueError, - "Attempted cast of buffer to datatype of different size."); - goto fail; - } + __Pyx_BufFmt_Context ctx; + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if ((unsigned)buf->itemsize != dtype->size) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; } if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; return 0; @@ -11143,27 +14021,23 @@ fail:; __Pyx_ZeroBuffer(buf); return -1; } -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, - const char *name, int exact) -{ - if (!type) { - PyErr_Format(PyExc_SystemError, "Missing type object"); - return 0; - } - if (none_allowed && obj == Py_None) return 1; - else if (exact) { - if (Py_TYPE(obj) == type) return 1; - } - else { - if (PyObject_TypeCheck(obj, type)) return 1; - } - PyErr_Format(PyExc_TypeError, - "Argument '%s' has incorrect type (expected %s, got %s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); - return 0; +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (info->buf == NULL) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); } -static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { +static void __Pyx_RaiseBufferFallbackError(void) { + PyErr_Format(PyExc_ValueError, + "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); +} + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; @@ -11171,9 +14045,12 @@ static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObje Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); +#else + PyErr_GetExcInfo(type, value, tb); +#endif } - static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; @@ -11185,41 +14062,93 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(type, value, tb); +#endif } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + CYTHON_UNUSED PyObject *getbuffer_cobj; #if PY_VERSION_HEX >= 0x02060000 - if (Py_TYPE(obj)->tp_flags & Py_TPFLAGS_HAVE_NEWBUFFER) - return PyObject_GetBuffer(obj, view, flags); + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); #endif - if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pf_5numpy_7ndarray___getbuffer__(obj, view, flags); - else { - PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; + if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); + #if PY_VERSION_HEX < 0x02060000 + if (obj->ob_type->tp_dict && + (getbuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict, + "__pyx_getbuffer"))) { + getbufferproc func; + #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0) + func = (getbufferproc) PyCapsule_GetPointer(getbuffer_cobj, "getbuffer(obj, view, flags)"); + #else + func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); + #endif + Py_DECREF(getbuffer_cobj); + if (!func) + goto fail; + return func(obj, view, flags); + } else { + PyErr_Clear(); } + #endif + PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name); +#if PY_VERSION_HEX < 0x02060000 +fail: +#endif + return -1; } - static void __Pyx_ReleaseBuffer(Py_buffer *view) { - PyObject* obj = view->obj; - if (obj) { -if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pf_5numpy_7ndarray___releasebuffer__(obj, view); + PyObject *obj = view->obj; + CYTHON_UNUSED PyObject *releasebuffer_cobj; + if (!obj) return; + #if PY_VERSION_HEX >= 0x02060000 + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + #endif + if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } + #if PY_VERSION_HEX < 0x02060000 + if (obj->ob_type->tp_dict && + (releasebuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict, + "__pyx_releasebuffer"))) { + releasebufferproc func; + #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0) + func = (releasebufferproc) PyCapsule_GetPointer(releasebuffer_cobj, "releasebuffer(obj, view)"); + #else + func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); + #endif + Py_DECREF(releasebuffer_cobj); + if (!func) + goto fail; + func(obj, view); + return; + } else { + PyErr_Clear(); + } + #endif + goto nofail; +#if PY_VERSION_HEX < 0x02060000 +fail: +#endif + PyErr_WriteUnraisable(obj); +nofail: Py_DECREF(obj); view->obj = NULL; - } } +#endif /* PY_MAJOR_VERSION < 3 */ -#endif -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) { - PyObject *__import__ = 0; + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) { + PyObject *py_import = 0; PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; - __import__ = PyObject_GetAttrString(__pyx_b, "__import__"); - if (!__import__) + py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); + if (!py_import) goto bad; if (from_list) list = from_list; @@ -11235,146 +14164,775 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) { empty_dict = PyDict_New(); if (!empty_dict) goto bad; - module = PyObject_CallFunctionObjArgs(__import__, + #if PY_VERSION_HEX >= 0x02050000 + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + /* try package relative import first */ + PyObject *py_level = PyInt_FromLong(1); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, NULL); + Py_DECREF(py_level); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; /* try absolute import on failure */ + } + #endif + if (!module) { + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, NULL); + Py_DECREF(py_level); + } + } + #else + if (level>0) { + PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); + goto bad; + } + module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, NULL); + #endif bad: Py_XDECREF(empty_list); - Py_XDECREF(__import__); + Py_XDECREF(py_import); Py_XDECREF(empty_dict); return module; } -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { - PyObject *result; - result = PyObject_GetAttr(dict, name); - if (!result) - PyErr_SetObject(PyExc_NameError, name); - return result; +static CYTHON_INLINE __quad_t __Pyx_PyInt_from_py___quad_t(PyObject* x) { + const __quad_t neg_one = (__quad_t)-1, const_zero = (__quad_t)0; + const int is_unsigned = const_zero < neg_one; + if (sizeof(__quad_t) == sizeof(char)) { + if (is_unsigned) + return (__quad_t)__Pyx_PyInt_AsUnsignedChar(x); + else + return (__quad_t)__Pyx_PyInt_AsSignedChar(x); + } else if (sizeof(__quad_t) == sizeof(short)) { + if (is_unsigned) + return (__quad_t)__Pyx_PyInt_AsUnsignedShort(x); + else + return (__quad_t)__Pyx_PyInt_AsSignedShort(x); + } else if (sizeof(__quad_t) == sizeof(int)) { + if (is_unsigned) + return (__quad_t)__Pyx_PyInt_AsUnsignedInt(x); + else + return (__quad_t)__Pyx_PyInt_AsSignedInt(x); + } else if (sizeof(__quad_t) == sizeof(long)) { + if (is_unsigned) + return (__quad_t)__Pyx_PyInt_AsUnsignedLong(x); + else + return (__quad_t)__Pyx_PyInt_AsSignedLong(x); + } else if (sizeof(__quad_t) == sizeof(PY_LONG_LONG)) { + if (is_unsigned) + return (__quad_t)__Pyx_PyInt_AsUnsignedLongLong(x); + else + return (__quad_t)__Pyx_PyInt_AsSignedLongLong(x); + } else { + #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); + #else + __quad_t val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_VERSION_HEX < 0x03000000 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } + #endif + return (__quad_t)-1; + } } -static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) { - PyObject *item; - if (!(item = PyIter_Next(iter))) { - if (!PyErr_Occurred()) { - PyErr_Format(PyExc_ValueError, - #if PY_VERSION_HEX < 0x02050000 - "need more than %d values to unpack", (int)index); - #else - "need more than %zd values to unpack", index); - #endif +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py___quad_t(__quad_t val) { + const __quad_t neg_one = (__quad_t)-1, const_zero = (__quad_t)0; + const int is_unsigned = const_zero < neg_one; + if ((sizeof(__quad_t) == sizeof(char)) || + (sizeof(__quad_t) == sizeof(short))) { + return PyInt_FromLong((long)val); + } else if ((sizeof(__quad_t) == sizeof(int)) || + (sizeof(__quad_t) == sizeof(long))) { + if (is_unsigned) + return PyLong_FromUnsignedLong((unsigned long)val); + else + return PyInt_FromLong((long)val); + } else if (sizeof(__quad_t) == sizeof(PY_LONG_LONG)) { + if (is_unsigned) + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); + else + return PyLong_FromLongLong((PY_LONG_LONG)val); + } else { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + return _PyLong_FromByteArray(bytes, sizeof(__quad_t), + little, !is_unsigned); + } +} + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(a, a); + case 3: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(z, a); + case 4: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } + r = a.real; + theta = 0; + } else { + r = __Pyx_c_absf(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(a, a); + case 3: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(z, a); + case 4: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } + r = a.real; + theta = 0; + } else { + r = __Pyx_c_abs(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { + const unsigned char neg_one = (unsigned char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned char" : + "value too large to convert to unsigned char"); + } + return (unsigned char)-1; } + return (unsigned char)val; } - return item; + return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } -static int __Pyx_EndUnpack(PyObject *iter) { - PyObject *item; - if ((item = PyIter_Next(iter))) { - Py_DECREF(item); - PyErr_SetString(PyExc_ValueError, "too many values to unpack"); - return -1; +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { + const unsigned short neg_one = (unsigned short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned short" : + "value too large to convert to unsigned short"); + } + return (unsigned short)-1; + } + return (unsigned short)val; } - else if (!PyErr_Occurred()) - return 0; - else - return -1; + return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { - Py_XINCREF(type); - Py_XINCREF(value); - Py_XINCREF(tb); - /* First, check the traceback argument, replacing None with NULL. */ - if (tb == Py_None) { - Py_DECREF(tb); - tb = 0; +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { + const unsigned int neg_one = (unsigned int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned int" : + "value too large to convert to unsigned int"); + } + return (unsigned int)-1; + } + return (unsigned int)val; } - else if (tb != NULL && !PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto raise_error; + return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); +} + +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { + const char neg_one = (char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to char" : + "value too large to convert to char"); + } + return (char)-1; + } + return (char)val; } - /* Next, replace a missing value with None */ - if (value == NULL) { - value = Py_None; - Py_INCREF(value); + return (char)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { + const short neg_one = (short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to short" : + "value too large to convert to short"); + } + return (short)-1; + } + return (short)val; } - #if PY_VERSION_HEX < 0x02050000 - if (!PyClass_Check(type)) - #else - if (!PyType_Check(type)) - #endif - { - /* Raising an instance. The value should be a dummy. */ - if (value != Py_None) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto raise_error; + return (short)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } + return (int)-1; } - /* Normalize to raise , */ - Py_DECREF(value); - value = type; - #if PY_VERSION_HEX < 0x02050000 - if (PyInstance_Check(type)) { - type = (PyObject*) ((PyInstanceObject*)type)->in_class; - Py_INCREF(type); + return (int)val; + } + return (int)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { + const signed char neg_one = (signed char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed char" : + "value too large to convert to signed char"); } - else { - type = 0; - PyErr_SetString(PyExc_TypeError, - "raise: exception must be an old-style class or instance"); - goto raise_error; + return (signed char)-1; + } + return (signed char)val; + } + return (signed char)__Pyx_PyInt_AsSignedLong(x); +} + +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { + const signed short neg_one = (signed short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed short" : + "value too large to convert to signed short"); } - #else - type = (PyObject*) Py_TYPE(type); - Py_INCREF(type); - if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto raise_error; + return (signed short)-1; + } + return (signed short)val; + } + return (signed short)__Pyx_PyInt_AsSignedLong(x); +} + +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { + const signed int neg_one = (signed int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed int" : + "value too large to convert to signed int"); } - #endif + return (signed int)-1; + } + return (signed int)val; } - __Pyx_ErrRestore(type, value, tb); - return; -raise_error: - Py_XDECREF(value); - Py_XDECREF(type); - Py_XDECREF(tb); - return; + return (signed int)__Pyx_PyInt_AsSignedLong(x); } -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); - __Pyx_ErrFetch(type, value, tb); - PyErr_NormalizeException(type, value, tb); - if (PyErr_Occurred()) - goto bad; - Py_INCREF(*type); - Py_INCREF(*value); - Py_INCREF(*tb); - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = *type; - tstate->exc_value = *value; - tstate->exc_traceback = *tb; - /* Make sure tstate is in a consistent state when we XDECREF - these objects (XDECREF may run arbitrary code). */ - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); - return 0; -bad: - Py_XDECREF(*type); - Py_XDECREF(*value); - Py_XDECREF(*tb); - return -1; +static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } + return (int)-1; + } + return (int)val; + } + return (int)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { + const unsigned long neg_one = (unsigned long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return (unsigned long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return (unsigned long)PyLong_AsUnsignedLong(x); + } else { + return (unsigned long)PyLong_AsLong(x); + } + } else { + unsigned long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (unsigned long)-1; + val = __Pyx_PyInt_AsUnsignedLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return (unsigned PY_LONG_LONG)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); + } else { + return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); + } + } else { + unsigned PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (unsigned PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsUnsignedLongLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { + const long neg_one = (long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return (long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return (long)PyLong_AsUnsignedLong(x); + } else { + return (long)PyLong_AsLong(x); + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (long)-1; + val = __Pyx_PyInt_AsLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } + return (PY_LONG_LONG)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } + return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); + } else { + return (PY_LONG_LONG)PyLong_AsLongLong(x); + } + } else { + PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsLongLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { + const signed long neg_one = (signed long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } + return (signed long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } + return (signed long)PyLong_AsUnsignedLong(x); + } else { + return (signed long)PyLong_AsLong(x); + } + } else { + signed long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (signed long)-1; + val = __Pyx_PyInt_AsSignedLong(tmp); + Py_DECREF(tmp); + return val; + } } +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { + const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_VERSION_HEX < 0x03000000 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } + return (signed PY_LONG_LONG)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } + return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); + } else { + return (signed PY_LONG_LONG)PyLong_AsLongLong(x); + } + } else { + signed PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (signed PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsSignedLongLong(tmp); + Py_DECREF(tmp); + return val; + } +} -static void __Pyx_WriteUnraisable(const char *name) { +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); @@ -11392,42 +14950,72 @@ static void __Pyx_WriteUnraisable(const char *name) { } } +static int __Pyx_check_binary_version(void) { + char ctversion[4], rtversion[4]; + PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); + PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); + if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compiletime version %s of module '%.100s' " + "does not match runtime version %s", + ctversion, __Pyx_MODULE_NAME, rtversion); + #if PY_VERSION_HEX < 0x02050000 + return PyErr_Warn(NULL, message); + #else + return PyErr_WarnEx(NULL, message, 1); + #endif + } + return 0; +} + static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - PyObject *pycobj = 0; - int result; - - pycobj = PyCObject_FromVoidPtr(vtable, 0); - if (!pycobj) +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + PyObject *ob = PyCapsule_New(vtable, 0, 0); +#else + PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); +#endif + if (!ob) goto bad; - if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0) + if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0) goto bad; - result = 0; - goto done; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} +#ifndef __PYX_HAVE_RT_ImportModule +#define __PYX_HAVE_RT_ImportModule +static PyObject *__Pyx_ImportModule(const char *name) { + PyObject *py_name = 0; + PyObject *py_module = 0; + py_name = __Pyx_PyIdentifier_FromString(name); + if (!py_name) + goto bad; + py_module = PyImport_Import(py_name); + Py_DECREF(py_name); + return py_module; bad: - result = -1; -done: - Py_XDECREF(pycobj); - return result; + Py_XDECREF(py_name); + return 0; } +#endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, - long size) + size_t size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; - + char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) goto bad; - #if PY_MAJOR_VERSION < 3 - py_name = PyString_FromString(class_name); - #else - py_name = PyUnicode_FromString(class_name); - #endif + py_name = __Pyx_PyIdentifier_FromString(class_name); if (!py_name) goto bad; result = PyObject_GetAttr(py_module, py_name); @@ -11438,14 +15026,24 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class if (!result) goto bad; if (!PyType_Check(result)) { - PyErr_Format(PyExc_TypeError, + PyErr_Format(PyExc_TypeError, "%s.%s is not a type object", module_name, class_name); goto bad; } - if (((PyTypeObject *)result)->tp_basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%s.%s does not appear to be the correct type object", + if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility", + module_name, class_name); + #if PY_VERSION_HEX < 0x02050000 + if (PyErr_Warn(NULL, warning) < 0) goto bad; + #else + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + #endif + } + else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } @@ -11453,55 +15051,109 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class bad: Py_XDECREF(py_module); Py_XDECREF(result); - return 0; + return NULL; } #endif -#ifndef __PYX_HAVE_RT_ImportModule -#define __PYX_HAVE_RT_ImportModule -static PyObject *__Pyx_ImportModule(const char *name) { - PyObject *py_name = 0; - PyObject *py_module = 0; - - #if PY_MAJOR_VERSION < 3 - py_name = PyString_FromString(name); - #else - py_name = PyUnicode_FromString(name); - #endif - if (!py_name) - goto bad; - py_module = PyImport_Import(py_name); - Py_DECREF(py_name); - return py_module; -bad: - Py_XDECREF(py_name); - return 0; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = (start + end) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); } -#endif #include "compile.h" #include "frameobject.h" #include "traceback.h" - -static void __Pyx_AddTraceback(const char *funcname) { +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; - PyObject *py_globals = 0; - PyObject *empty_string = 0; - PyCodeObject *py_code = 0; - PyFrameObject *py_frame = 0; - #if PY_MAJOR_VERSION < 3 - py_srcfile = PyString_FromString(__pyx_filename); + py_srcfile = PyString_FromString(filename); #else - py_srcfile = PyUnicode_FromString(__pyx_filename); + py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; - if (__pyx_clineno) { + if (c_line) { #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno); + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno); + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { @@ -11512,34 +15164,45 @@ static void __Pyx_AddTraceback(const char *funcname) { #endif } if (!py_funcname) goto bad; - py_globals = PyModule_GetDict(__pyx_m); - if (!py_globals) goto bad; - #if PY_MAJOR_VERSION < 3 - empty_string = PyString_FromStringAndSize("", 0); - #else - empty_string = PyBytes_FromStringAndSize("", 0); - #endif - if (!empty_string) goto bad; - py_code = PyCode_New( + py_code = __Pyx_PyCode_New( 0, /*int argcount,*/ - #if PY_MAJOR_VERSION >= 3 0, /*int kwonlyargcount,*/ - #endif 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ - empty_string, /*PyObject *code,*/ - __pyx_empty_tuple, /*PyObject *consts,*/ - __pyx_empty_tuple, /*PyObject *names,*/ - __pyx_empty_tuple, /*PyObject *varnames,*/ - __pyx_empty_tuple, /*PyObject *freevars,*/ - __pyx_empty_tuple, /*PyObject *cellvars,*/ + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ - __pyx_lineno, /*int firstlineno,*/ - empty_string /*PyObject *lnotab*/ + py_line, /*int firstlineno,*/ + __pyx_empty_bytes /*PyObject *lnotab*/ ); - if (!py_code) goto bad; + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_globals = 0; + PyFrameObject *py_frame = 0; + py_code = __pyx_find_code_object(c_line ? c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? c_line : py_line, py_code); + } + py_globals = PyModule_GetDict(__pyx_m); + if (!py_globals) goto bad; py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ @@ -11547,12 +15210,9 @@ static void __Pyx_AddTraceback(const char *funcname) { 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; - py_frame->f_lineno = __pyx_lineno; + py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } @@ -11560,7 +15220,7 @@ static void __Pyx_AddTraceback(const char *funcname) { static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 - if (t->is_unicode && (!t->is_identifier)) { + if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); @@ -11568,10 +15228,14 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else /* Python 3+ has unicode identifiers */ - if (t->is_identifier || (t->is_unicode && t->intern)) { - *t->p = PyUnicode_InternFromString(t->s); - } else if (t->is_unicode) { - *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } @@ -11583,223 +15247,95 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } -/* Type Conversion Functions */ -static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_ssize_t ival; - PyObject* x = PyNumber_Index(b); - if (!x) return -1; - ival = PyInt_AsSsize_t(x); - Py_DECREF(x); - return ival; -} +/* Type Conversion Functions */ -static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { - if (x == Py_True) return 1; - else if (x == Py_False) return 0; +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } -static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) { - if (PyInt_CheckExact(x)) { - return PyInt_AS_LONG(x); - } - else if (PyLong_CheckExact(x)) { - return PyLong_AsLongLong(x); - } - else { - PY_LONG_LONG val; - PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; - val = __pyx_PyInt_AsLongLong(tmp); - Py_DECREF(tmp); - return val; - } -} - -static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x) { - if (PyInt_CheckExact(x)) { - long val = PyInt_AS_LONG(x); - if (unlikely(val < 0)) { - PyErr_SetString(PyExc_TypeError, "Negative assignment to unsigned type."); - return (unsigned PY_LONG_LONG)-1; - } - return val; - } - else if (PyLong_CheckExact(x)) { - return PyLong_AsUnsignedLongLong(x); - } - else { - PY_LONG_LONG val; - PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1; - val = __pyx_PyInt_AsUnsignedLongLong(tmp); - Py_DECREF(tmp); - return val; - } -} - - -static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x) { - if (sizeof(unsigned char) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - unsigned char val = (unsigned char)long_val; - if (unlikely((val != long_val) || (long_val < 0))) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned char"); - return (unsigned char)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } -} - -static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x) { - if (sizeof(unsigned short) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - unsigned short val = (unsigned short)long_val; - if (unlikely((val != long_val) || (long_val < 0))) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned short"); - return (unsigned short)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } -} - -static INLINE char __pyx_PyInt_char(PyObject* x) { - if (sizeof(char) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - char val = (char)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to char"); - return (char)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } -} - -static INLINE short __pyx_PyInt_short(PyObject* x) { - if (sizeof(short) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - short val = (short)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to short"); - return (short)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } -} - -static INLINE int __pyx_PyInt_int(PyObject* x) { - if (sizeof(int) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - int val = (int)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); - return (int)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } -} - -static INLINE long __pyx_PyInt_long(PyObject* x) { - if (sizeof(long) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - long val = (long)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); - return (long)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } -} - -static INLINE signed char __pyx_PyInt_signed_char(PyObject* x) { - if (sizeof(signed char) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - signed char val = (signed char)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed char"); - return (signed char)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { + PyNumberMethods *m; + const char *name = NULL; + PyObject *res = NULL; +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(x) || PyLong_Check(x)) +#else + if (PyLong_Check(x)) +#endif + return Py_INCREF(x), x; + m = Py_TYPE(x)->tp_as_number; +#if PY_VERSION_HEX < 0x03000000 + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = PyNumber_Long(x); + } +#else + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Long(x); + } +#endif + if (res) { +#if PY_VERSION_HEX < 0x03000000 + if (!PyInt_Check(res) && !PyLong_Check(res)) { +#else + if (!PyLong_Check(res)) { +#endif + PyErr_Format(PyExc_TypeError, + "__%s__ returned non-%s (type %.200s)", + name, name, Py_TYPE(res)->tp_name); + Py_DECREF(res); + return NULL; } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; } -static INLINE signed short __pyx_PyInt_signed_short(PyObject* x) { - if (sizeof(signed short) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - signed short val = (signed short)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed short"); - return (signed short)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject* x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; } -static INLINE signed int __pyx_PyInt_signed_int(PyObject* x) { - if (sizeof(signed int) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - signed int val = (signed int)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed int"); - return (signed int)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { +#if PY_VERSION_HEX < 0x02050000 + if (ival <= LONG_MAX) + return PyInt_FromLong((long)ival); + else { + unsigned char *bytes = (unsigned char *) &ival; + int one = 1; int little = (int)*(unsigned char*)&one; + return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); + } +#else + return PyInt_FromSize_t(ival); +#endif } -static INLINE signed long __pyx_PyInt_signed_long(PyObject* x) { - if (sizeof(signed long) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - signed long val = (signed long)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed long"); - return (signed long)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { + unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); + if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { + return (size_t)-1; + } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t)-1; + } + return (size_t)val; } -static INLINE long double __pyx_PyInt_long_double(PyObject* x) { - if (sizeof(long double) < sizeof(long)) { - long long_val = __pyx_PyInt_AsLong(x); - long double val = (long double)long_val; - if (unlikely((val != long_val) )) { - PyErr_SetString(PyExc_OverflowError, "value too large to convert to long double"); - return (long double)-1; - } - return val; - } - else { - return __pyx_PyInt_AsLong(x); - } -} +#endif /* Py_PYTHON_H */ diff --git a/audiolab/pysndfile/_sndfile.pyx b/audiolab/pysndfile/_sndfile.pyx index 48df0e9..971cfe5 100644 --- a/audiolab/pysndfile/_sndfile.pyx +++ b/audiolab/pysndfile/_sndfile.pyx @@ -5,10 +5,12 @@ import warnings import copy cimport numpy as cnp -cimport stdlib from sndfile cimport * cimport sndfile as csndfile +cdef extern from "stdlib.h": + int strlen(char *buff) + cdef extern from "sndfile.h": cdef struct SF_FORMAT_INFO: int format @@ -112,7 +114,7 @@ def sndfile_version(): if st < 1: raise RuntimeError("Error while getting version of libsndfile") - ver = PyString_FromStringAndSize(buff, stdlib.strlen(buff)) + ver = PyString_FromStringAndSize(buff, strlen(buff)) # Get major, minor and micro from version # Template: libsndfile-X.X.XpreX with preX being optional @@ -213,7 +215,7 @@ cdef class Format: "problem to the maintainer") self._format_str = PyString_FromStringAndSize(format_info.name, - stdlib.strlen(format_info.name)) + strlen(format_info.name)) # Get the sndfile string description of the encoding type format_info.format = cencoding @@ -225,7 +227,7 @@ cdef class Format: "problem to the maintainer") self._encoding_str = PyString_FromStringAndSize(format_info.name, - stdlib.strlen(format_info.name)) + strlen(format_info.name)) self._format_raw_int = format @@ -656,9 +658,8 @@ broken)""" cdef cnp.ndarray[cnp.float32_t, ndim=2] ty cdef sf_count_t res - # Use Fortran order to cope with interleaving ty = np.empty((nframes, self._sfinfo.channels), - dtype=np.float32, order='F') + dtype=np.float32, order='C') res = sf_readf_float(self.hdl, ty.data, nframes) if not res == nframes: @@ -669,9 +670,8 @@ broken)""" cdef cnp.ndarray[cnp.int32_t, ndim=2] ty cdef sf_count_t res - # Use Fortran order to cope with interleaving ty = np.empty((nframes, self._sfinfo.channels), - dtype=np.int, order='F') + dtype=np.int, order='C') res = sf_readf_int(self.hdl, ty.data, nframes) if not res == nframes: @@ -682,9 +682,8 @@ broken)""" cdef cnp.ndarray[cnp.int16_t, ndim=2] ty cdef sf_count_t res - # Use Fortran order to cope with interleaving ty = np.empty((nframes, self._sfinfo.channels), - dtype=np.short, order='F') + dtype=np.short, order='C') res = sf_readf_short(self.hdl, ty.data, nframes) if not res == nframes: